Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v7 2/7] lib/xe: Introduce Xe library
Date: Fri, 10 Mar 2023 07:41:35 +0100	[thread overview]
Message-ID: <20230310074135.5609c2a8@maurocar-mobl2> (raw)
In-Reply-To: <874jqtmdas.wl-ashutosh.dixit@intel.com>

On Thu, 09 Mar 2023 20:38:03 -0800
"Dixit, Ashutosh" <ashutosh.dixit@intel.com> wrote:

> On Thu, 09 Mar 2023 20:30:39 -0800, Dixit, Ashutosh wrote:
> >
> > On Tue, 07 Mar 2023 14:12:31 -0800, Zbigniew Kempczyński wrote:  
> > >  
> >
> > Hi Zbyzsek,
> >  
> > > +#define for_each_gt(__fd, __gt) \
> > > +	for (__gt = 0; __gt < xe_number_gt(__fd); ++__gt)  
> >
> > This for_each_gt conflicts with for_each_gt in our internal i915 tree
> > (which were planning to post upstream soon). How do you want to resolve
> > this?  
> 
> Can we can just do this?
> 
> diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
> index fe1343f6161..72ee6c9478b 100644
> --- a/lib/xe/xe_query.h
> +++ b/lib/xe/xe_query.h
> @@ -66,6 +66,7 @@ struct xe_device {
>  #define for_each_hw_engine_class(__class) \
>         for (__class = 0; __class < DRM_XE_ENGINE_CLASS_COMPUTE + 1; \
>              ++__class)
> +#undef for_each_gt
>  #define for_each_gt(__fd, __gt) \
>         for (__gt = 0; __gt < xe_number_gt(__fd); ++__gt)
> 
> 

My two cents there: this works, but it is painful if the i915-specific
version is placed on a header used by both Xe and i915 drivers.

I can see two possible solutions:

1. ensure that the i915-specific version is placed on a lib/i915*
   header;

2. name such kind of macros after the name of the driver, e. g.:

	sed s,for_each_gt,xe_for_each_gt, -i lib/xe/* tests/xe/*
	sed s,for_each_gt,i915_for_each_gt, -i lib/i915/* tests/i915/* 

They're not mutually exclusive.

Regards,
Mauro

  reply	other threads:[~2023-03-10  6:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07 22:12 [igt-dev] [PATCH i-g-t v7 0/7] Initial Xe test suite Zbigniew Kempczyński
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 1/7] drm-uapi/xe_drm: Add Xe uAPI Zbigniew Kempczyński
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 2/7] lib/xe: Introduce Xe library Zbigniew Kempczyński
2023-03-10  4:30   ` Dixit, Ashutosh
2023-03-10  4:38     ` Dixit, Ashutosh
2023-03-10  6:41       ` Mauro Carvalho Chehab [this message]
2023-03-11  4:09         ` Dixit, Ashutosh
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 3/7] lib/igt_pm: Add a helper to query the runtime_usage Zbigniew Kempczyński
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 4/7] tests/xe: Add Xe IGT tests Zbigniew Kempczyński
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 5/7] tools/xe_reg: Add Xe register read/write tool Zbigniew Kempczyński
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 6/7] intel-ci/xe-fast-feedback: Introduce xe-fast-feedback list Zbigniew Kempczyński
2023-03-07 22:12 ` [igt-dev] [PATCH i-g-t v7 7/7] runner/job_list: return error on crashes while running --list-subtests Zbigniew Kempczyński
2023-03-07 22:28 ` [igt-dev] ✗ GitLab.Pipeline: warning for Initial Xe test suite (rev7) Patchwork
2023-03-07 22:50 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-03-09 12:42 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20230310074135.5609c2a8@maurocar-mobl2 \
    --to=mauro.chehab@linux.intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox