From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org,
Sebastian Reichel <sre@kernel.org>
Subject: Re: [PATCHv2] drm/omap: dsi: Fix PM for display blank with paired dss_pll calls
Date: Fri, 8 Feb 2019 11:11:24 +0200 [thread overview]
Message-ID: <d22d93aa-fd90-57e9-adfd-3ece2f3a2db7@ti.com> (raw)
In-Reply-To: <20190207154516.57549-1-tony@atomide.com>
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@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>
> ---
>
> 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-02-08 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-07 15:45 [PATCHv2] drm/omap: dsi: Fix PM for display blank with paired dss_pll calls Tony Lindgren
2019-02-08 9:11 ` Tomi Valkeinen [this message]
2019-02-08 15:23 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d22d93aa-fd90-57e9-adfd-3ece2f3a2db7@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-omap@vger.kernel.org \
--cc=sre@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox