[PATCH] drm/xe/oa/uapi: Expose an unblock after N reports OA property
Dixit, Ashutosh
ashutosh.dixit at intel.com
Fri Dec 13 17:19:30 UTC 2024
On Thu, 12 Dec 2024 14:59:35 -0800, Cavitt, Jonathan wrote:
>
> > diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> > index d2a816f71bf26..226b234d07110 100644
> > --- a/drivers/gpu/drm/xe/xe_query.c
> > +++ b/drivers/gpu/drm/xe/xe_query.c
> > @@ -672,7 +672,7 @@ static int query_oa_units(struct xe_device *xe,
> > du->oa_unit_type = u->type;
> > du->oa_timestamp_freq = xe_oa_timestamp_frequency(gt);
> > du->capabilities = DRM_XE_OA_CAPS_BASE | DRM_XE_OA_CAPS_SYNCS |
> > - DRM_XE_OA_CAPS_OA_BUFFER_SIZE;
> > + DRM_XE_OA_CAPS_OA_BUFFER_SIZE | DRM_XE_OA_CAPS_WAIT_NUM_REPORTS;
>
> This should probably be kept inline:
> """
> du->capabilities = DRM_XE_OA_CAPS_BASE | DRM_XE_OA_CAPS_SYNCS |
> DRM_XE_OA_CAPS_OA_BUFFER_SIZE |
> DRM_XE_OA_CAPS_WAIT_NUM_REPORTS;
> """
> But otherwise:
> Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
Thanks, sure I will make this change.
Also the MDAPI UMD PR for this kernel change is:
https://github.com/intel/metrics-discovery/pull/32
Thanks.
--
Ashutosh
> > j = 0;
> > for_each_hw_engine(hwe, gt, hwe_id) {
> > diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> > index 0383b52cbd869..f62689ca861a4 100644
> > --- a/include/uapi/drm/xe_drm.h
> > +++ b/include/uapi/drm/xe_drm.h
> > @@ -1487,6 +1487,7 @@ struct drm_xe_oa_unit {
> > #define DRM_XE_OA_CAPS_BASE (1 << 0)
> > #define DRM_XE_OA_CAPS_SYNCS (1 << 1)
> > #define DRM_XE_OA_CAPS_OA_BUFFER_SIZE (1 << 2)
> > +#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS (1 << 3)
> >
> > /** @oa_timestamp_freq: OA timestamp freq */
> > __u64 oa_timestamp_freq;
> > @@ -1660,6 +1661,12 @@ enum drm_xe_oa_property_id {
> > * buffer is allocated by default.
> > */
> > DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE,
> > +
> > + /**
> > + * @DRM_XE_OA_PROPERTY_WAIT_NUM_REPORTS: Number of reports to wait
> > + * for before unblocking poll or read
> > + */
> > + DRM_XE_OA_PROPERTY_WAIT_NUM_REPORTS,
> > };
> >
> > /**
> > --
> > 2.47.1
> >
> >
More information about the Intel-xe
mailing list