Commit f8523b64 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen

drm/omap: hdmi4: Ensure the device is active during bind

The bind function performs hardware access (in hdmi4_cec_init()) and
thus requires the device to be active. Ensure this by surrounding the
bind function by hdmi_runtime_get() and hdmi_runtime_put() calls.

Fixes: 27d62452 ("drm/omap: dss: Acquire next dssdev at probe time")
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-3-laurent.pinchart@ideasonboard.com
parent e0c827ac
...@@ -635,10 +635,14 @@ static int hdmi4_bind(struct device *dev, struct device *master, void *data) ...@@ -635,10 +635,14 @@ static int hdmi4_bind(struct device *dev, struct device *master, void *data)
hdmi->dss = dss; hdmi->dss = dss;
r = hdmi_pll_init(dss, hdmi->pdev, &hdmi->pll, &hdmi->wp); r = hdmi_runtime_get(hdmi);
if (r) if (r)
return r; return r;
r = hdmi_pll_init(dss, hdmi->pdev, &hdmi->pll, &hdmi->wp);
if (r)
goto err_runtime_put;
r = hdmi4_cec_init(hdmi->pdev, &hdmi->core, &hdmi->wp); r = hdmi4_cec_init(hdmi->pdev, &hdmi->core, &hdmi->wp);
if (r) if (r)
goto err_pll_uninit; goto err_pll_uninit;
...@@ -652,12 +656,16 @@ static int hdmi4_bind(struct device *dev, struct device *master, void *data) ...@@ -652,12 +656,16 @@ static int hdmi4_bind(struct device *dev, struct device *master, void *data)
hdmi->debugfs = dss_debugfs_create_file(dss, "hdmi", hdmi_dump_regs, hdmi->debugfs = dss_debugfs_create_file(dss, "hdmi", hdmi_dump_regs,
hdmi); hdmi);
hdmi_runtime_put(hdmi);
return 0; return 0;
err_cec_uninit: err_cec_uninit:
hdmi4_cec_uninit(&hdmi->core); hdmi4_cec_uninit(&hdmi->core);
err_pll_uninit: err_pll_uninit:
hdmi_pll_uninit(&hdmi->pll); hdmi_pll_uninit(&hdmi->pll);
err_runtime_put:
hdmi_runtime_put(hdmi);
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment