@@ -63,12 +63,6 @@ static const struct drm_mode_config_helper_funcs mode_config_helper_funcs = {
.atomic_commit_tail = msm_atomic_commit_tail,
};
-#ifdef CONFIG_DRM_FBDEV_EMULATION
-static bool fbdev = true;
-MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer");
-module_param(fbdev, bool, 0600);
-#endif
-
static char *vram = "16m";
MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)");
module_param(vram, charp, 0);
@@ -242,7 +236,7 @@ static int msm_drm_uninit(struct device *dev)
msm_rd_debugfs_cleanup(priv);
#ifdef CONFIG_DRM_FBDEV_EMULATION
- if (fbdev && ddev->fb_helper)
+ if (ddev->fb_helper)
msm_fbdev_free(ddev);
#endif
@@ -536,7 +530,7 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
drm_mode_config_reset(ddev);
#ifdef CONFIG_DRM_FBDEV_EMULATION
- if (kms && fbdev)
+ if (kms)
msm_fbdev_init(ddev);
#endif
@@ -14,6 +14,10 @@
#include "msm_gem.h"
#include "msm_kms.h"
+static bool fbdev = true;
+MODULE_PARM_DESC(fbdev, "Enable fbdev compat layer");
+module_param(fbdev, bool, 0600);
+
/*
* fbdev funcs, to implement legacy fbdev interface on top of drm driver
*/
@@ -125,6 +129,9 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
struct drm_fb_helper *helper;
int ret;
+ if (!fbdev)
+ return NULL;
+
helper = kzalloc(sizeof(*helper), GFP_KERNEL);
if (!helper)
return NULL;
Define the module's parameter 'fbdev' in fbdev code. No other code uses it. No functional changes, but simplifies the later conversion to struct drm_client. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> --- drivers/gpu/drm/msm/msm_drv.c | 10 ++-------- drivers/gpu/drm/msm/msm_fbdev.c | 7 +++++++ 2 files changed, 9 insertions(+), 8 deletions(-)