All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: Dafna Hirschfeld <dhirschfeld@habana.ai>,
	intel-xe@lists.freedesktop.org, ogabbay@kernel.org,
	obitton@habana.ai, lucas.demarchi@intel.com
Subject: Re: [PATCH v2] drm/xe: Do not include current dir for generated/xe_wa_oob.h
Date: Mon, 26 Feb 2024 17:43:15 +0200	[thread overview]
Message-ID: <875xybmdt8.fsf@intel.com> (raw)
In-Reply-To: <CAK7LNASkdW6d77bfoSV36mUmZtYuUvwyMn653N1tZg3q7gM60A@mail.gmail.com>

On Mon, 26 Feb 2024, Masahiro Yamada <masahiroy@kernel.org> wrote:
> On Mon, Feb 26, 2024 at 9:19 PM Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>
>> On Wed, 21 Feb 2024, Dafna Hirschfeld <dhirschfeld@habana.ai> wrote:
>> > The generated file 'generated/xe_wa_oob.h' is included using:
>> > "generated/xe_wa_oob.h"
>> > which first look inside the source code. But the file resides
>> > in the build directory and should therefore be included using:
>> > <generated/xe_wa_oob.h>
>>
>> Is this documented anywhere?
>>
>> Is "generated" as a name special?
>
>
> No.
>
>
> It works because drivers/gpu/drm/xe/Makefile
> has this line:
>
>   subdir-ccflags-y += -I$(obj) -I$(srctree)/$(src)
>
>
>
>
> generated/xe_wa_oob.h is relative to the
> include path -I$(obj).
>
>
> Hence, #include <generated/xe_wa_oob.h> can
> include $(obj)/generated/xe_wa_oob.h

Thanks!

I guess the only real difference here would be if there was a
$(src)/generated/xe_wa_oob.h, which would be found first if double
quotes "" were used.

It's just that using angle brackets <> for something that isn't under
the top level include hierarchy feels wrong to me.

BR,
Jani.

