All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/sti: enable fbdev compatibility through module param
@ 2015-10-29 13:02 Vincent Abriou
  2015-10-30 10:38 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Abriou @ 2015-10-29 13:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Nicolas VANHAELEWYN, Vincent Abriou, Fabien Dessenne,
	Benjamin Gaignard

DRM_STI_FBDEV is removed and replaced by the fbdev module param.
By default, the fbdev compatibility is disabled.

Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Nicolas VANHAELEWYN <nicolas.vanhaelewyn@st.com>
---
 drivers/gpu/drm/sti/Kconfig   |  6 ------
 drivers/gpu/drm/sti/sti_drv.c | 15 ++++++++++-----
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig
index 0a9048c..3f8d590 100644
--- a/drivers/gpu/drm/sti/Kconfig
+++ b/drivers/gpu/drm/sti/Kconfig
@@ -10,9 +10,3 @@ config DRM_STI
 	select FW_LOADER_USER_HELPER_FALLBACK
 	help
 	  Choose this option to enable DRM on STM stiH41x chipset
-
-config DRM_STI_FBDEV
-	bool "DRM frame buffer device for STMicroelectronics SoC stiH41x Serie"
-	depends on DRM_STI
-	help
-	  Choose this option to enable FBDEV on top of DRM for STM stiH41x chipset
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index e19c173..d47b025 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -30,6 +30,11 @@
 #define STI_MAX_FB_HEIGHT	4096
 #define STI_MAX_FB_WIDTH	4096
 
+/* Module parameter to enable fbdev compatibility */
+static bool fbdev_enabled;
+MODULE_PARM_DESC(fbdev, "Enable fbdev compatibility layer");
+module_param_named(fbdev, fbdev_enabled, bool, 0644);
+
 static void sti_atomic_schedule(struct sti_private *private,
 				struct drm_atomic_state *state)
 {
@@ -160,11 +165,11 @@ static int sti_load(struct drm_device *dev, unsigned long flags)
 
 	drm_mode_config_reset(dev);
 
-#ifdef CONFIG_DRM_STI_FBDEV
-	drm_fbdev_cma_init(dev, 32,
-			   dev->mode_config.num_crtc,
-			   dev->mode_config.num_connector);
-#endif
+	if (fbdev_enabled)
+		drm_fbdev_cma_init(dev, 32,
+				   dev->mode_config.num_crtc,
+				   dev->mode_config.num_connector);
+
 	return 0;
 }
 
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-30 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29 13:02 [PATCH 1/1] drm/sti: enable fbdev compatibility through module param Vincent Abriou
2015-10-30 10:38 ` Daniel Vetter
2015-10-30 12:22   ` Vincent ABRIOU

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.