diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2016-06-07 10:19:03 -0400 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@intel.com> | 2016-07-15 08:51:25 -0400 |
commit | 738fa1b3123f9a3b4374b4156ad54a2b64273f51 (patch) | |
tree | 7e5755e8b28f397ddb87f47258f2aa87ee1e28d9 | |
parent | 9146f308d5916e20c53afe3ee0bd4dbd562a0ef9 (diff) |
drm/i915/kbl: Add WaDisableLSQCROPERFforOCL
Extend the scope of this workaround, already used in skl,
to also take effect in kbl.
v2: Fix KBL_REVID_E0 (Matthew)
References: HSD#2132677
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-12-git-send-email-mika.kuoppala@intel.com
(cherry picked from commit fe90581987cd5fadd2942f59f8511bcb39fdec34)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 13 |
3 files changed, 20 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 6ddd1655f6fe..b0fffa0d1c07 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -2602,6 +2602,9 @@ struct drm_i915_cmd_table { | |||
2602 | 2602 | ||
2603 | #define KBL_REVID_A0 0x0 | 2603 | #define KBL_REVID_A0 0x0 |
2604 | #define KBL_REVID_B0 0x1 | 2604 | #define KBL_REVID_B0 0x1 |
2605 | #define KBL_REVID_C0 0x2 | ||
2606 | #define KBL_REVID_D0 0x3 | ||
2607 | #define KBL_REVID_E0 0x4 | ||
2605 | 2608 | ||
2606 | #define IS_KBL_REVID(p, since, until) \ | 2609 | #define IS_KBL_REVID(p, since, until) \ |
2607 | (IS_KABYLAKE(p) && IS_REVID(p, since, until)) | 2610 | (IS_KABYLAKE(p) && IS_REVID(p, since, until)) |
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 42eac37de047..cf18eace6690 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c | |||
@@ -1103,15 +1103,17 @@ static inline int gen8_emit_flush_coherentl3_wa(struct intel_engine_cs *engine, | |||
1103 | uint32_t *const batch, | 1103 | uint32_t *const batch, |
1104 | uint32_t index) | 1104 | uint32_t index) |
1105 | { | 1105 | { |
1106 | struct drm_i915_private *dev_priv = engine->dev->dev_private; | ||
1106 | uint32_t l3sqc4_flush = (0x40400000 | GEN8_LQSC_FLUSH_COHERENT_LINES); | 1107 | uint32_t l3sqc4_flush = (0x40400000 | GEN8_LQSC_FLUSH_COHERENT_LINES); |
1107 | 1108 | ||
1108 | /* | 1109 | /* |
1109 | * WaDisableLSQCROPERFforOCL:skl | 1110 | * WaDisableLSQCROPERFforOCL:skl,kbl |
1110 | * This WA is implemented in skl_init_clock_gating() but since | 1111 | * This WA is implemented in skl_init_clock_gating() but since |
1111 | * this batch updates GEN8_L3SQCREG4 with default value we need to | 1112 | * this batch updates GEN8_L3SQCREG4 with default value we need to |
1112 | * set this bit here to retain the WA during flush. | 1113 | * set this bit here to retain the WA during flush. |
1113 | */ | 1114 | */ |
1114 | if (IS_SKL_REVID(engine->dev, 0, SKL_REVID_E0)) | 1115 | if (IS_SKL_REVID(dev_priv, 0, SKL_REVID_E0) || |
1116 | IS_KBL_REVID(dev_priv, 0, KBL_REVID_E0)) | ||
1115 | l3sqc4_flush |= GEN8_LQSC_RO_PERF_DIS; | 1117 | l3sqc4_flush |= GEN8_LQSC_RO_PERF_DIS; |
1116 | 1118 | ||
1117 | wa_ctx_emit(batch, index, (MI_STORE_REGISTER_MEM_GEN8 | | 1119 | wa_ctx_emit(batch, index, (MI_STORE_REGISTER_MEM_GEN8 | |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index bdb3304b213c..421e03d99c28 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1207,6 +1207,19 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine) | |||
1207 | WA_SET_BIT_MASKED(HDC_CHICKEN0, | 1207 | WA_SET_BIT_MASKED(HDC_CHICKEN0, |
1208 | HDC_FENCE_DEST_SLM_DISABLE); | 1208 | HDC_FENCE_DEST_SLM_DISABLE); |
1209 | 1209 | ||
1210 | /* GEN8_L3SQCREG4 has a dependency with WA batch so any new changes | ||
1211 | * involving this register should also be added to WA batch as required. | ||
1212 | */ | ||
1213 | if (IS_KBL_REVID(dev_priv, 0, KBL_REVID_E0)) | ||
1214 | /* WaDisableLSQCROPERFforOCL:kbl */ | ||
1215 | I915_WRITE(GEN8_L3SQCREG4, I915_READ(GEN8_L3SQCREG4) | | ||
1216 | GEN8_LQSC_RO_PERF_DIS); | ||
1217 | |||
1218 | /* WaDisableLSQCROPERFforOCL:kbl */ | ||
1219 | ret = wa_ring_whitelist_reg(engine, GEN8_L3SQCREG4); | ||
1220 | if (ret) | ||
1221 | return ret; | ||
1222 | |||
1210 | return 0; | 1223 | return 0; |
1211 | } | 1224 | } |
1212 | 1225 | ||