Skip to content

Commit 43aa755

Browse files
zhanjundceraolo
authored andcommitted
drm/i915/mtl: Update cache coherency setting for context structure
As context structure is shared memory for CPU/GPU, Wa_22016122933 is needed for this memory block as well. Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com> CC: Fei Yang <fei.yang@intel.com> Reviewed-by: Fei Yang <fei.yang@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230706174704.177929-1-zhanjun.dong@intel.com
1 parent 2f42c5a commit 43aa755

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

drivers/gpu/drm/i915/gt/intel_lrc.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,8 +1092,15 @@ __lrc_alloc_state(struct intel_context *ce, struct intel_engine_cs *engine)
10921092

10931093
obj = i915_gem_object_create_lmem(engine->i915, context_size,
10941094
I915_BO_ALLOC_PM_VOLATILE);
1095-
if (IS_ERR(obj))
1095+
if (IS_ERR(obj)) {
10961096
obj = i915_gem_object_create_shmem(engine->i915, context_size);
1097+
/*
1098+
* Wa_22016122933: For MTL the shared memory needs to be mapped
1099+
* as WC on CPU side and UC (PAT index 2) on GPU side
1100+
*/
1101+
if (IS_METEORLAKE(engine->i915))
1102+
i915_gem_object_set_cache_coherency(obj, I915_CACHE_NONE);
1103+
}
10971104
if (IS_ERR(obj))
10981105
return ERR_CAST(obj);
10991106

0 commit comments

Comments
 (0)