[PATCH 06/16] drm/xe/oa/uapi: Define and parse OA stream properties
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Tue Feb 6 22:25:21 UTC 2024
On Fri, Jan 19, 2024 at 06:00:16PM -0800, Ashutosh Dixit wrote:
>Properties for OA streams are specified by user space, when the stream is
>opened, as a chain of drm_xe_ext_set_property struct's. Parse and validate
>these stream properties.
>
>v2: Remove struct drm_xe_oa_open_param (Harish Chegondi)
> Drop DRM_XE_OA_PROPERTY_POLL_OA_PERIOD_US (Umesh)
> Eliminate comparison with xe_oa_max_sample_rate (Umesh)
> Drop 'struct drm_xe_oa_record_header' (Umesh)
>
>Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
>---
> drivers/gpu/drm/xe/xe_oa.c | 344 +++++++++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/xe_oa.h | 6 +
> drivers/gpu/drm/xe/xe_perf.c | 2 +
> include/uapi/drm/xe_drm.h | 69 +++++++
> 4 files changed, 421 insertions(+)
>
...
>+
>+static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number,
>+ struct xe_oa_open_param *param)
>+{
>+ u64 __user *address = u64_to_user_ptr(extension);
>+ struct drm_xe_user_extension ext;
>+ int err;
>+ u32 idx;
>+
>+ if (XE_IOCTL_DBG(oa->xe, ext_number >= DRM_XE_OA_PROPERTY_MAX))
>+ return -E2BIG;
If we want to pass multiple exec_q id params (like discussed offline),
this check will limit it. I think, for now, we can leave it as is until
such a use case arises.
rest lgtm,
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Regards,
Umesh
More information about the Intel-xe
mailing list