[PATCH v5 1/6] drm/xe: add xe_device_wa infrastructure
Lucas De Marchi
lucas.demarchi at intel.com
Wed Jul 2 22:23:03 UTC 2025
On Wed, Jul 02, 2025 at 03:09:19PM -0700, Matt Atwood wrote:
>On Wed, Jul 02, 2025 at 04:57:34PM -0500, Lucas De Marchi wrote:
>> On Wed, Jul 02, 2025 at 12:30:31PM -0700, Matt Atwood wrote:
>> > There are some workarounds that must be applied before gt init,
>> > wa_150154044425 for example. Instead of sprinkling them conditionally
>> > throughout the driver as we did for i915 generate an oob.rules file
>> > reusing the RTP infrastructure to make these easier to track.
>> >
>> > v2: rename xe_soc_wa to xe_device_wa
>> > v5: derive prefix from argument rather then hard coding the values.
>> >
>> > Signed-off-by: Matt Atwood <matthew.s.atwood at intel.com>
>> > ---
>> > drivers/gpu/drm/xe/Makefile | 11 ++++++-
>> > drivers/gpu/drm/xe/xe_device_wa_oob.rules | 0
>> > drivers/gpu/drm/xe/xe_gen_wa_oob.c | 38 ++++++++++++++++++-----
>> > 3 files changed, 41 insertions(+), 8 deletions(-)
>> > create mode 100644 drivers/gpu/drm/xe/xe_device_wa_oob.rules
>> >
>> > diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
>> > index 1d97e5b63f4e..48d4aa9d4ecc 100644
>> > --- a/drivers/gpu/drm/xe/Makefile
>> > +++ b/drivers/gpu/drm/xe/Makefile
>> > @@ -21,6 +21,15 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
>> > $(src)/xe_wa_oob.rules
>> > $(call cmd,wa_oob)
>> >
>> > +generated_device_oob := $(obj)/generated/xe_device_wa_oob.c $(obj)/generated/xe_device_wa_oob.h
>> > +quiet_cmd_device_wa_oob = GEN $(notdir $(generated_device_oob))
>> > + cmd_device_wa_oob = mkdir -p $(@D); $^ $(generated_device_oob)
>> > +$(obj)/generated/%_device_wa_oob.c $(obj)/generated/%_device_wa_oob.h: $(obj)/xe_gen_wa_oob \
>> > + $(src)/xe_device_wa_oob.rules
>> > + $(call cmd,device_wa_oob)
>> > +
>> > +
>> > +
>>
>> drop these several newlines.
>Ack
>>
>> > # Please keep these build lists sorted!
>> >
>> > # core driver code
>> > @@ -340,4 +349,4 @@ $(obj)/%.hdrtest: $(src)/%.h FORCE
>> > $(call if_changed_dep,hdrtest)
>> >
>> > uses_generated_oob := $(addprefix $(obj)/, $(xe-y))
>> > -$(uses_generated_oob): $(obj)/generated/xe_wa_oob.h
>> > +$(uses_generated_oob): $(obj)/generated/xe_wa_oob.h $(obj)/generated/xe_device_wa_oob.h
>> > diff --git a/drivers/gpu/drm/xe/xe_device_wa_oob.rules b/drivers/gpu/drm/xe/xe_device_wa_oob.rules
>> > new file mode 100644
>> > index 000000000000..e69de29bb2d1
>> > diff --git a/drivers/gpu/drm/xe/xe_gen_wa_oob.c b/drivers/gpu/drm/xe/xe_gen_wa_oob.c
>> > index ed9183599e31..341840926f60 100644
>> > --- a/drivers/gpu/drm/xe/xe_gen_wa_oob.c
>> > +++ b/drivers/gpu/drm/xe/xe_gen_wa_oob.c
>>
>> All the changes in this files should be a prep commit: they can be done
>> regardless of having device_wa_oob
>So split out the make file change in addition? or move the makefile
>changes to the following commit?
the change in the Makefile is only for adding the device_wa, so should
be in the second commit.
>> did you find any issue with strlcpy? I think it's available on all
>> toolchains, but maybe we need the workaround by including tools/include/linux/string.h
>> I tried the diff above locally and it worked for me though.
>strlcpy isnt currently supported in the distribution recommended for
did you check tools/include/linux/string.h I mentioned? How does perf
use it since forever and it moved to a common location in 2015? yes, it
may be that we will need to link string.o to get the weak symbol it
defines.
commit ce99091730c92bf560712baa0696ea5a461b1fe8
Refs: v4.4-rc5-165-gce99091730c92
Author: Josh Poimboeuf <jpoimboe at kernel.org>
AuthorDate: Tue Dec 15 09:39:33 2015 -0600
Commit: Arnaldo Carvalho de Melo <acme at redhat.com>
CommitDate: Wed Dec 16 16:09:39 2015 -0300
perf tools: Move strlcpy() from perf to tools/lib/string.c
Lucas De Marchi
More information about the Intel-xe
mailing list