[PATCH] drm/i915/gmbus: Add Wa_16025573575 for PTL for bit-bashing
Gustavo Sousa
gustavo.sousa at intel.com
Fri Jun 13 10:23:37 UTC 2025
Quoting Jani Nikula (2025-06-13 06:13:55-03:00)
>On Fri, 13 Jun 2025, "Nautiyal, Ankit K" <ankit.k.nautiyal at intel.com> wrote:
>> On 6/12/2025 5:30 PM, Gustavo Sousa wrote:
>>> Instead of open-coding the conditions for the workaround in three
>>> different places in the file, I think we should have a function
>>> needs_wa_16025573575() and use it.
>>>
>>> Also, note that the workaround is also required for WCL (display version
>>> 30.02), and we would then include that in needs_wa_16025573575().
>>
>> I agree, will make a separate function needs_wa_16025573575().
>>
>> Thanks for the suggestions. I will make suggested changes in next revision.
>
>Please let's aim for something a little more generic and unified than
>that, and one that can be easily extended and switched to a generated
>version in the future.
>
>intel_display_wa.h:
>
>enum intel_display_wa {
> INTEL_DISPLAY_WA_16025573575,
>};
>
>bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa);
>
>#define intel_display_wa(__display, __wa) __intel_display_wa((__display), INTEL_DISPLAY_WA_ ## __wa)
>
>In code you'd use:
>
> if (intel_display_wa(display, 16025573575))
Yep. Sounds good.
>
>For now, you'd manually check for each enum in __intel_display_wa()
>implementation, but in the future that code could be generated similar
>to what xe currently has. I'm just not very enthusiastic about adding C
>language hostprogs with custom .rules files and parsing.
Hehe. Yeah. I'm wondering if something nice could be achieved with
header files and cpp magic...
--
Gustavo Sousa
More information about the Intel-xe
mailing list