#include "xe_mocs.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_exec_queue.h"
#include "xe_force_wake.h"
#include "xe_gt.h"
#include "xe_gt_mcr.h"
#include "xe_gt_printk.h"
#include "xe_mmio.h"
#include "xe_platform_types.h"
#include "xe_pm.h"
#include "xe_sriov.h"
#include "xe_step_types.h"
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
#define mocs_dbg …
#else
__printf(2, 3)
static inline void mocs_dbg(const struct xe_gt *gt,
const char *format, ...)
{ … }
#endif
enum { … };
struct xe_mocs_entry { … };
struct xe_mocs_info;
struct xe_mocs_ops { … };
struct xe_mocs_info { … };
#define IG_PAT …
#define L3_CACHE_POLICY_MASK …
#define L4_CACHE_POLICY_MASK …
#define XELP_NUM_MOCS_ENTRIES …
#define PVC_NUM_MOCS_ENTRIES …
#define MTL_NUM_MOCS_ENTRIES …
#define XE2_NUM_MOCS_ENTRIES …
#define LE_0_PAGETABLE …
#define LE_1_UC …
#define LE_2_WT …
#define LE_3_WB …
#define LE_TC_0_PAGETABLE …
#define LE_TC_1_LLC …
#define LE_TC_2_LLC_ELLC …
#define LE_TC_3_LLC_ELLC_ALT …
#define L3_0_DIRECT …
#define L3_1_UC …
#define L3_2_RESERVED …
#define L3_3_WB …
#define L4_0_WB …
#define L4_1_WT …
#define L4_3_UC …
#define XE2_L3_0_WB …
#define XE2_L3_1_XD …
#define XE2_L3_3_UC …
#define XE2_L3_CLOS_MASK …
#define MOCS_ENTRY(__idx, __control_value, __l3cc_value) …
static const struct xe_mocs_entry gen12_mocs_desc[] = …;
static bool regs_are_mcr(struct xe_gt *gt)
{ … }
static void xelp_lncf_dump(struct xe_mocs_info *info, struct xe_gt *gt, struct drm_printer *p)
{ … }
static void xelp_mocs_dump(struct xe_mocs_info *info, unsigned int flags,
struct xe_gt *gt, struct drm_printer *p)
{ … }
static const struct xe_mocs_ops xelp_mocs_ops = …;
static const struct xe_mocs_entry dg1_mocs_desc[] = …;
static const struct xe_mocs_entry dg2_mocs_desc[] = …;
static void xehp_lncf_dump(struct xe_mocs_info *info, unsigned int flags,
struct xe_gt *gt, struct drm_printer *p)
{ … }
static const struct xe_mocs_ops xehp_mocs_ops = …;
static const struct xe_mocs_entry pvc_mocs_desc[] = …;
static void pvc_mocs_dump(struct xe_mocs_info *info, unsigned int flags, struct xe_gt *gt,
struct drm_printer *p)
{ … }
static const struct xe_mocs_ops pvc_mocs_ops = …;
static const struct xe_mocs_entry mtl_mocs_desc[] = …;
static void mtl_mocs_dump(struct xe_mocs_info *info, unsigned int flags,
struct xe_gt *gt, struct drm_printer *p)
{ … }
static const struct xe_mocs_ops mtl_mocs_ops = …;
static const struct xe_mocs_entry xe2_mocs_table[] = …;
static void xe2_mocs_dump(struct xe_mocs_info *info, unsigned int flags,
struct xe_gt *gt, struct drm_printer *p)
{ … }
static const struct xe_mocs_ops xe2_mocs_ops = …;
static unsigned int get_mocs_settings(struct xe_device *xe,
struct xe_mocs_info *info)
{ … }
static u32 get_entry_control(const struct xe_mocs_info *info,
unsigned int index)
{ … }
static void __init_mocs_table(struct xe_gt *gt,
const struct xe_mocs_info *info)
{ … }
static u16 get_entry_l3cc(const struct xe_mocs_info *info,
unsigned int index)
{ … }
static u32 l3cc_combine(u16 low, u16 high)
{ … }
static void init_l3cc_table(struct xe_gt *gt,
const struct xe_mocs_info *info)
{ … }
void xe_mocs_init_early(struct xe_gt *gt)
{ … }
void xe_mocs_init(struct xe_gt *gt)
{ … }
void xe_mocs_dump(struct xe_gt *gt, struct drm_printer *p)
{ … }
#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
#include "tests/xe_mocs.c"
#endif