From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 9/9] drm/i915: Neuter cdclk_prefill_adjustment()
Date: Mon, 13 Oct 2025 23:12:36 +0300 [thread overview]
Message-ID: <20251013201236.30084-10-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20251013201236.30084-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
cdclk_prefill_adjustment() currently uses a stale cdclk
value. And even if it was using the correct value it'd
still just 'return 1' because the ratio that it's
calculating is always <= 1.0, and it just rounds the ratio
into an integer (and clamps the result to a maximum of 1).
So for the moment, let's just 'return 1' since that's what
the code ends up doing anyway.
This is actually safe because 1.0 is the worst case (ie. slowest
prefill) and thus the actual prefill is always guaranteed to be
at least as fast as what we assumed during the check.
We'll replace this soon with something that gives more accurate
estimates.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/skl_watermark.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 9df9ee137bf9..1b062c6c0e03 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -2148,19 +2148,7 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state,
static int
cdclk_prefill_adjustment(const struct intel_crtc_state *crtc_state)
{
- struct intel_display *display = to_intel_display(crtc_state);
- struct intel_atomic_state *state =
- to_intel_atomic_state(crtc_state->uapi.state);
- const struct intel_cdclk_state *cdclk_state;
-
- cdclk_state = intel_atomic_get_cdclk_state(state);
- if (IS_ERR(cdclk_state)) {
- drm_WARN_ON(display->drm, PTR_ERR(cdclk_state));
- return 1;
- }
-
- return min(1, DIV_ROUND_UP(crtc_state->pixel_rate,
- 2 * intel_cdclk_logical(cdclk_state)));
+ return 1;
}
static int
--
2.49.1
next prev parent reply other threads:[~2025-10-13 20:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 20:12 [PATCH 0/9] drm/i915: Reorder cdclk stuff for vblank/guardband length checks Ville Syrjala
2025-10-13 20:12 ` [PATCH 1/9] drm/i915/bw: Untangle dbuf bw from the sagv/mem bw stuff Ville Syrjala
2025-10-16 10:39 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 2/9] drm/i915: s/"not not"/"not"/ Ville Syrjala
2025-10-16 10:41 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 3/9] drm/i915/bw: Relocate intel_bw_crtc_min_cdclk() Ville Syrjala
2025-10-16 10:43 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 4/9] drm/i915/ips: Eliminate the cdclk_state stuff from hsw_ips_compute_config() Ville Syrjala
2025-10-16 10:57 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 5/9] drm/i915/fbc: Decouple FBC from intel_cdclk_atomic_check() Ville Syrjala
2025-10-16 11:40 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 6/9] drm/i915: s/min_cdck[]/plane_min_cdclk[]/ Ville Syrjala
2025-10-16 11:44 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 7/9] drm/i915: Compute per-crtc min_cdclk earlier Ville Syrjala
2025-10-16 11:56 ` Kahola, Mika
2025-10-13 20:12 ` [PATCH 8/9] drm/i915: Include the per-crtc minimum cdclk in the crtc state dump Ville Syrjala
2025-10-16 11:56 ` Kahola, Mika
2025-10-13 20:12 ` Ville Syrjala [this message]
2025-10-16 11:59 ` [PATCH 9/9] drm/i915: Neuter cdclk_prefill_adjustment() Kahola, Mika
2025-10-14 0:16 ` ✗ CI.checkpatch: warning for drm/i915: Reorder cdclk stuff for vblank/guardband length checks Patchwork
2025-10-14 0:17 ` ✓ CI.KUnit: success " Patchwork
2025-10-14 0:32 ` ✗ CI.checksparse: warning " Patchwork
2025-10-14 0:58 ` ✓ Xe.CI.BAT: success " Patchwork
2025-10-14 8:53 ` ✗ Xe.CI.Full: failure " Patchwork
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=20251013201236.30084-10-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.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