From: Peter Ujfalusi Date: Tue, 3 May 2016 19:08:01 +0000 (+0300) Subject: drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a09d2bc1503508c17ef3a71c6b1905e3660f3029;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up Instead of 'guessing' based on aliases of the status of the DSS drivers, use the new interface to check that all needed drivers are loaded. In this way we can be sure that all needed drivers are loaded so it is safe to continue the probing of omapdrm. This method will allow the omapdrm to be probed 'headless', without outputs. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index c7dbf30a61fa..ad8d16cf819c 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -250,7 +250,9 @@ static int omap_connect_dssdevs(void) { int r; struct omap_dss_device *dssdev = NULL; - bool no_displays = true; + + if (!omapdss_stack_is_ready()) + return -EPROBE_DEFER; for_each_dss_dev(dssdev) { r = dssdev->driver->connect(dssdev); @@ -260,14 +262,9 @@ static int omap_connect_dssdevs(void) } else if (r) { dev_warn(dssdev->dev, "could not connect display: %s\n", dssdev->name); - } else { - no_displays = false; } } - if (no_displays) - return -EPROBE_DEFER; - return 0; cleanup: