Skip to content

Commit 74ba22e

Browse files
tomaszlipzanoni-intel
authored andcommitted
drm/i915/icl: Add configuring MOCS in new Icelake engines
In Icelake, there are more engines on which Memory Object Control States need to be configured. Besides adding Icelake under Skylake config, the patch makes sure MOCS register addresses for the new engines are properly defined. Additional patch might be need later, in case the specification will propose different MOCS config values for Icelake than in previous gens. v2: Restricted comments to gen11, updated description, renamed defines. v3: Used proper engine indexes for gen11. v4: Ensure patch is Icelake only. v5: Style fixes (proposed by mwajdeczko) v6 (from Paulo): fix checkpatch's COMMIT_LOG_LONG_LINE (Checkpatch). BSpec: 19405 BSpec: 21140 Cc: Oscar Mateo Lozano <[email protected]> Cc: Daniele Ceraolo Spurio <[email protected]> Reviewed-by: Michel Thierry <[email protected]> Signed-off-by: Tomasz Lis <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent bd4cd03 commit 74ba22e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9864,6 +9864,8 @@ enum skl_power_gate {
98649864
#define GEN9_MFX1_MOCS(i) _MMIO(0xca00 + (i) * 4) /* Media 1 MOCS registers */
98659865
#define GEN9_VEBOX_MOCS(i) _MMIO(0xcb00 + (i) * 4) /* Video MOCS registers */
98669866
#define GEN9_BLT_MOCS(i) _MMIO(0xcc00 + (i) * 4) /* Blitter MOCS registers */
9867+
/* Media decoder 2 MOCS registers */
9868+
#define GEN11_MFX2_MOCS(i) _MMIO(0x10000 + (i) * 4)
98679869

98689870
/* gamt regs */
98699871
#define GEN8_L3_LRA_1_GPGPU _MMIO(0x4dd4)

drivers/gpu/drm/i915/intel_mocs.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ static bool get_mocs_settings(struct drm_i915_private *dev_priv,
178178
{
179179
bool result = false;
180180

181-
if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv)) {
181+
if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv) ||
182+
IS_ICELAKE(dev_priv)) {
182183
table->size = ARRAY_SIZE(skylake_mocs_table);
183184
table->table = skylake_mocs_table;
184185
result = true;
@@ -217,6 +218,8 @@ static i915_reg_t mocs_register(enum intel_engine_id engine_id, int index)
217218
return GEN9_VEBOX_MOCS(index);
218219
case VCS2:
219220
return GEN9_MFX1_MOCS(index);
221+
case VCS3:
222+
return GEN11_MFX2_MOCS(index);
220223
default:
221224
MISSING_CASE(engine_id);
222225
return INVALID_MMIO_REG;

0 commit comments

Comments
 (0)