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

drm/exynos: delay fbdev initialization until an output is connected

In case fbdev is initialized before any output is connected,
fb resolution defaults to 1024x768. After that any output with
bigger resolution is ignored and fbdev is not displayed.
The patch postpones fbdev initialization to avoid such situation.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>

authored by

Andrzej Hajda and committed by
Inki Dae
25928a39 d2ba65f6

+7 -12
+4 -12
drivers/gpu/drm/exynos/exynos_drm_drv.c
··· 109 109 /* setup possible_clones. */ 110 110 exynos_drm_encoder_setup(dev); 111 111 112 - /* 113 - * create and configure fb helper and also exynos specific 114 - * fbdev object. 115 - */ 116 - ret = exynos_drm_fbdev_init(dev); 117 - if (ret) { 118 - DRM_ERROR("failed to initialize drm fbdev\n"); 119 - goto err_drm_device; 120 - } 121 - 122 112 drm_vblank_offdelay = VBLANK_OFF_DELAY; 123 113 124 114 platform_set_drvdata(dev->platformdev, dev); 125 115 116 + /* force connectors detection */ 117 + drm_helper_hpd_irq_event(dev); 118 + 126 119 return 0; 127 120 128 - err_drm_device: 129 - exynos_drm_device_unregister(dev); 130 121 err_vblank: 131 122 drm_vblank_cleanup(dev); 132 123 err_display_cleanup: ··· 565 574 platform_driver_unregister(&fimd_driver); 566 575 out_fimd: 567 576 #endif 577 + 568 578 #ifdef CONFIG_DRM_EXYNOS_DP 569 579 platform_driver_unregister(&dp_driver); 570 580 out_dp:
+3
drivers/gpu/drm/exynos/exynos_drm_fb.c
··· 20 20 21 21 #include "exynos_drm_drv.h" 22 22 #include "exynos_drm_fb.h" 23 + #include "exynos_drm_fbdev.h" 23 24 #include "exynos_drm_gem.h" 24 25 #include "exynos_drm_iommu.h" 25 26 #include "exynos_drm_crtc.h" ··· 301 300 302 301 if (fb_helper) 303 302 drm_fb_helper_hotplug_event(fb_helper); 303 + else 304 + exynos_drm_fbdev_init(dev); 304 305 } 305 306 306 307 static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {