On 6/13/2025 2:43 PM, Jani Nikula wrote:
On Fri, 13 Jun 2025, "Nautiyal, Ankit K" <[email protected]> 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.
Hmm. I had sent something like that for another WA. I think I jumped the
gun at that time by using the XE_WA framework directly :) [1]
I can make the suggested changes and send again.
[1] https://patchwork.freedesktop.org/patch/612661/?series=138257&rev=1
Regards,
Ankit
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))
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.
BR,
Jani.