[Intel-xe] [PATCH v2 11/11] drm/xe: Use relative includes for i915_reg_defs.h

Lucas De Marchi lucas.demarchi at intel.com
Tue Feb 21 21:50:26 UTC 2023


On Tue, Feb 21, 2023 at 04:42:08PM -0500, Rodrigo Vivi wrote:
>On Fri, Feb 17, 2023 at 02:30:07PM -0800, Lucas De Marchi wrote:
>> On Fri, Feb 17, 2023 at 03:28:24PM -0500, Rodrigo Vivi wrote:
>> > On Thu, Feb 16, 2023 at 04:52:26PM -0800, Lucas De Marchi wrote:
>> > > With the goal of eliminating i915 includes from xe outside of the
>> > > display area, it's better to use relative includes for the only shared
>> > > header, i915_reg_defs.h.  With this the build system can be changed to
>> > > stop adding i915 as an include dir.
>> > >
>> > > Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>> > > ---
>> > >  drivers/gpu/drm/xe/display/Makefile      | 120 +++++++++++++++++++++++
>> > >  drivers/gpu/drm/xe/regs/xe_engine_regs.h |   2 +-
>> > >  drivers/gpu/drm/xe/regs/xe_gt_regs.h     |   2 +-
>> > >  drivers/gpu/drm/xe/regs/xe_regs.h        |   2 +-
>> > >  drivers/gpu/drm/xe/xe_gt_mcr.h           |   2 +-
>> > >  drivers/gpu/drm/xe/xe_guc.c              |   2 -
>> > >  drivers/gpu/drm/xe/xe_guc_reg.h          |   2 +-
>> > >  drivers/gpu/drm/xe/xe_reg_sr_types.h     |   2 -
>> > >  drivers/gpu/drm/xe/xe_rtp.h              |   2 -
>> > >  drivers/gpu/drm/xe/xe_rtp_types.h        |   2 -
>> > >  10 files changed, 125 insertions(+), 13 deletions(-)
>> > >  create mode 100644 drivers/gpu/drm/xe/display/Makefile
>> > >
>> > > diff --git a/drivers/gpu/drm/xe/display/Makefile b/drivers/gpu/drm/xe/display/Makefile
>> > > new file mode 100644
>> > > index 000000000000..eee576972427
>> > > --- /dev/null
>> > > +++ b/drivers/gpu/drm/xe/display/Makefile
>> >
>> > shouldn't this patch also be modifying the drm/xe/Makefile?
>>
>> sorry, while trying to resolve the display situation I squashed this by
>> mistake here. Next version I'm giving up on the idea in this patch
>> and I will just create a regs/xe_reg_defs.h. That will be the only file
>> with the relative include.
>
>But does this solve your main concern of the i915 directories getting
>included when display build is enabled even for folders that are not
>related to display?

no. Without a refactor on the display integration I couldn't find a
easy way - even if we find a way in the build system to pass the cflags
differently, it will break as the rest of the driver need the display
includes.

I think we'd have to introduce an xe_display and then make xe_display be
the "alias" for drm_i915_private instead of xe_device.  However doing
this may mean I'm doing some work that conflicts with what other people
in CC are doing.  I can try that later if it doesn't really conflict.

So... I decided to keep this cleanup only up to "everything but
display". To make sure this patch series is complete for that goal I
added a hack patch on top removing display. See v3 of this patch series

Lucas De Marchi

>
>>
>> Lucas De Marchi


More information about the Intel-xe mailing list