#include "i915_drv.h"
#include "intel_engine.h"
#include "intel_gt.h"
#include "intel_gt_mcr.h"
#include "intel_gt_regs.h"
#include "intel_mocs.h"
#include "intel_ring.h"
struct drm_i915_mocs_entry { … };
struct drm_i915_mocs_table { … };
#define _LE_CACHEABILITY(value) …
#define _LE_TGT_CACHE(value) …
#define LE_LRUM(value) …
#define LE_AOM(value) …
#define LE_RSC(value) …
#define LE_SCC(value) …
#define LE_PFM(value) …
#define LE_SCF(value) …
#define LE_COS(value) …
#define LE_SSE(value) …
#define _L4_CACHEABILITY(value) …
#define IG_PAT(value) …
#define L3_ESC(value) …
#define L3_SCC(value) …
#define _L3_CACHEABILITY(value) …
#define L3_GLBGO(value) …
#define L3_LKUP(value) …
#define GEN9_NUM_MOCS_ENTRIES …
#define MTL_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_2_RESERVED …
#define L4_3_UC …
#define MOCS_ENTRY(__idx, __control_value, __l3cc_value) …
#define GEN9_MOCS_ENTRIES …
static const struct drm_i915_mocs_entry skl_mocs_table[] = …;
static const struct drm_i915_mocs_entry broxton_mocs_table[] = …;
#define GEN11_MOCS_ENTRIES …
static const struct drm_i915_mocs_entry tgl_mocs_table[] = …;
static const struct drm_i915_mocs_entry icl_mocs_table[] = …;
static const struct drm_i915_mocs_entry dg1_mocs_table[] = …;
static const struct drm_i915_mocs_entry gen12_mocs_table[] = …;
static const struct drm_i915_mocs_entry dg2_mocs_table[] = …;
static const struct drm_i915_mocs_entry mtl_mocs_table[] = …;
enum { … };
static bool has_l3cc(const struct drm_i915_private *i915)
{ … }
static bool has_global_mocs(const struct drm_i915_private *i915)
{ … }
static bool has_mocs(const struct drm_i915_private *i915)
{ … }
static unsigned int get_mocs_settings(struct drm_i915_private *i915,
struct drm_i915_mocs_table *table)
{ … }
static u32 get_entry_control(const struct drm_i915_mocs_table *table,
unsigned int index)
{ … }
#define for_each_mocs(mocs, t, i) …
static void __init_mocs_table(struct intel_uncore *uncore,
const struct drm_i915_mocs_table *table,
u32 addr)
{ … }
static u32 mocs_offset(const struct intel_engine_cs *engine)
{ … }
static void init_mocs_table(struct intel_engine_cs *engine,
const struct drm_i915_mocs_table *table)
{ … }
static u16 get_entry_l3cc(const struct drm_i915_mocs_table *table,
unsigned int index)
{ … }
static u32 l3cc_combine(u16 low, u16 high)
{ … }
#define for_each_l3cc(l3cc, t, i) …
static void init_l3cc_table(struct intel_gt *gt,
const struct drm_i915_mocs_table *table)
{ … }
void intel_mocs_init_engine(struct intel_engine_cs *engine)
{ … }
static u32 global_mocs_offset(void)
{ … }
void intel_set_mocs_index(struct intel_gt *gt)
{ … }
void intel_mocs_init(struct intel_gt *gt)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftest_mocs.c"
#endif