]> www.infradead.org Git - users/hch/configfs.git/commit
drm/xe/oa/uapi: Expose OA stream fd
authorAshutosh Dixit <ashutosh.dixit@intel.com>
Tue, 18 Jun 2024 01:46:00 +0000 (18:46 -0700)
committerAshutosh Dixit <ashutosh.dixit@intel.com>
Tue, 18 Jun 2024 19:40:35 +0000 (12:40 -0700)
commite936f885f1e96f59d9d05fb6cb5a02b9b9b88a05
treea735968fbc92042866350295c6ad0b31f3623a0a
parent1db9a9dc90aece0803a26a711b52a9492faefab7
drm/xe/oa/uapi: Expose OA stream fd

The OA stream open perf op returns an fd with its own file_operations for
the newly initialized OA stream. These file_operations allow userspace to
enable or disable the stream, as well as apply a different metric
configuration for the OA stream. Userspace can also poll for data
availability. OA stream initialization is completed in this commit by
enabling the OA stream. When sampling is enabled this starts a hrtimer
which periodically checks for data availablility.

v2: Use stream properties for stream reconfiguration with
    DRM_XE_PERF_IOCTL_CONFIG
v3: Hold runtime_pm reference across oa buffer alloc/free
v4: Fix 32 bit build

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-9-ashutosh.dixit@intel.com
drivers/gpu/drm/xe/xe_oa.c
include/uapi/drm/xe_drm.h