mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
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: 27d624527d
("drm/omap: dss: Acquire next dssdev at probe time")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-3-laurent.pinchart@ideasonboard.com
This commit is contained in:
parent
e0c827aca0
commit
f8523b64d2
@ -635,10 +635,14 @@ static int hdmi4_bind(struct device *dev, struct device *master, void *data)
|
||||
|
||||
hdmi->dss = dss;
|
||||
|
||||
r = hdmi_pll_init(dss, hdmi->pdev, &hdmi->pll, &hdmi->wp);
|
||||
r = hdmi_runtime_get(hdmi);
|
||||
if (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);
|
||||
if (r)
|
||||
goto err_pll_uninit;
|
||||
@ -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);
|
||||
|
||||
hdmi_runtime_put(hdmi);
|
||||
|
||||
return 0;
|
||||
|
||||
err_cec_uninit:
|
||||
hdmi4_cec_uninit(&hdmi->core);
|
||||
err_pll_uninit:
|
||||
hdmi_pll_uninit(&hdmi->pll);
|
||||
err_runtime_put:
|
||||
hdmi_runtime_put(hdmi);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user