]> www.infradead.org Git - users/hch/configfs.git/commit
drm/xe/oa/uapi: Read file_operation
authorAshutosh Dixit <ashutosh.dixit@intel.com>
Tue, 18 Jun 2024 01:46:01 +0000 (18:46 -0700)
committerAshutosh Dixit <ashutosh.dixit@intel.com>
Tue, 18 Jun 2024 19:40:36 +0000 (12:40 -0700)
commitefb315d0a013cdc8b1e49f5c07b1a2972bc624d4
treebaa67b380a11d1290a8803445aaffc78def707b2
parente936f885f1e96f59d9d05fb6cb5a02b9b9b88a05
drm/xe/oa/uapi: Read file_operation

Implement the OA stream read file_operation. Both blocking and non-blocking
reads are supported. As part of read system call, the read copies OA perf
data from the OA buffer to the user buffer, after appending packet headers
for status and data packets.

v2: Drop OA report headers, implement DRM_XE_PERF_IOCTL_STATUS (Umesh)
v3: Introduce 'struct drm_xe_oa_stream_status'
v4: Define oa_status register bitfields (Umesh)
v5: Add extensions to 'struct drm_xe_oa_stream_status'
v6: Minor cleanup, eliminate report32 variable
v7: Use -EIO to signal to userspace to read OASTATUS using
    DRM_XE_PERF_IOCTL_STATUS, change previous sites returning -EIO to
    return -EINVAL
    Make drm_xe_oa_stream_status bits contiguous (Jose, Umesh)
    rmw oa_status bits (Umesh)

Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240618014609.3233427-10-ashutosh.dixit@intel.com
drivers/gpu/drm/xe/xe_oa.c
drivers/gpu/drm/xe/xe_oa_types.h
include/uapi/drm/xe_drm.h