[PATCH v11 7/8] drm/xe/uapi: Add a device query to get EU stall sampling information
Dixit, Ashutosh
ashutosh.dixit at intel.com
Tue Feb 25 16:56:39 UTC 2025
On Tue, 25 Feb 2025 01:20:24 -0800, Harish Chegondi wrote:
>
> +static int query_eu_stall(struct xe_device *xe,
> + struct drm_xe_device_query *query)
> +{
> + void __user *query_ptr = u64_to_user_ptr(query->data);
> + struct drm_xe_query_eu_stall *info;
> + size_t size, array_size;
> + const u64 *rates;
> + u32 num_rates;
> + int ret;
> +
> + if (!(xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20)) {
> + drm_dbg(&xe->drm, "EU stall monitoring is not supported on this platform\n");
> + return -ENODEV;
> + }
Why not move has_eu_stall_sampling_support() into xe_eu_stall.h and use it
here? Or leave that function definition in the .c and move the declaration
to .h. Otherwise the same check is repeated twice and someone has to
remember to change in two places?
More information about the Intel-xe
mailing list