linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Ying <victor.liu@nxp.com>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: linux-imx@nxp.com, Rob Clark <robdclark@chromium.org>,
	Sean Paul <seanpaul@chromium.org>, Zain Wang <wzz@rock-chips.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH RESEND] drm/self_refresh: Don't trigger the entry timer for self refresh work if CRTC state is inactive
Date: Mon, 07 Mar 2022 10:33:41 +0800	[thread overview]
Message-ID: <9ac021dcf3c6a7a3dfa3d88dfcde18fac8a74243.camel@nxp.com> (raw)
In-Reply-To: <20220207054617.987811-1-victor.liu@nxp.com>

On Mon, 2022-02-07 at 13:46 +0800, Liu Ying wrote:
> If the CRTC state is already inactive, it doesn't make sense to trigger
> the entry timer for self refresh work to make the display enter self
> refresh mode, because the disabled CRTC hints that either the entire
> display pipeline is disabled or the previous atomic commit is triggered
> by the self refresh work(the CRTC is disabled, while the relevant encoder
> and bridges could be disabled or not depending on the drivers).
> 
> Cc: Rob Clark <robdclark@chromium.org>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Zain Wang <wzz@rock-chips.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Liu Ying <victor.liu@nxp.com>

Gentle ping...

Thanks,
Liu Ying

> ---
>  drivers/gpu/drm/drm_self_refresh_helper.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_self_refresh_helper.c b/drivers/gpu/drm/drm_self_refresh_helper.c
> index dd33fec5aabd..e76eb3cd22c7 100644
> --- a/drivers/gpu/drm/drm_self_refresh_helper.c
> +++ b/drivers/gpu/drm/drm_self_refresh_helper.c
> @@ -204,8 +204,12 @@ void drm_self_refresh_helper_alter_state(struct drm_atomic_state *state)
>  		struct drm_self_refresh_data *sr_data;
>  		unsigned int delay;
>  
> -		/* Don't trigger the entry timer when we're already in SR */
> -		if (crtc_state->self_refresh_active)
> +		/*
> +		 * Don't trigger the entry timer when we're already inactive.
> +		 * Note that the inactive state hints that either we're already
> +		 * in SR or the entire display pipeline is already disabled.
> +		 */
> +		if (!crtc_state->active)
>  			continue;
>  
>  		sr_data = crtc->self_refresh_data;


      reply	other threads:[~2022-03-07  2:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  5:46 [PATCH RESEND] drm/self_refresh: Don't trigger the entry timer for self refresh work if CRTC state is inactive Liu Ying
2022-03-07  2:33 ` Liu Ying [this message]

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=9ac021dcf3c6a7a3dfa3d88dfcde18fac8a74243.camel@nxp.com \
    --to=victor.liu@nxp.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=robdclark@chromium.org \
    --cc=seanpaul@chromium.org \
    --cc=tzimmermann@suse.de \
    --cc=wzz@rock-chips.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;
as well as URLs for NNTP newsgroup(s).