From: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: [RFC v1 4/4] display/vrr: Update guardband based on enabled latency
Date: Tue, 12 Nov 2024 14:20:39 +0530 [thread overview]
Message-ID: <20241112085039.1258860-5-mitulkumar.ajitkumar.golani@intel.com> (raw)
In-Reply-To: <20241112085039.1258860-1-mitulkumar.ajitkumar.golani@intel.com>
Instead of computing guardband to max vblank, account for
the differenct feature latency.
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
---
drivers/gpu/drm/i915/display/intel_vrr.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index 19a5d0076bb8..de5113ab018b 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -10,7 +10,12 @@
#include "intel_display_types.h"
#include "intel_vrr.h"
#include "intel_vrr_regs.h"
+#include "skl_watermark_regs.h"
+#include "intel_crtc.h"
#include "intel_dp.h"
+#include "intel_psr.h"
+#include "skl_watermark.h"
+#include "skl_scaler.h"
#define FIXED_POINT_PRECISION 100
#define CMRR_PRECISION_TOLERANCE 10
@@ -255,8 +260,17 @@ void intel_vrr_compute_config_late(struct intel_crtc_state *crtc_state)
return;
if (DISPLAY_VER(display) >= 13) {
- crtc_state->vrr.guardband =
- crtc_state->vrr.vmin + 1 - adjusted_mode->crtc_vblank_start;
+ int sagv_block_time_in_scanline =
+ intel_usecs_to_scanlines(&crtc_state->hw.adjusted_mode,
+ display->sagv.block_time_us);
+ /*
+ * TODO: DSC , PKGC and SDP latency to be computed
+ */
+ crtc_state->vrr.guardband = MAX(crtc_state->framestart_delay +
+ skl_calc_scaler_prefill_latency(crtc_state) +
+ skl_calc_wm0_prefill_latency(crtc_state) +
+ sagv_block_time_in_scanline,
+ intel_psr2_calc_prefill(crtc_state));
} else {
crtc_state->vrr.pipeline_full =
min(255, crtc_state->vrr.vmin - adjusted_mode->crtc_vblank_start -
--
2.46.0
next prev parent reply other threads:[~2024-11-12 8:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 8:50 [RFC v1 0/4] Update VRR guardband for HRR panel Mitul Golani
2024-11-12 8:50 ` [RFC v1 1/4] drm/i915/scaler: Calculate scaler prefill latency Mitul Golani
2024-11-28 9:31 ` Garg, Nemesa
2024-11-12 8:50 ` [RFC v1 2/4] drm/i915/watermark: Add WM0 " Mitul Golani
2024-11-12 8:50 ` [RFC v1 3/4] drm/i915/psr: Add latency for PSR Mitul Golani
2024-11-12 8:50 ` Mitul Golani [this message]
2024-11-12 9:31 ` ✓ CI.Patch_applied: success for Update VRR guardband for HRR panel Patchwork
2024-11-12 9:31 ` ✓ CI.checkpatch: " Patchwork
2024-11-12 9:32 ` ✓ CI.KUnit: " Patchwork
2024-11-12 9:44 ` ✓ CI.Build: " Patchwork
2024-11-12 9:46 ` ✓ CI.Hooks: " Patchwork
2024-11-12 9:47 ` ✗ CI.checksparse: warning " Patchwork
2024-11-12 10:21 ` ✓ CI.BAT: success " Patchwork
2024-11-12 11:30 ` ✗ CI.FULL: failure " Patchwork
2024-11-22 7:53 ` [RFC v1 0/4] " Ville Syrjälä
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=20241112085039.1258860-5-mitulkumar.ajitkumar.golani@intel.com \
--to=mitulkumar.ajitkumar.golani@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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