[PATCH] drm/xe/oa/uapi: Expose an unblock after N reports OA property

Dixit, Ashutosh ashutosh.dixit at intel.com
Tue Dec 17 02:17:01 UTC 2024


On Mon, 16 Dec 2024 14:48:06 -0800, Umesh Nerlige Ramappa wrote:
>
> >> > @@ -2156,6 +2170,14 @@ int xe_oa_stream_open_ioctl(struct drm_device *dev, u64 data, struct drm_file *f
> >> >	if (!param.oa_buffer_size)
> >> >		param.oa_buffer_size = DEFAULT_XE_OA_BUFFER_SIZE;
> >> >
> >> > +	if (!param.wait_num_reports)
> >> > +		param.wait_num_reports = 1;
> >> > +	if (param.wait_num_reports > param.oa_buffer_size / f->size) {
> >> > +		drm_dbg(&oa->xe->drm, "wait_num_reports %d\n", param.wait_num_reports);
> >> > +		ret = -EINVAL;
> >> > +		goto err_exec_q;
> >> > +	}
> >>
> >> If possible, I think this check where wait_num_reports has an upper limit
> >> should be moved to xe_oa_set_prop_wait_num_reports().
> >
> > It's not possible since the properties can come in any order, so both the
> > OA buffer size as well as the format might not be available when
> > wait_num_reports property is parsed. So they could both still be 0 when
> > xe_oa_set_prop_wait_num_reports() is called.
> >
> > That is why the code which checks for consistency between multiple
> > properties comes after the code which parses individual properties.
>
> Oh, makes sense. Then this is:
>
> Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>

Thanks, now merged!


More information about the Intel-xe mailing list