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: [PATCH RESEND] drm/self_refresh: Don't trigger the entry timer for self refresh work if CRTC state is inactive
Date: Mon, 7 Feb 2022 13:46:17 +0800 [thread overview]
Message-ID: <20220207054617.987811-1-victor.liu@nxp.com> (raw)
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>
---
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;
--
2.25.1
next reply other threads:[~2022-02-07 5:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 5:46 Liu Ying [this message]
2022-03-07 2:33 ` Liu Ying
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=20220207054617.987811-1-victor.liu@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
all inboxes | Powered by JetHome®