drm/sti: enable fbdev compatibility through module param
Subsystems (3)
PATCH 1/1 drm/sti: enable fbdev compatibility through module param
DRM_STI_FBDEV is removed and replaced by the fbdev module param. By default, the fbdev compatibility is disabled.
--- drivers/gpu/drm/sti/Kconfig | 6 ------ drivers/gpu/drm/sti/sti_drv.c | 15 ++++++++++----- 2 files changed, 10 insertions(+), 11 deletions(-)
drivers/gpu/drm/sti/Kconfig +0 -6
@@ -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
drivers/gpu/drm/sti/sti_drv.c +10 -5
@@ -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 ; }
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Vincent Abriou
DRM_STI_FBDEVis removed and replaced by the fbdev module param. By default, the fbdev compatibility is disabled.Signed-off-by Vincent Abriou <[email protected]>Signed-off-by Nicolas VANHAELEWYN <[email protected]>
Already replied somewhere else, but we have this in the core fb helpers with drm_kms_helper.fbdev_emulation module option. Just make sure that one works for sti.
-Daniel
Quoted 59 lines
--- drivers/gpu/drm/sti/Kconfig | 6 ------ drivers/gpu/drm/sti/sti_drv.c | 15 ++++++++++----- 2 files changed, 10 insertions(+), 11 deletions(-)drivers/gpu/drm/sti/Kconfig +0
-6@@ -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 chipsetdrivers/gpu/drm/sti/sti_drv.c +10
-5@@ -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 ; }Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Daniel Vetter
Quoted 3 lines · Vincent Abriou
DRM_STI_FBDEVis removed and replaced by the fbdev module param. By default, the fbdev compatibility is disabled.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Vincent Abriou <[email protected]>Signed-off-by Nicolas VANHAELEWYN <[email protected]>Already replied somewhere else, but we have this in the core fb helpers with drm_kms_helper.fbdev_emulation module option. Just make sure that one works for sti.
-Daniel
I was not aware about this.fbdev_emulation module option works fine for sti driver. This patch could be abandonned
Thanks
Vincent
Quoted 52 lines
Quoted 52 lines
--- drivers/gpu/drm/sti/Kconfig | 6 ------ drivers/gpu/drm/sti/sti_drv.c | 15 ++++++++++----- 2 files changed, 10 insertions(+), 11 deletions(-)drivers/gpu/drm/sti/Kconfig +0
-6@@ -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 chipsetdrivers/gpu/drm/sti/sti_drv.c +10
-5@@ -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 ; }
Quoted 8 lines
Quoted 7 lines
--
1.9.1_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel