Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 699aa57

Browse files
committed
drm/i915/gvt: Fix cached atomics setting for Windows VM
We've seen recent regression with host and windows VM running simultaneously that cause gpu hang or even crash. Finally bisect to commit 5858668 ("drm/i915: Disable atomics in L3 for gen9"), which seems cached atomics behavior difference caused regression issue. This tries to add new scratch register handler and add those in mmio save/restore list for context switch. No gpu hang produced with this one. Cc: [email protected] # 5.12+ Cc: "Xu, Terrence" <[email protected]> Cc: "Bloomfield, Jon" <[email protected]> Cc: "Ekstrand, Jason" <[email protected]> Reviewed-by: Colin Xu <[email protected]> Fixes: 5858668 ("drm/i915: Disable atomics in L3 for gen9") Signed-off-by: Zhenyu Wang <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c90b450 commit 699aa57

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/gpu/drm/i915/gvt/handlers.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,6 +3149,7 @@ static int init_bdw_mmio_info(struct intel_gvt *gvt)
31493149
MMIO_DFH(_MMIO(0xb100), D_BDW, F_CMD_ACCESS, NULL, NULL);
31503150
MMIO_DFH(_MMIO(0xb10c), D_BDW, F_CMD_ACCESS, NULL, NULL);
31513151
MMIO_D(_MMIO(0xb110), D_BDW);
3152+
MMIO_D(GEN9_SCRATCH_LNCF1, D_BDW_PLUS);
31523153

31533154
MMIO_F(_MMIO(0x24d0), 48, F_CMD_ACCESS | F_CMD_WRITE_PATCH, 0, 0,
31543155
D_BDW_PLUS, NULL, force_nonpriv_write);

drivers/gpu/drm/i915/gvt/mmio_context.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ static struct engine_mmio gen9_engine_mmio_list[] __cacheline_aligned = {
105105
{RCS0, COMMON_SLICE_CHICKEN2, 0xffff, true}, /* 0x7014 */
106106
{RCS0, GEN9_CS_DEBUG_MODE1, 0xffff, false}, /* 0x20ec */
107107
{RCS0, GEN8_L3SQCREG4, 0, false}, /* 0xb118 */
108+
{RCS0, GEN9_SCRATCH1, 0, false}, /* 0xb11c */
109+
{RCS0, GEN9_SCRATCH_LNCF1, 0, false}, /* 0xb008 */
108110
{RCS0, GEN7_HALF_SLICE_CHICKEN1, 0xffff, true}, /* 0xe100 */
109111
{RCS0, HALF_SLICE_CHICKEN2, 0xffff, true}, /* 0xe180 */
110112
{RCS0, HALF_SLICE_CHICKEN3, 0xffff, true}, /* 0xe184 */

0 commit comments

Comments
 (0)