Skip to content

Commit

Permalink
drm/xe/guc: Add support for threshold KLVs in to_string() helper
Browse files Browse the repository at this point in the history
Use MAKE_XE_GUC_KLV_THRESHOLDS_SET to generate missing conversion
of threshold KLV keys to string.

Reviewed-by: Piotr Piórkowski <[email protected]>
Signed-off-by: Michal Wajdeczko <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
mwajdecz committed May 16, 2024
1 parent b1ce52f commit 7aefee8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/gpu/drm/xe/xe_guc_klv_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "abi/guc_klvs_abi.h"
#include "xe_guc_klv_helpers.h"
#include "xe_guc_klv_thresholds_set.h"

#define make_u64(hi, lo) ((u64)((u64)(u32)(hi) << 32 | (u32)(lo)))

Expand Down Expand Up @@ -48,6 +49,17 @@ const char *xe_guc_klv_key_to_string(u16 key)
return "begin_db_id";
case GUC_KLV_VF_CFG_BEGIN_CONTEXT_ID_KEY:
return "begin_ctx_id";

/* VF CFG threshold keys */
#define define_threshold_key_to_string_case(TAG, NAME, ...) \
\
case MAKE_GUC_KLV_VF_CFG_THRESHOLD_KEY(TAG): \
return #NAME;

/* private: auto-generated case statements */
MAKE_XE_GUC_KLV_THRESHOLDS_SET(define_threshold_key_to_string_case)
#undef define_threshold_key_to_string_case

default:
return "(unknown)";
}
Expand Down

0 comments on commit 7aefee8

Please sign in to comment.