Skip to content

Commit 929b734

Browse files
srettrodrigovivi
authored andcommitted
drm/i915/gt: Disable HiZ Raw Stall Optimization on broken gen7
When resetting CACHE_MODE registers, don't enable HiZ Raw Stall Optimization on Ivybridge GT1 and Baytrail, as it causes severe glitches when rendering any kind of 3D accelerated content. This optimization is disabled on these platforms by default according to official documentation from 01.org. Fixes: ef99a60 ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3081 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3404 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3071 Reviewed-By: Manuel Bentele <[email protected]> Signed-off-by: Simon Rettberg <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> [Rodrigo removed invalid Fixes line] Link: https://patchwork.freedesktop.org/patch/msgid/20210426161124.2b7fd708@dellnichtsogutkiste
1 parent d22fe80 commit 929b734

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ static void emit_batch(struct i915_vma * const vma,
397397
gen7_emit_pipeline_invalidate(&cmds);
398398
batch_add(&cmds, MI_LOAD_REGISTER_IMM(2));
399399
batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_0_GEN7));
400-
batch_add(&cmds, 0xffff0000);
400+
batch_add(&cmds, 0xffff0000 |
401+
((IS_IVB_GT1(i915) || IS_VALLEYVIEW(i915)) ?
402+
HIZ_RAW_STALL_OPT_DISABLE :
403+
0));
401404
batch_add(&cmds, i915_mmio_reg_offset(CACHE_MODE_1));
402405
batch_add(&cmds, 0xffff0000 | PIXEL_SUBSPAN_COLLECT_OPT_DISABLE);
403406
gen7_emit_pipeline_invalidate(&cmds);

0 commit comments

Comments
 (0)