[Intel-xe] [PATCH v3 26/30] drm/xe/uapi: Add pad to drm_xe_engine_class_instance

Souza, Jose jose.souza at intel.com
Fri Sep 29 16:45:35 UTC 2023


On Fri, 2023-09-29 at 09:00 -0700, Umesh Nerlige Ramappa wrote:
> On Fri, Sep 29, 2023 at 11:06:53AM +0200, Francois Dugast wrote:
> > Hi Umesh,
> > 
> > On Thu, Sep 28, 2023 at 05:36:39PM -0700, Umesh Nerlige Ramappa wrote:
> > > On Tue, Sep 26, 2023 at 12:55:36PM +0000, Francois Dugast wrote:
> > > > Add pad to reserve space for future uses such as special configurations
> > > > for media.
> > > > 
> > > > Signed-off-by: Francois Dugast <francois.dugast at intel.com>
> > > 
> > > I saw a comment in v4 that you dropped the patches that are not reviewed, so
> > > this is:
> > > 
> > > Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
> > > 
> > > Hoping this will be part of the final series that you merge since the
> > > ENGINE_CYCLES query is using this structure and relies on this padding.
> > 
> > Actually using your original submission [1] this patch should not longer
> > be necessary, right? It includes:
> > 
> >   __u16 rsvd;
> > 
> > [1] https://lore.kernel.org/intel-xe/20230814223734.375449-5-umesh.nerlige.ramappa@intel.com/
> 
> Hmmm, I failed to notice that earlier. My bad. v4 looks good, you can 
> ignore this.

It is named as rsvd but it should be a pad.

We can't leave as reserved to be future used to return media engine capabilities because drm_xe_engine_class_instance is also used as input to other
uAPIs and that is useless information after initialization that UMDs should not need to carry around.

Instead DRM_XE_DEVICE_QUERY_ENGINES should return something like

struct drm_xe_engine_info {
	struct drm_xe_engine_class_instance instance;
	__u32 rsvd;/* future could be __u16 capabilities; __u16 rsvd; */
};

This can be fixed in uAPI take 2.

> 
> Thanks,
> Umesh
> > 
> > Francois
> > 
> > > 
> > > Thanks,
> > > Umesh
> > > > ---
> > > > include/uapi/drm/xe_drm.h | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> > > > index 79e47708d526..84091860c7d2 100644
> > > > --- a/include/uapi/drm/xe_drm.h
> > > > +++ b/include/uapi/drm/xe_drm.h
> > > > @@ -143,6 +143,8 @@ struct drm_xe_engine_class_instance {
> > > > 
> > > > 	__u16 engine_instance;
> > > > 	__u16 gt_id;
> > > > +	/** @pad: MBZ */
> > > > +	__u32 pad;
> > > > };
> > > > 
> > > > /**
> > > > --
> > > > 2.34.1
> > > > 



More information about the Intel-xe mailing list