drm/msm: add moduleparam to disable fbdev
authorRob Clark <robdclark@gmail.com>
Fri, 30 Jan 2015 22:05:41 +0000 (17:05 -0500)
committerRob Clark <robdclark@gmail.com>
Sun, 1 Feb 2015 20:34:04 +0000 (15:34 -0500)
Useful to avoid recompiling to disable fbdev.  Useful because otherwise
the first modeset happens under console_lock (ie. debugging sadness).

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_drv.c

index e757c9d866dbdb5a0ea65cdb73d519fece40bc4a..a4269119f9eaf3eae5c2b0dbb6d37745466bd44f 100644 (file)
@@ -54,6 +54,12 @@ module_param(reglog, bool, 0600);
 #define reglog 0
 #endif
 
+#ifdef CONFIG_DRM_MSM_FBDEV
+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);
@@ -300,7 +306,8 @@ static int msm_load(struct drm_device *dev, unsigned long flags)
        drm_mode_config_reset(dev);
 
 #ifdef CONFIG_DRM_MSM_FBDEV
-       priv->fbdev = msm_fbdev_init(dev);
+       if (fbdev)
+               priv->fbdev = msm_fbdev_init(dev);
 #endif
 
        ret = msm_debugfs_late_init(dev);