Skip to content

Commit

Permalink
drm/xe/oa: Fix kernel doc in xe_drm.h
Browse files Browse the repository at this point in the history
Fix kernel doc in xe_drm.h. Also eliminate private/non-abi enum
definitions.

v2: Remove __DRM_XE_PERF_TYPE_MAX since it is unused (Michal)
v3: Also remove DRM_XE_OA_PROPERTY_MAX since it can also be
    eliminated (Michal)

Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240623203119.3840283-1-ashutosh.dixit@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
ashutoshx authored and rodrigovivi committed Jun 26, 2024
1 parent 701d9c4 commit 7e5161d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/xe/xe_oa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,7 @@ static const xe_oa_user_extension_fn xe_oa_user_extension_funcs[] = {
[DRM_XE_OA_EXTENSION_SET_PROPERTY] = xe_oa_user_ext_set_property,
};

#define MAX_USER_EXTENSIONS 16
static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number,
struct xe_oa_open_param *param)
{
Expand All @@ -1692,7 +1693,7 @@ static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number
int err;
u32 idx;

if (XE_IOCTL_DBG(oa->xe, ext_number >= DRM_XE_OA_PROPERTY_MAX))
if (XE_IOCTL_DBG(oa->xe, ext_number >= MAX_USER_EXTENSIONS))
return -E2BIG;

err = __copy_from_user(&ext, address, sizeof(ext));
Expand Down
5 changes: 1 addition & 4 deletions include/uapi/drm/xe_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1379,8 +1379,8 @@ struct drm_xe_wait_user_fence {
* enum drm_xe_perf_type - Perf stream types
*/
enum drm_xe_perf_type {
/** @DRM_XE_PERF_TYPE_OA: OA perf stream type */
DRM_XE_PERF_TYPE_OA,
__DRM_XE_PERF_TYPE_MAX, /* non-ABI */
};

/**
Expand Down Expand Up @@ -1611,9 +1611,6 @@ enum drm_xe_oa_property_id {
* pass along with @DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID or will default to 0.
*/
DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE,

/** @DRM_XE_OA_PROPERTY_MAX: non-ABI */
DRM_XE_OA_PROPERTY_MAX
};

/**
Expand Down

0 comments on commit 7e5161d

Please sign in to comment.