All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/adl_p: Increase CDCLK by 15% if PSR2 is used
@ 2022-03-21 10:49 Stanislav Lisovskiy
  2022-03-21 11:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/adl_p: Increase CDCLK by 15% if PSR2 is used (rev2) Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Stanislav Lisovskiy @ 2022-03-21 10:49 UTC (permalink / raw)
  To: intel-gfx

We are currently getting FIFO underruns, in particular
when PSR2 is enabled. There seem to be no existing workaround
or patches, which can fix that issue(were expecting some recent
selective fetch update and DBuf bw/SAGV fixes to help,
which unfortunately didn't).
Current idea is that it looks like for some reason the
DBuf prefill time isn't enough once we exit PSR2, despite its
theoretically correct.
So bump it up a bit by 15%(minimum experimental amount required
to get it working), if PSR2 is enabled.
For PSR1 there is no need in this hack, so we limit it only
to PSR2 and Alderlake.

v2: - Added comment(Jose Souza)
    - Fixed 15% calculation(Jose Souza)

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_cdclk.c | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 8888fda8b701..92d57869983a 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -2325,6 +2325,32 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
 					dev_priv->max_cdclk_freq));
 	}
 
+
+	/*
+	 * HACK.  We are getting FIFO underruns, in particular
+	 * when PSR2 is enabled. There seem to be no existing workaround
+	 * or patches as of now.
+	 * Current idea is that it looks like for some reason the
+	 * DBuf prefill time isn't enough once we exit PSR2, despite its
+	 * theoretically correct.
+	 * So bump it up a bit by 15%(minimum experimental amount required
+	 * to get it working), if PSR2 is enabled.
+	 * For PSR1 there is no need in this hack, so we limit it only
+	 * to PSR2 and Alderlake.
+	 */
+	if (IS_ALDERLAKE_P(dev_priv)) {
+		struct intel_encoder *encoder;
+
+		for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
+			struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+
+			if (intel_dp->psr.psr2_enabled) {
+				min_cdclk = DIV_ROUND_UP(min_cdclk * 115, 100);
+				break;
+			}
+		}
+	}
+
 	if (min_cdclk > dev_priv->max_cdclk_freq) {
 		drm_dbg_kms(&dev_priv->drm,
 			    "required cdclk (%d kHz) exceeds max (%d kHz)\n",
-- 
2.24.1.485.gad05a3d8e5


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-03-29 13:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 10:49 [Intel-gfx] [PATCH] drm/i915/adl_p: Increase CDCLK by 15% if PSR2 is used Stanislav Lisovskiy
2022-03-21 11:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/adl_p: Increase CDCLK by 15% if PSR2 is used (rev2) Patchwork
2022-03-21 11:40 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-21 14:39 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-21 16:58 ` [Intel-gfx] [PATCH] drm/i915/adl_p: Increase CDCLK by 15% if PSR2 is used Souza, Jose
2022-03-22  7:48   ` Lisovskiy, Stanislav
2022-03-22 13:16     ` Souza, Jose
2022-03-22 13:30       ` Lisovskiy, Stanislav
2022-03-22 13:34         ` Souza, Jose
2022-03-21 17:01 ` Souza, Jose
2022-03-22  7:49   ` Lisovskiy, Stanislav
2022-03-22 13:36     ` Souza, Jose
2022-03-29 13:10       ` Lisovskiy, Stanislav
2022-03-29 13:24         ` Souza, Jose
2022-03-29 13:53           ` Lisovskiy, Stanislav
2022-03-22 13:55 ` [Intel-gfx] " Mark Pearson
2022-03-22 14:18   ` Lisovskiy, Stanislav
2022-03-22 14:23     ` [Intel-gfx] [External] " Mark Pearson
2022-03-23 15:47       ` Souza, Jose

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.