summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/hdmi5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/hdmi5.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/hdmi5.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
index 64b45a612439..7af60ca4e7b2 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c
@@ -721,7 +721,7 @@ static const struct component_ops hdmi5_component_ops = {
* Probe & Remove, Suspend & Resume
*/
-static void hdmi5_init_output(struct omap_hdmi *hdmi)
+static int hdmi5_init_output(struct omap_hdmi *hdmi)
{
struct omap_dss_device *out = &hdmi->output;
@@ -734,13 +734,24 @@ static void hdmi5_init_output(struct omap_hdmi *hdmi)
out->owner = THIS_MODULE;
out->of_ports = BIT(0);
+ out->next = omapdss_of_find_connected_device(out->dev->of_node, 0);
+ if (IS_ERR(out->next)) {
+ if (PTR_ERR(out->next) != -EPROBE_DEFER)
+ dev_err(out->dev, "failed to find video sink\n");
+ return PTR_ERR(out->next);
+ }
+
omapdss_device_register(out);
+
+ return 0;
}
static void hdmi5_uninit_output(struct omap_hdmi *hdmi)
{
struct omap_dss_device *out = &hdmi->output;
+ if (out->next)
+ omapdss_device_put(out->next);
omapdss_device_unregister(out);
}
@@ -810,7 +821,9 @@ static int hdmi5_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
- hdmi5_init_output(hdmi);
+ r = hdmi5_init_output(hdmi);
+ if (r)
+ goto err_pm_disable;
r = component_add(&pdev->dev, &hdmi5_component_ops);
if (r)
@@ -820,6 +833,7 @@ static int hdmi5_probe(struct platform_device *pdev)
err_uninit_output:
hdmi5_uninit_output(hdmi);
+err_pm_disable:
pm_runtime_disable(&pdev->dev);
err_free:
kfree(hdmi);