[PATCH 07/17] drm/xe/oa/uapi: Define and parse OA stream properties

Dixit, Ashutosh ashutosh.dixit at intel.com
Tue Dec 19 02:59:57 UTC 2023


On Thu, 07 Dec 2023 22:43:19 -0800, Ashutosh Dixit wrote:
>
> +	/**
> +	 * @DRM_XE_OA_PROPERTY_OPEN_FLAGS: CLOEXEC and NONBLOCK flags are
> +	 * directly applied to returned OA fd. DISABLED opens the OA stream in a
> +	 * DISABLED state (see @DRM_XE_PERF_IOCTL_ENABLE).
> +	 */
> +	DRM_XE_OA_PROPERTY_OPEN_FLAGS,
> +#define DRM_XE_OA_FLAG_FD_CLOEXEC	(1 << 0)
> +#define DRM_XE_OA_FLAG_FD_NONBLOCK	(1 << 1)
> +#define DRM_XE_OA_FLAG_DISABLED		(1 << 2)

I am wondering why these flags should be part of this uapi:

* O_CLOEXEC and O_NONBLOCK can be set on the returned stream fd using fcntl
  (see man 2 fcntl)
* DRM_XE_OA_FLAG_DISABLED can just be a stream open property, doesn't need
  to be a fd flag.

Comments?

Thanks.
--
Ashutosh


More information about the Intel-xe mailing list