Skip to content

Commit

Permalink
drm/omap: populate DSI platform bus earlier
Browse files Browse the repository at this point in the history
After the changes from 4.20 the DSI encoder tries to find the
attached panel before populating the DSI bus. If the panel is
not found -EPROBE_DEFER is returned, so the DSI bus is never
populated and the panel never added.

Fix this by populating the DSI bus before searching for the
video sink in dsi_init_output().

Fixes: 27d6245 ("drm/omap: dss: Acquire next dssdev at probe time")
Acked-by: Pavel Machek <pavel@ucw.cz>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181121160916.22017-3-sebastian.reichel@collabora.com
  • Loading branch information
Sebastian Reichel authored and Tomi Valkeinen committed Dec 3, 2018
1 parent 0a7f54e commit 0a02d49
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/gpu/drm/omapdrm/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -5418,32 +5418,32 @@ static int dsi_probe(struct platform_device *pdev)
dsi->num_lanes_supported = 3;
}

r = of_platform_populate(dev->of_node, NULL, NULL, dev);
if (r) {
DSSERR("Failed to populate DSI child devices: %d\n", r);
goto err_pm_disable;
}

r = dsi_init_output(dsi);
if (r)
goto err_pm_disable;
goto err_of_depopulate;

r = dsi_probe_of(dsi);
if (r) {
DSSERR("Invalid DSI DT data\n");
goto err_uninit_output;
}

r = of_platform_populate(dev->of_node, NULL, NULL, dev);
if (r) {
DSSERR("Failed to populate DSI child devices: %d\n", r);
goto err_uninit_output;
}

r = component_add(&pdev->dev, &dsi_component_ops);
if (r)
goto err_of_depopulate;
goto err_uninit_output;

return 0;

err_of_depopulate:
of_platform_depopulate(dev);
err_uninit_output:
dsi_uninit_output(dsi);
err_of_depopulate:
of_platform_depopulate(dev);
err_pm_disable:
pm_runtime_disable(dev);
return r;
Expand Down

0 comments on commit 0a02d49

Please sign in to comment.