Commit a247ce78 authored by Archit Taneja's avatar Archit Taneja Committed by Tomi Valkeinen

OMAPDSS: HACK: Ensure DSS clock domain gets out of idle when HDMI is enabled

For DSS clock domain to transition from idle to active state. It's necessary
to enable the optional clock DSS_FCLK before we enable the module using the
MODULEMODE bits in the clock domain's CM_DSS_DSS_CLKCTRL register.

This sequence was not followed correctly for the 'dss_hdmi' hwmod and it led
to DSS clock domain not getting out of idle when pm_runtime_get_sync() was
called for hdmi's platform device.

Since the clock domain failed to change it's state to active, the hwmod code
disables any clocks it had enabled before for this hwmod. This led to the clock
'dss_48mhz_clk' gettind disabled.

When hdmi's runtime_resume() op is called, the call to dss_runtime_get()
correctly enables the DSS clock domain this time. However, the clock
'dss_48mhz_clk' is needed for HDMI's PHY to function correctly. Since it was
disabled previously, the driver fails when it tries to enable HDMI's PHY.

Fix this for now by ensuring that dss_runtime_get() is called before we call
pm_runtime_get_sync() for hdmi's platform device. A correct fix for later would
be to modify the DSS related hwmod's mainclks, and also some changes in how
opt clocks are handled in the DSS driver.

This fixes the issue of HDMI not working when it's the default display. The
issue is not seen if any other display is already enabled as the first display
would have correctly enabled the DSS clockdomain.
Signed-off-by: default avatarArchit Taneja <archit@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent d65b4e98
...@@ -165,9 +165,25 @@ static int hdmi_runtime_get(void) ...@@ -165,9 +165,25 @@ static int hdmi_runtime_get(void)
DSSDBG("hdmi_runtime_get\n"); DSSDBG("hdmi_runtime_get\n");
/*
* HACK: Add dss_runtime_get() to ensure DSS clock domain is enabled.
* This should be removed later.
*/
r = dss_runtime_get();
if (r < 0)
goto err_get_dss;
r = pm_runtime_get_sync(&hdmi.pdev->dev); r = pm_runtime_get_sync(&hdmi.pdev->dev);
WARN_ON(r < 0); WARN_ON(r < 0);
return r < 0 ? r : 0; if (r < 0)
goto err_get_hdmi;
return 0;
err_get_hdmi:
dss_runtime_put();
err_get_dss:
return r;
} }
static void hdmi_runtime_put(void) static void hdmi_runtime_put(void)
...@@ -178,6 +194,12 @@ static void hdmi_runtime_put(void) ...@@ -178,6 +194,12 @@ static void hdmi_runtime_put(void)
r = pm_runtime_put_sync(&hdmi.pdev->dev); r = pm_runtime_put_sync(&hdmi.pdev->dev);
WARN_ON(r < 0); WARN_ON(r < 0);
/*
* HACK: This is added to complement the dss_runtime_get() call in
* hdmi_runtime_get(). This should be removed later.
*/
dss_runtime_put();
} }
int hdmi_init_display(struct omap_dss_device *dssdev) int hdmi_init_display(struct omap_dss_device *dssdev)
......
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