drivers/gpu/drm/xe/xe_guc_klv_thresholds_set.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_guc_klv_thresholds_set.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_guc_klv_thresholds_set.h- Extension
.h- Size
- 2261 bytes
- Lines
- 72
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
abi/guc_klvs_abi.hxe_guc_klv_helpers.hxe_guc_klv_thresholds_set_types.h
Detected Declarations
function xe_guc_klv_threshold_key_to_indexfunction xe_guc_klv_threshold_index_to_key
Annotated Snippet
#ifndef _XE_GUC_KLV_THRESHOLDS_SET_H_
#define _XE_GUC_KLV_THRESHOLDS_SET_H_
#include "abi/guc_klvs_abi.h"
#include "xe_guc_klv_helpers.h"
#include "xe_guc_klv_thresholds_set_types.h"
/**
* MAKE_GUC_KLV_VF_CFG_THRESHOLD_KEY - Prepare the name of the KLV key constant.
* @TAG: unique tag of the GuC threshold KLV key.
*/
#define MAKE_GUC_KLV_VF_CFG_THRESHOLD_KEY(TAG) \
MAKE_GUC_KLV_KEY(CONCATENATE(VF_CFG_THRESHOLD_, TAG))
/**
* MAKE_GUC_KLV_VF_CFG_THRESHOLD_LEN - Prepare the name of the KLV length constant.
* @TAG: unique tag of the GuC threshold KLV key.
*/
#define MAKE_GUC_KLV_VF_CFG_THRESHOLD_LEN(TAG) \
MAKE_GUC_KLV_LEN(CONCATENATE(VF_CFG_THRESHOLD_, TAG))
/**
* xe_guc_klv_threshold_key_to_index - Find index of the tracked GuC threshold.
* @key: GuC threshold KLV key.
*
* This translation is automatically generated using &MAKE_XE_GUC_KLV_THRESHOLDS_SET.
* Return: index of the GuC threshold KLV or -1 if not found.
*/
static inline int xe_guc_klv_threshold_key_to_index(u32 key)
{
switch (key) {
#define define_xe_guc_klv_threshold_key_to_index_case(TAG, ...) \
\
case MAKE_GUC_KLV_VF_CFG_THRESHOLD_KEY(TAG): \
return MAKE_XE_GUC_KLV_THRESHOLD_INDEX(TAG);
/* private: auto-generated case statements */
MAKE_XE_GUC_KLV_THRESHOLDS_SET(define_xe_guc_klv_threshold_key_to_index_case)
}
return -1;
#undef define_xe_guc_klv_threshold_key_to_index_case
}
/**
* xe_guc_klv_threshold_index_to_key - Get tracked GuC threshold KLV key.
* @index: GuC threshold KLV index.
*
* This translation is automatically generated using &MAKE_XE_GUC_KLV_THRESHOLDS_SET.
* Return: key of the GuC threshold KLV or 0 on malformed index.
*/
static inline u32 xe_guc_klv_threshold_index_to_key(enum xe_guc_klv_threshold_index index)
{
switch (index) {
#define define_xe_guc_klv_threshold_index_to_key_case(TAG, ...) \
\
case MAKE_XE_GUC_KLV_THRESHOLD_INDEX(TAG): \
return MAKE_GUC_KLV_VF_CFG_THRESHOLD_KEY(TAG);
/* private: auto-generated case statements */
MAKE_XE_GUC_KLV_THRESHOLDS_SET(define_xe_guc_klv_threshold_index_to_key_case)
}
return 0; /* unreachable */
#undef define_xe_guc_klv_threshold_index_to_key_case
}
#endif
Annotation
- Immediate include surface: `abi/guc_klvs_abi.h`, `xe_guc_klv_helpers.h`, `xe_guc_klv_thresholds_set_types.h`.
- Detected declarations: `function xe_guc_klv_threshold_key_to_index`, `function xe_guc_klv_threshold_index_to_key`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.