Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jouni Högander" <jouni.hogander@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: imre.deak@intel.com, animesh.manna@intel.com,
	"Jouni Högander" <jouni.hogander@intel.com>
Subject: [PATCH v2 4/4] drm/i915/psr: Do not wait for PSR being idle on on Panel Replay
Date: Fri,  6 Sep 2024 10:00:33 +0300	[thread overview]
Message-ID: <20240906070033.289015-5-jouni.hogander@intel.com> (raw)
In-Reply-To: <20240906070033.289015-1-jouni.hogander@intel.com>

We do not have ALPM on DP Panel Replay. Due to this SRD_STATUS[SRD State]
doesn't change from SRDENT_ON after Panel Replay is enabled until it gets
disabled.

On eDP Panel Replay DEEP_SLEEP is not reached.
_psr2_ready_for_pipe_update_locked is waiting DEEP_SLEEP bit getting reset.

Take these into account in Panel Replay code by not waiting PSR getting
idle after enabling VBI.

Fixes: 29fb595d4875 ("drm/i915/psr: Panel replay uses SRD_STATUS to track it's status")
Cc: Animesh Manna <animesh.manna@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 581c409ce7309..1a4ef231a53ca 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2786,13 +2786,6 @@ static int _psr1_ready_for_pipe_update_locked(struct intel_dp *intel_dp)
 				       EDP_PSR_STATUS_STATE_MASK, 50);
 }
 
-static int _panel_replay_ready_for_pipe_update_locked(struct intel_dp *intel_dp)
-{
-	return intel_dp_is_edp(intel_dp) ?
-		_psr2_ready_for_pipe_update_locked(intel_dp) :
-		_psr1_ready_for_pipe_update_locked(intel_dp);
-}
-
 /**
  * intel_psr_wait_for_idle_locked - wait for PSR be ready for a pipe update
  * @new_crtc_state: new CRTC state
@@ -2815,12 +2808,10 @@ void intel_psr_wait_for_idle_locked(const struct intel_crtc_state *new_crtc_stat
 
 		lockdep_assert_held(&intel_dp->psr.lock);
 
-		if (!intel_dp->psr.enabled)
+		if (!intel_dp->psr.enabled || intel_dp->psr.panel_replay_enabled)
 			continue;
 
-		if (intel_dp->psr.panel_replay_enabled)
-			ret = _panel_replay_ready_for_pipe_update_locked(intel_dp);
-		else if (intel_dp->psr.sel_update_enabled)
+		if (intel_dp->psr.sel_update_enabled)
 			ret = _psr2_ready_for_pipe_update_locked(intel_dp);
 		else
 			ret = _psr1_ready_for_pipe_update_locked(intel_dp);
-- 
2.34.1


  parent reply	other threads:[~2024-09-06  7:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06  7:00 [PATCH v2 0/4] DP2.1 Panel Replay Fixes Jouni Högander
2024-09-06  7:00 ` [PATCH v2 1/4] drm/i915/display: Handle MST connector in intel_attached_dp Jouni Högander
2024-09-06 10:51   ` Imre Deak
2024-09-06  7:00 ` [PATCH v2 2/4] drm/i915/display: Use intel_attached_dp instead of local implementation Jouni Högander
2024-09-06 10:51   ` Imre Deak
2024-09-06  7:00 ` [PATCH v2 3/4] drm/i915/psr: Add connector debugfs files for MST connector as well Jouni Högander
2024-09-06  7:00 ` Jouni Högander [this message]
2024-09-10  7:24   ` [PATCH v2 4/4] drm/i915/psr: Do not wait for PSR being idle on on Panel Replay Manna, Animesh
2024-09-11 10:04     ` Hogander, Jouni
2024-09-06  8:01 ` ✗ Fi.CI.SPARSE: warning for DP2.1 Panel Replay Fixes (rev2) Patchwork
2024-09-06  8:21 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-09-09  5:13 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-10 16:50 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-09-11  9:30   ` Hogander, Jouni

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=20240906070033.289015-5-jouni.hogander@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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