Quoting Kandpal, Suraj (2025-11-12 00:46:59-03:00)
>> Subject: [PATCH v4 01/11] drm/i915/wm: Do not make latency values monotonic
>> on Xe3 onward
>> 
>> The Windows driver is rejecting non-monotonic ranges latency values for Xe3.
>> Let's make sure that we do not call make_wm_latency_monotonic() for Xe3 and
>> beyond.
>
>Idt saying we are doing It because Windows driver is doing it is the correct 
>reason to do this.
>This may very well be needed but I think its better to add the right reason 
>here.

Yeah, that's fair.  Maybe Ville can provide more details here.

Also note that there is some discussion[1] on v3 of the series (v4 was
posted here because of an imminent unavailability of my part).

[1] https://lore.kernel.org/all/[email protected]/

>Also Bspec no. at trailer if available.

I am not sure there is a good Bspec number to refer to here. :-\

>
>Rest looks good to me

Thanks!

--
Gustavo Sousa

>
>Regards,
>Suraj Kandpal
>
>> 
>> Also, because of that, let's add a check at the end of
>> adjust_wm_latency() to ensure we raise a warning if the final list of 
>> latency values
>> is not monotonic.
>> 
>> Cc: Ville Syrjälä <[email protected]>
>> Suggested-by: Ville Syrjälä <[email protected]>
>> Signed-off-by: Gustavo Sousa <[email protected]>
>> ---
>>  drivers/gpu/drm/i915/display/skl_watermark.c | 17 ++++++++++++++++-
>>  1 file changed, 16 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c
>> b/drivers/gpu/drm/i915/display/skl_watermark.c
>> index 36a266f882d1..ed55fe84e930 100644
>> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
>> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
>> @@ -3218,6 +3218,18 @@ static void make_wm_latency_monotonic(struct
>> intel_display *display)
>>          }
>>  }
>> 
>> +static bool is_wm_latency_monotonic(struct intel_display *display) {
>> +        u16 *wm = display->wm.skl_latency;
>> +        int level, num_levels = display->wm.num_levels;
>> +
>> +        for (level = 1; level < num_levels; level++)
>> +                if (wm[level] < wm[level - 1])
>> +                        return false;
>> +
>> +        return true;
>> +}
>> +
>>  static void
>>  adjust_wm_latency(struct intel_display *display)  { @@ -3228,7 +3240,8 @@
>> adjust_wm_latency(struct intel_display *display)
>> 
>>          sanitize_wm_latency(display);
>> 
>> -        make_wm_latency_monotonic(display);
>> +        if (DISPLAY_VER(display) < 30)
>> +                make_wm_latency_monotonic(display);
>> 
>>          /*
>>           * WaWmMemoryReadLatency
>> @@ -3248,6 +3261,8 @@ adjust_wm_latency(struct intel_display *display)
>>           */
>>          if (need_16gb_dimm_wa(display))
>>                  increase_wm_latency(display, 1);
>> +
>> +        drm_WARN_ON(display->drm, !is_wm_latency_monotonic(display));
>>  }
>> 
>>  static void mtl_read_wm_latency(struct intel_display *display)
>> 
>> --
>> 2.51.0
>

Reply via email to