drm/i915/bdw: Implement WaForceContextSaveRestoreNonCoherent
Subsystems (2)
PATCH v2 1/1 drm/i915/bdw: Implement WaForceContextSaveRestoreNonCoherent
v2: Reorder defines (Ben)
--- drivers/gpu/drm/i915/i915_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -2
@@ -5273,10 +5273,11 @@ enum skl_disp_power_wells {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300 -#define HDC_FORCE_NON_COHERENT (1<<4) -#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_FENCE_DEST_SLM_DISABLE (1<<14) +#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_BARRIER_PERFORMANCE_DISABLE (1<<10) +#define HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT (1<<5) +#define HDC_FORCE_NON_COHERENT (1<<4)/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030
drivers/gpu/drm/i915/intel_ringbuffer.c +2 -0
@@ -790,9 +790,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)*/ /* WaForceEnableNonCoherent:bdw */ /* WaHdcDisableFetchWhenMasked:bdw */ +/* WaForceContextSaveRestoreNonCoherent:bdw */ /* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */ WA_SET_BIT_MASKED (HDC_CHICKEN0 ,HDC_FORCE_NON_COHERENT | +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |HDC_DONOT_FETCH_MEM_WHEN_MASKED | (IS_BDW_GT3 (dev) ?HDC_FENCE_DEST_SLM_DISABLE :0 ));
Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 1 line · Damien Lespiau
v2: Reorder defines (Ben)
Bikeshed time?
Quoted 7 lines
/* WaCatErrorRejectionIssue */
#defineGEN7_SQ_CHICKEN_MBCUNIT_CONFIG0x9030drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0
drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 799
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +2
-0@@ -790,9 +790,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)*/ /* WaForceEnableNonCoherent:bdw */ /* WaHdcDisableFetchWhenMasked:bdw */ +/* WaForceContextSaveRestoreNonCoherent:bdw */ /* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */ WA_SET_BIT_MASKED (HDC_CHICKEN0 ,HDC_FORCE_NON_COHERENT | +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |HDC_DONOT_FETCH_MEM_WHEN_MASKED | (IS_BDW_GT3 (dev) ?HDC_FENCE_DEST_SLM_DISABLE :0 ));
This is nicer as:
WA_SET_BIT_MASKED(HDC_CHICKEN0,
/* WaForceEnableNonCoherent:bdw */ HDC_FORCE_NON_COHERENT | + /* WaForceContextSaveRestoreNonCoherent:bdw */ + HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | /* WaHdcDisableFetchWhenMasked:bdw */ HDC_DONOT_FETCH_MEM_WHEN_MASKED | /* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */
(IS_BDW_GT3(dev) ? HDC_FENCE_DEST_SLM_DISABLE : 0));
Indeed, that shows that you misorded your comment! ;-) -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v3 1/1 drm/i915/bdw: Implement WaForceContextSaveRestoreNonCoherent
v2: Reorder defines (Ben)
v3: More bikesheds, this time re-ordering comments! (Chris)
--- drivers/gpu/drm/i915/i915_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -2
@@ -5273,10 +5273,11 @@ enum skl_disp_power_wells {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300 -#define HDC_FORCE_NON_COHERENT (1<<4) -#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_FENCE_DEST_SLM_DISABLE (1<<14) +#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_BARRIER_PERFORMANCE_DISABLE (1<<10) +#define HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT (1<<5) +#define HDC_FORCE_NON_COHERENT (1<<4)/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030
drivers/gpu/drm/i915/intel_ringbuffer.c +5 -3
@@ -788,12 +788,14 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. */ -/* WaForceEnableNonCoherent:bdw */ -/* WaHdcDisableFetchWhenMasked:bdw */ -/* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */ WA_SET_BIT_MASKED (HDC_CHICKEN0 , +/* WaForceEnableNonCoherent:bdw */ HDC_FORCE_NON_COHERENT | +/* WaForceContextSaveRestoreNonCoherent:bdw */ +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +/* WaHdcDisableFetchWhenMasked:bdw */ HDC_DONOT_FETCH_MEM_WHEN_MASKED | +/* WaDisableFenceDestinationToSLM:bdw (pre-prod) */ (IS_BDW_GT3 (dev) ?HDC_FENCE_DEST_SLM_DISABLE :0 ));/* From the Haswell PRM, Command Reference: Registers, CACHE_MODE_0:
Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 6 lines · Damien Lespiau
v2: Reorder defines (Ben)
v3: More bikesheds, this time re-ordering comments! (Chris)Reviewed-by Ben Widawsky <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>Signed-off-by Damien Lespiau <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 52 lines
--- drivers/gpu/drm/i915/i915_reg.h | 5 +++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-)drivers/gpu/drm/i915/i915_reg.h +3
-2@@ -5273,10 +5273,11 @@ enum skl_disp_power_wells {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300 -#define HDC_FORCE_NON_COHERENT (1<<4) -#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_FENCE_DEST_SLM_DISABLE (1<<14) +#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_BARRIER_PERFORMANCE_DISABLE (1<<10) +#define HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT (1<<5) +#define HDC_FORCE_NON_COHERENT (1<<4)/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030drivers/gpu/drm/i915/intel_ringbuffer.c +5
-3@@ -788,12 +788,14 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. */ -/* WaForceEnableNonCoherent:bdw */ -/* WaHdcDisableFetchWhenMasked:bdw */ -/* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */ WA_SET_BIT_MASKED (HDC_CHICKEN0 , +/* WaForceEnableNonCoherent:bdw */ HDC_FORCE_NON_COHERENT | +/* WaForceContextSaveRestoreNonCoherent:bdw */ +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT | +/* WaHdcDisableFetchWhenMasked:bdw */ HDC_DONOT_FETCH_MEM_WHEN_MASKED | +/* WaDisableFenceDestinationToSLM:bdw (pre-prod) */ (IS_BDW_GT3 (dev) ?HDC_FENCE_DEST_SLM_DISABLE :0 ));/* From the Haswell PRM, Command Reference: Registers, CACHE_MODE_0: Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Chris Wilson
Quoted 1 line · Damien Lespiau
v2: Reorder defines (Ben)
Bikeshed time?
Oh no, why did I give in the first time? now I'm being bullied!
Quoted 27 lines
Quoted 7 lines
/* WaCatErrorRejectionIssue */
#defineGEN7_SQ_CHICKEN_MBCUNIT_CONFIG0x9030drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 799
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +2
-0@@ -790,9 +790,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)*/ /* WaForceEnableNonCoherent:bdw */ /* WaHdcDisableFetchWhenMasked:bdw */ +/* WaForceContextSaveRestoreNonCoherent:bdw */ /* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */ WA_SET_BIT_MASKED (HDC_CHICKEN0 ,HDC_FORCE_NON_COHERENT | +HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |HDC_DONOT_FETCH_MEM_WHEN_MASKED | (IS_BDW_GT3 (dev) ?HDC_FENCE_DEST_SLM_DISABLE :0 ));This is nicer as:
WA_SET_BIT_MASKED(HDC_CHICKEN0,/* WaForceEnableNonCoherent:bdw */drivers/gpu/drm/i915/intel_ringbuffer.c +2
-0HDC_FORCE_NON_COHERENT | +/* WaForceContextSaveRestoreNonCoherent:bdw */ + HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT |/* WaHdcDisableFetchWhenMasked:bdw */ HDC_DONOT_FETCH_MEM_WHEN_MASKED | /* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production) */
Quoted 3 lines
(
IS_BDW_GT3(dev)?HDC_FENCE_DEST_SLM_DISABLE: 0));Indeed, that shows that you misorded your comment! ;-)
Ah, but there is a line over 80 characters there! not acceptable!
Signature · 5 lines
Damien _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx