[Intel-xe] [PATCH 2/2] drm/xe: Remove dependency on intel_engine_regs.h

Lucas De Marchi lucas.demarchi at intel.com
Thu Feb 16 13:51:09 UTC 2023


On Thu, Feb 16, 2023 at 03:06:25PM +0200, Jani Nikula wrote:
>On Tue, 14 Feb 2023, Lucas De Marchi <lucas.demarchi at intel.com> wrote:
>> Create xe_regs/xe_engine_regs.h file with all the registers and bit
>> definitions used by the xe driver. Eventually the registers may be
>> defined in a different way and since xe doesn't supported below gen12,
>> the number of registers touched is much smaller, so create a new header.
>>
>> The definitions themselves are direct copy from the
>> gt/intel_engine_regs.h file, just sorting the registers by address.
>> Cleaning those up and adhering to a common coding style is left for
>> later.
>>
>> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>> ---
>>  drivers/gpu/drm/xe/xe_execlist.c            |  5 +-
>>  drivers/gpu/drm/xe/xe_guc_ads.c             |  6 +-
>>  drivers/gpu/drm/xe/xe_hw_engine.c           |  2 +-
>>  drivers/gpu/drm/xe/xe_lrc.c                 |  3 +-
>>  drivers/gpu/drm/xe/xe_mmio.c                |  2 +-
>>  drivers/gpu/drm/xe/xe_reg_sr.c              |  2 +-
>>  drivers/gpu/drm/xe/xe_reg_whitelist.c       |  3 +-
>>  drivers/gpu/drm/xe/xe_regs/xe_engine_regs.h | 81 +++++++++++++++++++++
>>  drivers/gpu/drm/xe/xe_wa.c                  |  2 +-
>>  9 files changed, 96 insertions(+), 10 deletions(-)
>>  create mode 100644 drivers/gpu/drm/xe/xe_regs/xe_engine_regs.h
>>
>> diff --git a/drivers/gpu/drm/xe/xe_execlist.c b/drivers/gpu/drm/xe/xe_execlist.c
>> index d555d77cbf49..254e1a6688c2 100644
>> --- a/drivers/gpu/drm/xe/xe_execlist.c
>> +++ b/drivers/gpu/drm/xe/xe_execlist.c
>> @@ -3,9 +3,11 @@
>>   * Copyright © 2021 Intel Corporation
>>   */
>>
>> +#include "xe_execlist.h"
>> +
>>  #include <drm/drm_managed.h>
>>
>> -#include "xe_execlist.h"
>> +#include <xe_regs/xe_engine_regs.h>
>
>Why the system include <> instead of ""?

At the time I thought "if this is included from another dir, then it's
not relative".

But... We are using "  for all xe includes: I already changed this to
`#include "regs/xe_engine_regs.h"` in the next version (not sent yet
though)

Lucas De Marchi


More information about the Intel-xe mailing list