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

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Tue Oct 3 18:15:00 UTC 2023


On Fri, Sep 29, 2023 at 09:45:35AM -0700, Souza, Jose wrote:
>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.

Hi Francois,

As per Jose's inputs, I posted a new version of my series here - 
https://patchwork.freedesktop.org/patch/560614/?series=124565&rev=1. 

Can you please pick up patch 3/3 from here. Note that just adding the 
pad does not resolve the issue I was mentioning in my original series.  
We also need to explicitly initialize the pad to 0 in this case. I have 
included that change as well in the above patch.

Thanks,
Umesh
>
>>
>> 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