xe generated headers (was: Re: [PATCH] drm/xe/ptl: L3bank mask is not available on the media GT)
Jani Nikula
jani.nikula at linux.intel.com
Wed Oct 9 11:55:59 UTC 2024
On Fri, 04 Oct 2024, Matt Roper <matthew.d.roper at intel.com> wrote:
> diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c
> index 651ba53623e5..df2042db7ee6 100644
> --- a/drivers/gpu/drm/xe/xe_gt_topology.c
> +++ b/drivers/gpu/drm/xe/xe_gt_topology.c
> @@ -5,6 +5,7 @@
>
> #include "xe_gt_topology.h"
>
> +#include <generated/xe_wa_oob.h>
Hijacking the thread here a bit, sorry.
This use of system include path <> instead of "" for xe generated
headers keeps bugging me.
There's a global directory for generated headers, and that's what
<generated/...> usually means. See:
git grep -h "#include <generated/" | sort | uniq
Or look at top level include/generated in the build directory.
Especially putting #include <generated/...> next to #include <linux/...>
implies we're referring to the system generated headers, but we're not.
I think we should be using #include "generated/xe_wa_oob.h" instead,
possibly with a completely different subdirectory name to not have the
name collision and confusion at all.
Another alternative is to do this in the Makefile:
subdir-ccflags-y += -I$(obj)/generated -I$(src)
and just use #include "xe_wa_oob.h" directly. (FWIW this is what msm
does.)
BR,
Jani.
--
Jani Nikula, Intel
More information about the Intel-xe
mailing list