All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: Make exynos_drm_init() call late during the bootup
@ 2014-05-14 11:39 Naveen Krishna Chatradhi
  2014-05-21  6:39 ` Naveen Krishna Ch
  2014-05-21 15:46 ` Thierry Reding
  0 siblings, 2 replies; 5+ messages in thread
From: Naveen Krishna Chatradhi @ 2014-05-14 11:39 UTC (permalink / raw)
  To: dri-devel, linux-samsung-soc; +Cc: seanpaul, inki.dae, naveenkrishna.ch

exynos_drm_init() does probing of various drivers like dp_panel,
hdmi, fimd, mixer, etc in an order and finally binds them together.

Some of the drm devices (Eg: dp_panel) try to do regulator_get()
and enable few supplies during their probe.
Chances are that, these devices may get probed before the respective
supply/PMIC is hooked.  In such cases, dp_panel would continue with
"dummy regulator". Which is not what the system wants.

Lets give the core connectivity and regulators modules some time
to hookup the supplies before Exynos DRM devices comes into picture.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
This change is proposed after
1. Discussing with I2C/SPI & DMA subsystem maintainers and Others
   @ https://lkml.org/lkml/2014/5/9/333
   Trying to change the I2C, SPI and DMA drivers as subsys_initcall()
   Which was strictly opposed, as a flaw was found in DRM subsystem.

2. -EPROBE_DEFER won't work well with the current sequency of
    platform_driver_register()s in exynos_drm_init()

3. bridge_panel mechanism is under RFC and no conclusions were drawn yet.

We should be able to probe each DRM device independently and let PROBE_DEFER
take care of dependencies. But, this could cause lot of bootup time.

late_initcall() of DRM works well and fixes all the above issues for now.
Kindly suggest, if an alternative/better mechanism is out there.

Thanks,
 drivers/gpu/drm/exynos/exynos_drm_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 4cef88f..78c185a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -692,7 +692,7 @@ static void exynos_drm_exit(void)
 	platform_driver_unregister(&exynos_drm_platform_driver);
 }
 
-module_init(exynos_drm_init);
+late_initcall(exynos_drm_init);
 module_exit(exynos_drm_exit);
 
 MODULE_AUTHOR("Inki Dae <inki.dae@samsung.com>");
-- 
1.7.9.5

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

end of thread, other threads:[~2014-05-27 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 11:39 [PATCH] drm/exynos: Make exynos_drm_init() call late during the bootup Naveen Krishna Chatradhi
2014-05-21  6:39 ` Naveen Krishna Ch
2014-05-21 15:46 ` Thierry Reding
2014-05-26  5:39   ` Naveen Krishna Ch
2014-05-27 13:02     ` Inki Dae

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.