Re: [PATCHv2] drm/omap: dsi: Fix PM for display blank with paired dss_pll calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/02/2019 17:45, Tony Lindgren wrote:
> 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@xxxxxx>. 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@xxxxxx>
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> ---
> 
> Changes since v1:
> - Updated with Tomi's suggested changes to not break DVI with
>   regulator_enable() made conditional for dsi_display_init_dsi()
> 
> - Updated comments to better describe what all goes wrong
> 
> ---
>  drivers/gpu/drm/omapdrm/dss/dsi.c | 60 ++++++++++++++++---------------
>  1 file changed, 31 insertions(+), 29 deletions(-)

Looks fine to me and works on panda. I'll queue this to the next merge
window (I presume no rush to get this into the current -rcs, it's a bit
late).

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux