Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>,
	"Wajdeczko, Michal" <Michal.Wajdeczko@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Vivi,  Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v3] drm/xe/oa: Fix kernel doc warnings in xe_drm.h
Date: Mon, 24 Jun 2024 20:18:20 +0000	[thread overview]
Message-ID: <91631dc09610974b9ca5aa1756ee72c258c09dd4.camel@intel.com> (raw)
In-Reply-To: <851q4mqf98.wl-ashutosh.dixit@intel.com>

On Mon, 2024-06-24 at 13:04 -0700, Dixit, Ashutosh wrote:
> On Mon, 24 Jun 2024 05:30:37 -0700, Michal Wajdeczko wrote:
> > 
> 
> Hi Michal,
> 
> And Cc: Jose below.
> 
> > 
> > 
> > On 23.06.2024 22:31, Ashutosh Dixit wrote:
> > > Fix kernel doc warnings in xe_drm.h. Also eliminate private/non-abi enum
> > > definitions.
> > > 
> > > v2: Remove __DRM_XE_PERF_TYPE_MAX since it is unused (Michal)
> > > v3: Also remove DRM_XE_OA_PROPERTY_MAX since it can also be eliminated (Michal)
> > > 
> > > Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > > Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> > 
> > some nits below, but in general LGTM, so
> > 
> > Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> 
> Thanks.
> 
> > 
> > and I'm assuming it's not too late for such uabi fixups, but better to
> > wait for ack from Rodrigo
> 
> Copying Jose: in case Mesa were using DRM_XE_OA_PROPERTY_MAX, they can
> probably also use a value like 16 like we've done below in Xe (I will make
> this change in IGT). Mesa PR is not merged yet so should be ok I think, but
> they will need to make a tiny change. I am assuming as long as this all
> gets into 6.11 it should be ok.
> 
> Jose please confirm this is ok. Thanks.

Mesa is not using and even if were we can change it until it gets merged(after KMD patches reaches drm-next).

While at it, do we have any UMD using drm_xe_query_oa_units?
Because Mesa don't use it, so I think it should be removed until a UMD makes use of it.
So drm_xe_query_oa_units and related UAPIs could be removed.

> 
> > 
> > > ---
> > >  drivers/gpu/drm/xe/xe_oa.c | 3 ++-
> > >  include/uapi/drm/xe_drm.h  | 5 +----
> > >  2 files changed, 3 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> > > index 4168b51cf7b5..9263ae9a864e 100644
> > > --- a/drivers/gpu/drm/xe/xe_oa.c
> > > +++ b/drivers/gpu/drm/xe/xe_oa.c
> > > @@ -1684,6 +1684,7 @@ static const xe_oa_user_extension_fn xe_oa_user_extension_funcs[] = {
> > > 	[DRM_XE_OA_EXTENSION_SET_PROPERTY] = xe_oa_user_ext_set_property,
> > >  };
> > > 
> > > +#define MAX_USER_EXTENSIONS	16
> > 
> > nit: maybe it's worth to put small comment saying this is our choice to
> > limit number of nested user extensions we want to support (or at least
> > this is how I understood this)
> > 
> > nit: and this doesn't really look like OA specific limitation, so maybe
> > it's time to promote MAX_USER_EXTENSIONS to some shared location to make
> > it unified across driver
> 
> xe_exec_queue.c also uses a similar mechanism. But I think better to leave
> them separate in different modules so that each module can tweak the value
> to what is best for that module.
> 
> Thanks.
> --
> Ashutosh
> 
> 
> > 
> > >  static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number,
> > > 				 struct xe_oa_open_param *param)
> > >  {
> > > @@ -1692,7 +1693,7 @@ static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number
> > > 	int err;
> > > 	u32 idx;
> > > 
> > > -	if (XE_IOCTL_DBG(oa->xe, ext_number >= DRM_XE_OA_PROPERTY_MAX))
> > > +	if (XE_IOCTL_DBG(oa->xe, ext_number >= MAX_USER_EXTENSIONS))
> > > 		return -E2BIG;
> > > 
> > > 	err = __copy_from_user(&ext, address, sizeof(ext));
> > > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> > > index 93e00be44b2d..b410553faa9b 100644
> > > --- a/include/uapi/drm/xe_drm.h
> > > +++ b/include/uapi/drm/xe_drm.h
> > > @@ -1379,8 +1379,8 @@ struct drm_xe_wait_user_fence {
> > >   * enum drm_xe_perf_type - Perf stream types
> > >   */
> > >  enum drm_xe_perf_type {
> > > +	/** @DRM_XE_PERF_TYPE_OA: OA perf stream type */
> > > 	DRM_XE_PERF_TYPE_OA,
> > > -	__DRM_XE_PERF_TYPE_MAX, /* non-ABI */
> > >  };
> > > 
> > >  /**
> > > @@ -1611,9 +1611,6 @@ enum drm_xe_oa_property_id {
> > > 	 * pass along with @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
> > > 	 */
> > > 	DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE,
> > > -
> > > -	/** @DRM_XE_OA_PROPERTY_MAX: non-ABI */
> > > -	DRM_XE_OA_PROPERTY_MAX
> > >  };
> > > 
> > >  /**


  reply	other threads:[~2024-06-24 20:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 20:31 [PATCH v3] drm/xe/oa: Fix kernel doc warnings in xe_drm.h Ashutosh Dixit
2024-06-23 20:35 ` ✓ CI.Patch_applied: success for drm/xe/oa: Fix kernel doc warnings in xe_drm.h (rev3) Patchwork
2024-06-23 20:36 ` ✗ CI.checkpatch: warning " Patchwork
2024-06-23 20:37 ` ✓ CI.KUnit: success " Patchwork
2024-06-23 20:49 ` ✓ CI.Build: " Patchwork
2024-06-23 20:51 ` ✓ CI.Hooks: " Patchwork
2024-06-23 20:52 ` ✓ CI.checksparse: " Patchwork
2024-06-23 21:16 ` ✓ CI.BAT: " Patchwork
2024-06-23 22:11 ` ✗ CI.FULL: failure " Patchwork
2024-06-24 12:30 ` [PATCH v3] drm/xe/oa: Fix kernel doc warnings in xe_drm.h Michal Wajdeczko
2024-06-24 20:04   ` Dixit, Ashutosh
2024-06-24 20:18     ` Souza, Jose [this message]
2024-06-24 20:16       ` Dixit, Ashutosh
2024-06-25 17:22         ` Dixit, Ashutosh
2024-06-25 21:27           ` Rodrigo Vivi
2024-06-26  2:04             ` Dixit, Ashutosh

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=91631dc09610974b9ca5aa1756ee72c258c09dd4.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=Michal.Wajdeczko@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=rodrigo.vivi@intel.com \
    /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