Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/imx: Remove local fbdev emulation Kconfig option

DRM_IMX_FB_HELPER config is currently used to enable/disable fbdev
emulation for the imx kms driver.

Remove this local config option and use the top level DRM_FBDEV_EMULATION
config option where applicable. Using this config lets us also prevent
wrapping around drm_fb_helper_* calls with #ifdefs in certain places.

Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1445933459-5249-2-git-send-email-architt@codeaurora.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Archit Taneja and committed by
Daniel Vetter
c1ff5a7a df2e0900

+3 -18
-9
drivers/gpu/drm/imx/Kconfig
··· 10 10 help 11 11 enable i.MX graphics support 12 12 13 - config DRM_IMX_FB_HELPER 14 - tristate "provide legacy framebuffer /dev/fb0" 15 - select DRM_KMS_CMA_HELPER 16 - depends on DRM_IMX 17 - help 18 - The DRM framework can provide a legacy /dev/fb0 framebuffer 19 - for your device. This is necessary to get a framebuffer console 20 - and also for applications using the legacy framebuffer API 21 - 22 13 config DRM_IMX_PARALLEL_DISPLAY 23 14 tristate "Support for parallel displays" 24 15 select DRM_PANEL
+3 -9
drivers/gpu/drm/imx/imx-drm-core.c
··· 49 49 struct imx_drm_crtc_helper_funcs imx_drm_helper_funcs; 50 50 }; 51 51 52 + #if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) 52 53 static int legacyfb_depth = 16; 53 54 module_param(legacyfb_depth, int, 0444); 55 + #endif 54 56 55 57 int imx_drm_crtc_id(struct imx_drm_crtc *crtc) 56 58 { ··· 62 60 63 61 static void imx_drm_driver_lastclose(struct drm_device *drm) 64 62 { 65 - #if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER) 66 63 struct imx_drm_device *imxdrm = drm->dev_private; 67 64 68 65 if (imxdrm->fbhelper) 69 66 drm_fbdev_cma_restore_mode(imxdrm->fbhelper); 70 - #endif 71 67 } 72 68 73 69 static int imx_drm_driver_unload(struct drm_device *drm) 74 70 { 75 - #if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER) 76 71 struct imx_drm_device *imxdrm = drm->dev_private; 77 - #endif 78 72 79 73 drm_kms_helper_poll_fini(drm); 80 74 81 - #if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER) 82 75 if (imxdrm->fbhelper) 83 76 drm_fbdev_cma_fini(imxdrm->fbhelper); 84 - #endif 85 77 86 78 component_unbind_all(drm->dev, drm); 87 79 ··· 211 215 212 216 static void imx_drm_output_poll_changed(struct drm_device *drm) 213 217 { 214 - #if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER) 215 218 struct imx_drm_device *imxdrm = drm->dev_private; 216 219 217 220 drm_fbdev_cma_hotplug_event(imxdrm->fbhelper); 218 - #endif 219 221 } 220 222 221 223 static struct drm_mode_config_funcs imx_drm_mode_config_funcs = { ··· 302 308 * The fb helper takes copies of key hardware information, so the 303 309 * crtcs/connectors/encoders must not change after this point. 304 310 */ 305 - #if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER) 311 + #if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION) 306 312 if (legacyfb_depth != 16 && legacyfb_depth != 32) { 307 313 dev_warn(drm->dev, "Invalid legacyfb_depth. Defaulting to 16bpp\n"); 308 314 legacyfb_depth = 16;