>
>>
>> Cc: Masahiro.
>>
>>
>> BR,
>> Jani.
>>
>>
>> >
>> > Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
>> > Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
>> >
>> > ---
>> > v2 changes: add newline, change patch title
>> >
>> >  drivers/gpu/drm/xe/xe_gsc.c            | 3 ++-
>> >  drivers/gpu/drm/xe/xe_guc.c            | 3 ++-
>> >  drivers/gpu/drm/xe/xe_migrate.c        | 3 ++-
>> >  drivers/gpu/drm/xe/xe_ring_ops.c       | 3 ++-
>> >  drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c | 3 ++-
>> >  drivers/gpu/drm/xe/xe_vm.c             | 3 ++-
>> >  drivers/gpu/drm/xe/xe_wa.c             | 3 ++-
>> >  7 files changed, 14 insertions(+), 7 deletions(-)
>> >
>> > diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c
>> > index 0b90fd9ef63a..a61994292c43 100644
>> > --- a/drivers/gpu/drm/xe/xe_gsc.c
>> > +++ b/drivers/gpu/drm/xe/xe_gsc.c
>> > @@ -7,8 +7,9 @@
>> >
>> >  #include <drm/drm_managed.h>
>> >
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "abi/gsc_mkhi_commands_abi.h"
>> > -#include "generated/xe_wa_oob.h"
>> >  #include "xe_bb.h"
>> >  #include "xe_bo.h"
>> >  #include "xe_device.h"
>> > diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>> > index 868208a39829..fa217f5a386e 100644
>> > --- a/drivers/gpu/drm/xe/xe_guc.c
>> > +++ b/drivers/gpu/drm/xe/xe_guc.c
>> > @@ -7,9 +7,10 @@
>> >
>> >  #include <drm/drm_managed.h>
>> >
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "abi/guc_actions_abi.h"
>> >  #include "abi/guc_errors_abi.h"
>> > -#include "generated/xe_wa_oob.h"
>> >  #include "regs/xe_gt_regs.h"
>> >  #include "regs/xe_guc_regs.h"
>> >  #include "xe_bo.h"
>> > diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
>> > index 3d2438dc86ee..a66fdf2d2991 100644
>> > --- a/drivers/gpu/drm/xe/xe_migrate.c
>> > +++ b/drivers/gpu/drm/xe/xe_migrate.c
>> > @@ -12,7 +12,8 @@
>> >  #include <drm/ttm/ttm_tt.h>
>> >  #include <drm/xe_drm.h>
>> >
>> > -#include "generated/xe_wa_oob.h"
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "instructions/xe_mi_commands.h"
>> >  #include "regs/xe_gpu_commands.h"
>> >  #include "tests/xe_test.h"
>> > diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
>> > index d5e9621428ef..c4edffcd4a32 100644
>> > --- a/drivers/gpu/drm/xe/xe_ring_ops.c
>> > +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
>> > @@ -5,7 +5,8 @@
>> >
>> >  #include "xe_ring_ops.h"
>> >
>> > -#include "generated/xe_wa_oob.h"
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "instructions/xe_mi_commands.h"
>> >  #include "regs/xe_engine_regs.h"
>> >  #include "regs/xe_gpu_commands.h"
>> > diff --git a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
>> > index 662f1e9bfc65..3107d2a12426 100644
>> > --- a/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
>> > +++ b/drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c
>> > @@ -11,7 +11,8 @@
>> >  #include <drm/ttm/ttm_placement.h>
>> >  #include <drm/ttm/ttm_range_manager.h>
>> >
>> > -#include "generated/xe_wa_oob.h"
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "regs/xe_gt_regs.h"
>> >  #include "regs/xe_regs.h"
>> >  #include "xe_bo.h"
>> > diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
>> > index 836a6e849cda..efe9a0d300c0 100644
>> > --- a/drivers/gpu/drm/xe/xe_vm.c
>> > +++ b/drivers/gpu/drm/xe/xe_vm.c
>> > @@ -18,6 +18,8 @@
>> >  #include <linux/mm.h>
>> >  #include <linux/swap.h>
>> >
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "xe_assert.h"
>> >  #include "xe_bo.h"
>> >  #include "xe_device.h"
>> > @@ -34,7 +36,6 @@
>> >  #include "xe_res_cursor.h"
>> >  #include "xe_sync.h"
>> >  #include "xe_trace.h"
>> > -#include "generated/xe_wa_oob.h"
>> >  #include "xe_wa.h"
>> >
>> >  static struct drm_gem_object *xe_vm_obj(struct xe_vm *vm)
>> > diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
>> > index 3299130ba10a..a0264eedd443 100644
>> > --- a/drivers/gpu/drm/xe/xe_wa.c
>> > +++ b/drivers/gpu/drm/xe/xe_wa.c
>> > @@ -9,7 +9,8 @@
>> >  #include <kunit/visibility.h>
>> >  #include <linux/compiler_types.h>
>> >
>> > -#include "generated/xe_wa_oob.h"
>> > +#include <generated/xe_wa_oob.h>
>> > +
>> >  #include "regs/xe_engine_regs.h"
>> >  #include "regs/xe_gt_regs.h"
>> >  #include "regs/xe_regs.h"
>>
>> --
>> Jani Nikula, Intel

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-02-26 15:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  8:36 [PATCH v2] drm/xe: Do not include current dir for generated/xe_wa_oob.h Dafna Hirschfeld
2024-02-21  8:42 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-21  8:42 ` ✓ CI.checkpatch: " Patchwork
2024-02-21  8:43 ` ✓ CI.KUnit: " Patchwork
2024-02-21  8:53 ` ✓ CI.Build: " Patchwork
2024-02-21  8:54 ` ✓ CI.Hooks: " Patchwork
2024-02-21  8:55 ` ✓ CI.checksparse: " Patchwork
2024-02-21  9:15 ` ✓ CI.BAT: " Patchwork
2024-02-22  7:04 ` [PATCH v2] " Lucas De Marchi
2024-02-26 12:19 ` Jani Nikula
2024-02-26 14:25   ` Masahiro Yamada
2024-02-26 15:43     ` Jani Nikula [this message]
2024-02-26 16:17       ` Lucas De Marchi
2024-02-29 19:40         ` Dafna Hirschfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875xybmdt8.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=dhirschfeld@habana.ai \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=masahiroy@kernel.org \
    --cc=obitton@habana.ai \
    --cc=ogabbay@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.