diff options
| author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2025-09-19 22:29:50 +0300 |
|---|---|---|
| committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2025-09-23 18:09:30 +0300 |
| commit | 07816e8117a2ecb6a126264f3c16ca02668ca2be (patch) | |
| tree | 4dbd228f9fc687d66e90d5ba6472856ebeecca63 /drivers/gpu | |
| parent | 8ebb8e1a0ef84bc672105d07b8d9fd3ebbda6427 (diff) | |
| download | linux-07816e8117a2ecb6a126264f3c16ca02668ca2be.tar.xz | |
drm/i915: Tweak the read latency fixup code
If WM0 latency is zero we need to bump it (and the WM1+ latencies)
but a fixed amount. But any WM1+ level with zero latency must
not be touched since that indicates that corresponding WM level
isn't supported.
Currently the loop doing that adjustment does work, but only because
the previous loop modified the num_levels used as the loop boundary.
This all seems a bit too fragile. Remove the num_levels adjustment
and instead adjust the read latency loop to abort when it encounters
a zero latency value.
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250919193000.17665-4-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/i915/display/skl_watermark.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c index 2bf334fe63c9..2969cc58dabe 100644 --- a/drivers/gpu/drm/i915/display/skl_watermark.c +++ b/drivers/gpu/drm/i915/display/skl_watermark.c @@ -3198,8 +3198,6 @@ adjust_wm_latency(struct intel_display *display, if (wm[level] == 0) { for (i = level + 1; i < num_levels; i++) wm[i] = 0; - - num_levels = level; break; } } @@ -3212,8 +3210,14 @@ adjust_wm_latency(struct intel_display *display, * from the punit when level 0 response data is 0us. */ if (wm[0] == 0) { - for (level = 0; level < num_levels; level++) + wm[0] += read_latency; + + for (level = 1; level < num_levels; level++) { + if (wm[level] == 0) + break; + wm[level] += read_latency; + } } /* |
