Tony Lindgren fe4ed1b457 drm/omap: dsi: Fix PM for display blank with paired dss_pll calls
Currently dsi_display_init_dsi() calls dss_pll_enable() but it is not
paired with dss_pll_disable() in dsi_display_uninit_dsi(). This leaves
the DSS clocks enabled when the display is blanked wasting about extra
5mW of power while idle.

The clock that is left on by not calling dss_pll_disable() is
DSS_CLKCTRL bit 10 OPTFCLKEN_SYS_CLK that is the source clock for
DSI PLL.

We can fix this issue by by making the current dsi_pll_uninit() into
dsi_pll_disable(). This way we can just call dss_pll_disable() from
dsi_display_uninit_dsi() and the code becomes a bit easier to follow.

However, we need to also consider that DSI PLL can be muxed for DVI too
as pointed out by Tomi Valkeinen <tomi.valkeinen@ti.com>. In the DVI
case, we want to unconditionally disable the clocks. To get around this
issue, we separate out the DSI lane handling from dsi_pll_enable() and
dsi_pll_disable() as suggested by Tomi in an earlier experimental patch.

So we must only toggle the DSI regulator based on the vdds_dsi_enabled
flag from dsi_display_init_dsi() and dsi_display_uninit_dsi().

We need to make these two changes together to avoid breaking things
for DVI when fixing the DSI clock handling. And this all causes a
slight renumbering of the error path for dsi_display_init_dsi().

Suggested-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2019-03-18 11:42:14 +02:00
..
2019-01-24 13:20:42 +01:00
2019-01-24 13:20:42 +01:00
2019-03-04 12:02:55 +10:00
2019-02-05 10:28:13 +01:00
2019-01-29 15:45:21 +01:00
2019-01-24 13:20:42 +01:00
2019-02-18 13:27:15 +10:00
2019-01-29 15:45:21 +01:00
2019-03-08 08:23:15 -08:00
2019-03-12 10:04:00 -07:00
2019-01-29 15:45:21 +01:00
2019-03-04 12:02:55 +10:00
2019-02-18 13:27:15 +10:00
2019-01-24 13:20:42 +01:00
2019-01-24 13:20:42 +01:00
2019-02-11 13:32:49 +10:00
2019-01-24 13:20:42 +01:00
2019-01-24 13:20:42 +01:00
2019-02-18 13:27:15 +10:00
2019-02-18 13:27:15 +10:00
2019-03-09 15:53:03 -08:00
2019-01-24 13:20:42 +01:00
2019-02-18 13:27:15 +10:00
2019-01-10 05:58:52 +10:00
2018-11-20 14:56:18 +01:00
2019-01-12 13:07:30 +01:00
2019-02-18 13:27:15 +10:00
2019-03-05 08:14:22 +10:00
2019-01-10 05:58:52 +10:00
2019-01-29 15:45:21 +01:00
2019-02-18 13:27:15 +10:00
2019-02-04 10:21:17 +01:00
2019-01-10 05:58:52 +10:00
2019-01-12 13:07:58 +01:00
2018-11-30 10:57:18 +01:00