From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate
Date: Tue, 4 Jul 2023 13:31:07 +0300 [thread overview]
Message-ID: <20230704103107.11237-3-stanislav.lisovskiy@intel.com> (raw)
In-Reply-To: <20230704103107.11237-1-stanislav.lisovskiy@intel.com>
We are currently having FIFO underruns happening for kms_dsc test case,
problem is that, we check if curreny cdclk is >= pixel rate only if
there is a single VDSC engine enabled(i.e dsc_split=false) however if
we happen to have 2 VDSC engines enabled, we just kinda rely that this
would be automatically enough.
However pixel rate can be even >= than VDSC clock(cdclk) * 2, so in that
case even with 2 VDSC engines enabled, we still need to tweak it up.
So lets compare pixel rate with cdclk * slice count(VDSC engine count) and
check if it still requires bumping up.
Previously we had to bump up CDCLK many times for similar reasons.
v2: - Use new intel_dsc_get_num_vdsc_instances to determine number of VDSC
engines, instead of slice count(Ankit Nautiyal)
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
drivers/gpu/drm/i915/display/intel_cdclk.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 4207863b7b2a..f04cebd01724 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -37,6 +37,7 @@
#include "intel_pci_config.h"
#include "intel_pcode.h"
#include "intel_psr.h"
+#include "intel_vdsc.h"
#include "vlv_sideband.h"
/**
@@ -2607,9 +2608,17 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
* When we decide to use only one VDSC engine, since
* each VDSC operates with 1 ppc throughput, pixel clock
* cannot be higher than the VDSC clock (cdclk)
+ * If there 2 VDSC engines, then pixel clock can't be higher than
+ * VDSC clock(cdclk) * 2. However even that can still be not enough.
+ * Slice count reflects amount of VDSC engines,
+ * so lets use that to determine, if need still need to tweak CDCLK higher.
*/
- if (crtc_state->dsc.compression_enable && !crtc_state->dsc.dsc_split)
- min_cdclk = max(min_cdclk, (int)crtc_state->pixel_rate);
+ if (crtc_state->dsc.compression_enable) {
+ u8 num_vdsc_instances = intel_dsc_get_num_vdsc_instances(crtc_state);
+
+ min_cdclk = max_t(int, min_cdclk,
+ crtc_state->pixel_rate / num_vdsc_instances);
+ }
/*
* HACK. Currently for TGL/DG2 platforms we calculate
--
2.37.3
next prev parent reply other threads:[~2023-07-04 10:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 10:31 [Intel-gfx] [PATCH 0/2] Calculate CDCLK more properly when DSC is enabled Stanislav Lisovskiy
2023-07-04 10:31 ` [Intel-gfx] [PATCH 1/2] drm/i915: Add helper function for getting number of VDSC engines Stanislav Lisovskiy
2023-07-04 12:17 ` Jani Nikula
2023-07-04 10:31 ` Stanislav Lisovskiy [this message]
2023-07-04 11:58 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Calculate CDCLK more properly when DSC is enabled Patchwork
2023-07-04 11:58 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-07-04 12:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-07-04 16:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-07-04 13:17 [Intel-gfx] [PATCH 0/2] " Stanislav Lisovskiy
2023-07-04 13:17 ` [Intel-gfx] [PATCH 2/2] drm/i915: Don't rely that 2 VDSC engines are always enough for pixel rate Stanislav Lisovskiy
2023-07-10 6:07 ` Nautiyal, Ankit K
2023-07-10 8:56 ` Lisovskiy, Stanislav
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=20230704103107.11237-3-stanislav.lisovskiy@intel.com \
--to=stanislav.lisovskiy@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