drm/i915: Move a bunch of workaround-related code to its own file
Subsystems (2)
PATCH 1/6 drm/i915: Move a bunch of workaround-related code to its own file
This has grown to be a sizable amount of code, so move it to its own file before we try to refactor anything. For the moment, we are leaving behind the WA BB code and the WAs that get applied (incorrectly) in init_clock_gating, but we will deal with it later.
v2: Use intel_ prefix for code that deals with the hardware (Chris)
v3: Rebased
v4:
- Rebased
- New license header
--- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/intel_engine_cs.c | 634 ------------------------------ drivers/gpu/drm/i915/intel_lrc.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 1 + drivers/gpu/drm/i915/intel_ringbuffer.h | 3 - drivers/gpu/drm/i915/intel_workarounds.c | 642 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_workarounds.h | 13 + 7 files changed, 659 insertions(+), 638 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_workarounds.c create mode 100644 drivers/gpu/drm/i915/intel_workarounds.h
drivers/gpu/drm/i915/Makefile +2 -1
@@ -43,7 +43,8 @@ i915-y := i915_drv.o \ intel_csr.o \ intel_device_info.o \ intel_pm.o \ - intel_runtime_pm.o + intel_runtime_pm.o \ + intel_workarounds.o i915-$(CONFIG_COMPAT) += i915_ioc32.o i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
drivers/gpu/drm/i915/intel_engine_cs.c +0 -634
640 lines not on this page · raw message
drivers/gpu/drm/i915/intel_lrc.c +1 -0
@@ -139,6 +139,7 @@#include "i915_gem_render_state.h" #include "intel_lrc_reg.h" #include "intel_mocs.h" +#include "intel_workarounds.h" #define RING_EXECLIST_QFULL (1 << 0x2)#define RING_EXECLIST1_VALID (1 << 0x3)
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -0
@@ -36,6 +36,7 @@#include "i915_gem_render_state.h" #include "i915_trace.h" #include "intel_drv.h" +#include "intel_workarounds.h" /* Rough estimate of the typical request size, performing a flush, * set-context and then emitting the batch.
drivers/gpu/drm/i915/intel_ringbuffer.h +0 -3
@@ -837,9 +837,6 @@ static inline u32 intel_engine_last_submit(struct intel_engine_cs *engine)return READ_ONCE (engine->timeline->seqno); } -int init_workarounds_ring (struct intel_engine_cs *engine); -int intel_ring_workarounds_emit (struct drm_i915_gem_request *req); -void intel_engine_get_instdone (struct intel_engine_cs *engine,struct intel_instdone *instdone);
drivers/gpu/drm/i915/intel_workarounds.c new file +642 -0
642 lines not on this page · raw message
drivers/gpu/drm/i915/intel_workarounds.h new file +13 -0
@@ -0,0 +1,13 @@ +/* +* SPDX-License-Identifier: MIT +* +* Copyright © 2014-2018 Intel Corporation +*/ + +#ifndef _I915_WORKAROUNDS_H_ +#define _I915_WORKAROUNDS_H_ + +int init_workarounds_ring (struct intel_engine_cs *engine); +int intel_ring_workarounds_emit (struct drm_i915_gem_request *req); + +#endif
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/6 drm/i915: Split out functions for different kinds of workarounds
There are different kind of workarounds (those that modify registers that live in the context image, those that modify global registers, those that whitelist registers, etc...) and they have different requirements in terms of where they are applied and how. Also, by splitting them apart, it should be easier to decide where a new workaround should go.
v2:
- Add multiple MISSING_CASE
- Rebased
v3:
- Rename mmio_workarounds to gt_workarounds (Chris, Mika)
- Create empty placeholders for BDW and CHV GT WAs
- Rebased
v4: Rebased
--- drivers/gpu/drm/i915/i915_gem.c | 3 + drivers/gpu/drm/i915/i915_gem_context.c | 6 + drivers/gpu/drm/i915/intel_lrc.c | 10 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 +- drivers/gpu/drm/i915/intel_workarounds.c | 627 +++++++++++++++++++------------ drivers/gpu/drm/i915/intel_workarounds.h | 8 +- 6 files changed, 414 insertions(+), 244 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +3 -0
@@ -35,6 +35,7 @@#include "intel_drv.h" #include "intel_frontbuffer.h" #include "intel_mocs.h" +#include "intel_workarounds.h" #include "i915_gemfs.h" #include <linux/dma-fence-array.h> #include <linux/kthread.h>
@@ -5107,6 +5108,8 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv) } } +intel_gt_workarounds_apply (dev_priv); +i915_gem_init_swizzling (dev_priv);/*
drivers/gpu/drm/i915/i915_gem_context.c +6 -0
@@ -90,6 +90,7 @@#include <drm/i915_drm.h> #include "i915_drv.h" #include "i915_trace.h" +#include "intel_workarounds.h" #define ALL_L3_SLICES (dev) (1 << NUM_L3_SLICES(dev)) - 1
@@ -452,11 +453,16 @@ static bool needs_preempt_context(struct drm_i915_private *i915)int i915_gem_contexts_init (struct drm_i915_private *dev_priv) {struct i915_gem_context *ctx; +int ret;/* Reassure ourselves we are only called once */ GEM_BUG_ON (dev_priv->kernel_context);GEM_BUG_ON (dev_priv->preempt_context); + ret =intel_ctx_workarounds_init (dev_priv); +if (ret) +return ret; +INIT_LIST_HEAD (&dev_priv->contexts.list);INIT_WORK (&dev_priv->contexts.free_work, contexts_free_worker);init_llist_head (&dev_priv->contexts.free_list);
drivers/gpu/drm/i915/intel_lrc.c +7 -3
@@ -1544,7 +1544,7 @@ static int gen8_init_render_ring(struct intel_engine_cs *engine)I915_WRITE (INSTPM ,_MASKED_BIT_ENABLE (INSTPM_FORCE_ORDERING )); -return init_workarounds_ring (engine); +return 0 ; }static int gen9_init_render_ring (struct intel_engine_cs *engine)
@@ -1555,7 +1555,11 @@ static int gen9_init_render_ring(struct intel_engine_cs *engine)if (ret)return ret; -return init_workarounds_ring (engine); + ret =intel_whitelist_workarounds_apply (engine); +if (ret) +return ret; + +return 0 ; }static void reset_irq (struct intel_engine_cs *engine)
@@ -1904,7 +1908,7 @@ static int gen8_init_rcs_context(struct drm_i915_gem_request *req) {int ret; - ret =intel_ring_workarounds_emit (req); + ret =intel_ctx_workarounds_emit (req);if (ret)return ret;
drivers/gpu/drm/i915/intel_ringbuffer.c +2 -2
@@ -600,7 +600,7 @@ static int intel_rcs_ctx_init(struct drm_i915_gem_request *req) {int ret; - ret =intel_ring_workarounds_emit (req); + ret =intel_ctx_workarounds_emit (req);if (ret !=0 )return ret;
@@ -659,7 +659,7 @@ static int init_render_ring(struct intel_engine_cs *engine)if (INTEL_GEN (dev_priv) >=6 )I915_WRITE_IMR (engine, ~engine->irq_keep_mask); -return init_workarounds_ring (engine); +return 0 ; }static u32 *gen6_signal (struct drm_i915_gem_request *req,u32 *cs)
drivers/gpu/drm/i915/intel_workarounds.c +390 -237
812 lines not on this page · raw message
drivers/gpu/drm/i915/intel_workarounds.h +6 -2
@@ -7,7 +7,11 @@#ifndef _I915_WORKAROUNDS_H_#define _I915_WORKAROUNDS_H_ -int init_workarounds_ring (struct intel_engine_cs *engine); -int intel_ring_workarounds_emit (struct drm_i915_gem_request *req); +int intel_ctx_workarounds_init (struct drm_i915_private *dev_priv); +int intel_ctx_workarounds_emit (struct drm_i915_gem_request *req); + +void intel_gt_workarounds_apply (struct drm_i915_private *dev_priv); + +int intel_whitelist_workarounds_apply (struct intel_engine_cs *engine);#endif
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/6] drm/i915: Split out functions for different kinds of workarounds
Quoting Oscar Mateo (2018-02-15 22:46:41)
Quoted 94 lines
There are different kind of workarounds (those that modify registers that live in the context image, those that modify global registers, those that whitelist registers, etc...) and they have different requirements in terms of where they are applied and how. Also, by splitting them apart, it should be easier to decide where a new workaround should go.
v2:
- Add multipleMISSING_CASE
- Rebasedv3:
- Renamemmio_workaroundstogt_workarounds(Chris, Mika)
- Create empty placeholders for BDW and CHV GT WAs
- Rebasedv4: Rebased
Signed-off-by Oscar Mateo <[email protected]>Cc Chris Wilson <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_gem.c | 3 + drivers/gpu/drm/i915/i915_gem_context.c | 6 + drivers/gpu/drm/i915/intel_lrc.c | 10 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 +- drivers/gpu/drm/i915/intel_workarounds.c | 627 +++++++++++++++++++------------ drivers/gpu/drm/i915/intel_workarounds.h | 8 +- 6 files changed, 414 insertions(+), 244 deletions(-)drivers/gpu/drm/i915/i915_gem.c +3
-0@@ -35,6 +35,7 @@#include "intel_drv.h" #include "intel_frontbuffer.h" #include "intel_mocs.h" +#include "intel_workarounds.h" #include "i915_gemfs.h" #include <linux/dma-fence-array.h> #include <linux/kthread.h> @@ -5107,6 +5108,8 @@ int i915_gem_init_hw(struct drm_i915_private *dev_priv) } } +intel_gt_workarounds_apply (dev_priv); +i915_gem_init_swizzling (dev_priv);/* drivers/gpu/drm/i915/i915_gem_context.c +6
-0@@ -90,6 +90,7 @@#include <drm/i915_drm.h> #include "i915_drv.h" #include "i915_trace.h" +#include "intel_workarounds.h" #define ALL_L3_SLICES (dev) (1 << NUM_L3_SLICES(dev)) - 1@@ -452,11 +453,16 @@ static bool needs_preempt_context(struct drm_i915_private *i915)int i915_gem_contexts_init (struct drm_i915_private *dev_priv) {struct i915_gem_context *ctx; +int ret;/* Reassure ourselves we are only called once */ GEM_BUG_ON (dev_priv->kernel_context);GEM_BUG_ON (dev_priv->preempt_context); + ret =intel_ctx_workarounds_init (dev_priv); +if (ret) +return ret; +INIT_LIST_HEAD (&dev_priv->contexts.list);INIT_WORK (&dev_priv->contexts.free_work, contexts_free_worker);init_llist_head (&dev_priv->contexts.free_list);drivers/gpu/drm/i915/intel_lrc.c +1
-1@@ -1544,7 +1544,7 @@ static int gen8_init_render_ring(struct intel_engine_cs *engine)I915_WRITE (INSTPM ,_MASKED_BIT_ENABLE (INSTPM_FORCE_ORDERING )); -return init_workarounds_ring (engine); +return 0 ; }static int gen9_init_render_ring (struct intel_engine_cs *engine)
drivers/gpu/drm/i915/intel_lrc.c static int gen9_init_render_ring(struct intel_engine_cs *engine) · line 1560
Quoted 7 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-1@@ -1555,7 +1555,11 @@ static int gen9_init_render_ring(struct intel_engine_cs *engine)if (ret)return ret; -return init_workarounds_ring (engine); + ret =intel_whitelist_workarounds_apply (engine); +if (ret) +return ret;
This looks wrong, as I expect this to be universal and gen8 appears absent. And it should also be called from legacy submission, even if always empty.
Quoted 28 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-1+ +return 0 ; }static void reset_irq (struct intel_engine_cs *engine)@@ -1904,7 +1908,7 @@ static int gen8_init_rcs_context(struct drm_i915_gem_request *req) {int ret; - ret =intel_ring_workarounds_emit (req); + ret =intel_ctx_workarounds_emit (req);if (ret)return ret;drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -600,7 +600,7 @@ static int intel_rcs_ctx_init(struct drm_i915_gem_request *req) {int ret; - ret =intel_ring_workarounds_emit (req); + ret =intel_ctx_workarounds_emit (req);if (ret !=0 )return ret;
drivers/gpu/drm/i915/intel_ringbuffer.c static int init_render_ring(struct intel_engine_cs *engine) · line 663
Quoted 6 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -659,7 +659,7 @@ static int init_render_ring(struct intel_engine_cs *engine)if (INTEL_GEN (dev_priv) >=6 )I915_WRITE_IMR (engine, ~engine->irq_keep_mask); -return init_workarounds_ring (engine); +return 0 ; }
Otherwise, ok.
Quoted 364 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0static u32 *gen6_signal (struct drm_i915_gem_request *req,u32 *cs)drivers/gpu/drm/i915/intel_workarounds.c +93
-139@@ -40,27 +40,8 @@ static int wa_add(struct drm_i915_private *dev_priv,#define WA_SET_FIELD_MASKED (addr, mask, value) \ WA_REG(addr, mask, _MASKED_FIELD(mask, value)) -static int wa_ring_whitelist_reg (struct intel_engine_cs *engine, -i915_reg_t reg) -{ -struct drm_i915_private *dev_priv = engine->i915; -struct i915_workarounds *wa = &dev_priv->workarounds; -const uint32_t index = wa->hw_whitelist_count[engine->id]; - -if (WARN_ON (index >=RING_MAX_NONPRIV_SLOTS )) -return -EINVAL ; - -I915_WRITE (RING_FORCE_TO_NONPRIV (engine->mmio_base, index), -i915_mmio_reg_offset (reg)); - wa->hw_whitelist_count[engine->id]++; - -return 0 ; -} - -static int gen8_init_workarounds (struct intel_engine_cs *engine) +static int gen8_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915; -WA_SET_BIT_MASKED (INSTPM ,INSTPM_FORCE_ORDERING );/* WaDisableAsyncFlipPerfMode:bdw,chv */ @@ -108,12 +89,11 @@ static int gen8_init_workarounds(struct intel_engine_cs *engine)return 0 ; } -static int bdw_init_workarounds (struct intel_engine_cs *engine) +static int bdw_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915;int ret; - ret =gen8_init_workarounds (engine); + ret =gen8_ctx_workarounds_init (dev_priv);if (ret)return ret;@@ -140,12 +120,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *engine)return 0 ; } -static int chv_init_workarounds (struct intel_engine_cs *engine) +static int chv_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915;int ret; - ret =gen8_init_workarounds (engine); + ret =gen8_ctx_workarounds_init (dev_priv);if (ret)return ret;@@ -158,23 +137,8 @@ static int chv_init_workarounds(struct intel_engine_cs *engine)return 0 ; } -static int gen9_init_workarounds (struct intel_engine_cs *engine) +static int gen9_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915; -int ret; - -/* WaConextSwitchWithConcurrentTLBInvalidate:skl,bxt,kbl,glk,cfl */ -I915_WRITE (GEN9_CSFE_CHICKEN1_RCS ,_MASKED_BIT_ENABLE (GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE )); - -/* WaEnableLbsSlaRetryTimerDecrement:skl,bxt,kbl,glk,cfl */ -I915_WRITE (BDW_SCRATCH1 ,I915_READ (BDW_SCRATCH1 ) | -GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE ); - -/* WaDisableKillLogic:bxt,skl,kbl */ -if (!IS_COFFEELAKE (dev_priv)) -I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) | -ECOCHK_DIS_TLB ); -if (HAS_LLC (dev_priv)) {/* WaCompressedResourceSamplerPbeMediaNewHashMode:skl,kbl * @@ -185,11 +149,6 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine) GEN9_PBE_COMPRESSED_HASH_SELECTION);WA_SET_BIT_MASKED (GEN9_HALF_SLICE_CHICKEN7 ,GEN9_SAMPLER_HASH_COMPRESSED_READ_ADDR ); - -I915_WRITE (MMCD_MISC_CTRL , -I915_READ (MMCD_MISC_CTRL ) | -MMCD_PCLA | -MMCD_HOTSPOT_EN ); }/* WaClearFlowControlGpgpuContextSave:skl,bxt,kbl,glk,cfl */ @@ -240,10 +199,6 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)WA_SET_BIT_MASKED (HDC_CHICKEN0 ,HDC_FORCE_NON_COHERENT ); -/* WaDisableHDCInvalidation:skl,bxt,kbl,cfl */ -I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) | -BDW_DISABLE_HDC_INVALIDATION ); -/* WaDisableSamplerPowerBypassForSOPingPong:skl,bxt,kbl,cfl */ if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv) ||@@ -254,19 +209,6 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)/* WaDisableSTUnitPowerOptimization:skl,bxt,kbl,glk,cfl */ WA_SET_BIT_MASKED (HALF_SLICE_CHICKEN2 ,GEN8_ST_PO_DISABLE ); -/* WaProgramL3SqcReg1DefaultForPerf:bxt,glk */ -if (IS_GEN9_LP (dev_priv)) { -u32 val =I915_READ (GEN8_L3SQCREG1 ); - - val &= ~L3_PRIO_CREDITS_MASK ; - val |=L3_GENERAL_PRIO_CREDITS (62 ) |L3_HIGH_PRIO_CREDITS (2 ); -I915_WRITE (GEN8_L3SQCREG1 , val); - } - -/* WaOCLCoherentLineFlush:skl,bxt,kbl,cfl */ -I915_WRITE (GEN8_L3SQCREG4 , (I915_READ (GEN8_L3SQCREG4 ) | -GEN8_LQSC_FLUSH_COHERENT_LINES )); -/* * Supporting preemption with fine-granularity requires changes in the * batch buffer programming. Since we can't break old userspace, we @@ -285,29 +227,11 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)WA_SET_FIELD_MASKED (GEN8_CS_CHICKEN1 ,GEN9_PREEMPT_GPGPU_LEVEL_MASK ,GEN9_PREEMPT_GPGPU_COMMAND_LEVEL ); -/* WaVFEStateAfterPipeControlwithMediaStateClear:skl,bxt,glk,cfl */ - ret =wa_ring_whitelist_reg (engine,GEN9_CTX_PREEMPT_REG ); -if (ret) -return ret; - -/* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl,[cnl] */ -I915_WRITE (GEN7_FF_SLICE_CS_CHICKEN1 , -_MASKED_BIT_ENABLE (GEN9_FFSC_PERCTX_PREEMPT_CTRL )); - ret =wa_ring_whitelist_reg (engine,GEN8_CS_CHICKEN1 ); -if (ret) -return ret; - -/* WaAllowUMDToModifyHDCChicken1:skl,bxt,kbl,glk,cfl */ - ret =wa_ring_whitelist_reg (engine,GEN8_HDC_CHICKEN1 ); -if (ret) -return ret; -return 0 ; } -static int skl_tune_iz_hashing (struct intel_engine_cs *engine) +static int skl_tune_iz_hashing (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915;u8 vals[3 ] = {0 ,0 ,0 };unsigned int i;@@ -346,77 +270,99 @@ static int skl_tune_iz_hashing(struct intel_engine_cs *engine)return 0 ; } -static int skl_init_workarounds (struct intel_engine_cs *engine) +static int skl_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915;int ret; - ret =gen9_init_workarounds (engine); + ret =gen9_ctx_workarounds_init (dev_priv);if (ret)return ret; -/* WaEnableGapsTsvCreditFix:skl */ -I915_WRITE (GEN8_GARBCNTL , (I915_READ (GEN8_GARBCNTL ) | -GEN9_GAPS_TSV_CREDIT_DISABLE )); - -/* WaDisableGafsUnitClkGating:skl */ -I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) | -GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE )); +return skl_tune_iz_hashing (dev_priv); +} -/* WaInPlaceDecompressionHang:skl */ -if (IS_SKL_REVID (dev_priv,SKL_REVID_H0 ,REVID_FOREVER )) -I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , - (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); +static int bxt_ctx_workarounds_init (struct drm_i915_private *dev_priv) +{ +int ret; -/* WaDisableLSQCROPERFforOCL:skl */ - ret =wa_ring_whitelist_reg (engine,GEN8_L3SQCREG4 ); + ret =gen9_ctx_workarounds_init (dev_priv);if (ret)return ret; -return skl_tune_iz_hashing (engine); +/* WaDisableThreadStallDopClockGating:bxt */ +WA_SET_BIT_MASKED (GEN8_ROW_CHICKEN , +STALL_DOP_GATING_DISABLE ); + +/* WaToEnableHwFixForPushConstHWBug:bxt */ +WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 , +GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); + +return 0 ; } -static int bxt_init_workarounds (struct intel_engine_cs *engine) +static int kbl_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915;int ret; - ret =gen9_init_workarounds (engine); + ret =gen9_ctx_workarounds_init (dev_priv);if (ret)return ret; -/* WaDisableThreadStallDopClockGating:bxt */ -WA_SET_BIT_MASKED (GEN8_ROW_CHICKEN , -STALL_DOP_GATING_DISABLE ); +/* WaDisableFenceDestinationToSLM:kbl (pre-prod) */ +if (IS_KBL_REVID (dev_priv,KBL_REVID_A0 ,KBL_REVID_A0 )) +WA_SET_BIT_MASKED (HDC_CHICKEN0 , +HDC_FENCE_DEST_SLM_DISABLE ); -/* WaDisablePooledEuLoadBalancingFix:bxt */ -I915_WRITE (FF_SLICE_CS_CHICKEN2 , -_MASKED_BIT_ENABLE (GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE )); +/* WaToEnableHwFixForPushConstHWBug:kbl */ +if (IS_KBL_REVID (dev_priv,KBL_REVID_C0 ,REVID_FOREVER )) +WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 , +GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); -/* WaToEnableHwFixForPushConstHWBug:bxt */ +/* WaDisableSbeCacheDispatchPortSharing:kbl */ +WA_SET_BIT_MASKED ( +GEN7_HALF_SLICE_CHICKEN1 , +GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE ); + +return 0 ; +} + +static int glk_ctx_workarounds_init (struct drm_i915_private *dev_priv) +{ +int ret; + + ret =gen9_ctx_workarounds_init (dev_priv); +if (ret) +return ret; + +/* WaToEnableHwFixForPushConstHWBug:glk */ WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 ,GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); -/* WaInPlaceDecompressionHang:bxt */ -I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , - (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); -return 0 ; } -static int cnl_init_workarounds (struct intel_engine_cs *engine) +static int cfl_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915;int ret; -/* WaDisableI2mCycleOnWRPort:cnl (pre-prod) */ -if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 )) -I915_WRITE (GAMT_CHKN_BIT_REG , - (I915_READ (GAMT_CHKN_BIT_REG ) | -GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT )); + ret =gen9_ctx_workarounds_init (dev_priv); +if (ret) +return ret; + +/* WaToEnableHwFixForPushConstHWBug:cfl */ +WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 , +GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); + +/* WaDisableSbeCacheDispatchPortSharing:cfl */ +WA_SET_BIT_MASKED ( +GEN7_HALF_SLICE_CHICKEN1 , +GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE ); + +return 0 ; +} +static int cnl_ctx_workarounds_init (struct drm_i915_private *dev_priv) +{/* WaForceContextSaveRestoreNonCoherent:cnl */ WA_SET_BIT_MASKED (CNL_HDC_CHICKEN0 ,HDC_FORCE_CONTEXT_SAVE_RESTORE_NON_COHERENT );@@ -434,15 +380,10 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 ,GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE ); -/* WaInPlaceDecompressionHang:cnl */ -I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , - (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | -GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); -/* WaPushConstantDereferenceHoldDisable:cnl */ WA_SET_BIT_MASKED (GEN7_ROW_CHICKEN2 ,PUSH_CONSTANT_DEREF_DISABLE ); -/* FtrEnableFastAnisoL1BankingFix: cnl */ +/* FtrEnableFastAnisoL1BankingFix:cnl */ WA_SET_BIT_MASKED (HALF_SLICE_CHICKEN3 ,CNL_FAST_ANISO_L1_BANKING_FIX );/* WaDisable3DMidCmdPreemption:cnl */ @@ -452,28 +393,175 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)WA_SET_FIELD_MASKED (GEN8_CS_CHICKEN1 ,GEN9_PREEMPT_GPGPU_LEVEL_MASK ,GEN9_PREEMPT_GPGPU_COMMAND_LEVEL ); -/* WaEnablePreemptionGranularityControlByUMD:cnl */ -I915_WRITE (GEN7_FF_SLICE_CS_CHICKEN1 , -_MASKED_BIT_ENABLE (GEN9_FFSC_PERCTX_PREEMPT_CTRL )); - ret=wa_ring_whitelist_reg (engine,GEN8_CS_CHICKEN1 ); -if (ret) -return ret; -/* WaDisableEarlyEOT:cnl */ WA_SET_BIT_MASKED (GEN8_ROW_CHICKEN ,DISABLE_EARLY_EOT );return 0 ; } -static int kbl_init_workarounds (struct intel_engine_cs *engine) +int intel_ctx_workarounds_init (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915; -int ret; +int err; + + dev_priv->workarounds.count =0 ; + +if (INTEL_GEN (dev_priv) <8 ) + err =0 ; +else if (IS_BROADWELL (dev_priv)) + err =bdw_ctx_workarounds_init (dev_priv); +else if (IS_CHERRYVIEW (dev_priv)) + err =chv_ctx_workarounds_init (dev_priv); +else if (IS_SKYLAKE (dev_priv)) + err =skl_ctx_workarounds_init (dev_priv); +else if (IS_BROXTON (dev_priv)) + err =bxt_ctx_workarounds_init (dev_priv); +else if (IS_KABYLAKE (dev_priv)) + err =kbl_ctx_workarounds_init (dev_priv); +else if (IS_GEMINILAKE (dev_priv)) + err =glk_ctx_workarounds_init (dev_priv); +else if (IS_COFFEELAKE (dev_priv)) + err =cfl_ctx_workarounds_init (dev_priv); +else if (IS_CANNONLAKE (dev_priv)) + err =cnl_ctx_workarounds_init (dev_priv);
drivers/gpu/drm/i915/intel_workarounds.c static int cnl_init_workarounds(struct intel_engine_cs *engine) · line 434
Quoted 10 lines
drivers/gpu/drm/i915/intel_workarounds.c +8
-1+else { +MISSING_CASE (INTEL_GEN (dev_priv)); + err =0 ; + } +if (err) +return err; - ret =gen9_init_workarounds (engine); +DRM_DEBUG_DRIVER ("Number of context specific w/a: %d\n" , + dev_priv->workarounds.count);
\o/ Only once!
Quoted 461 lines
drivers/gpu/drm/i915/intel_workarounds.c +289
-97+return 0 ; +} + +int intel_ctx_workarounds_emit (struct drm_i915_gem_request *req) +{ +struct i915_workarounds *w = &req->i915->workarounds; +u32 *cs; +int ret, i; + +if (w->count ==0 ) +return 0 ; + + ret = req->engine->emit_flush (req,EMIT_BARRIER );if (ret)return ret; + cs =intel_ring_begin (req, (w->count *2 +2 )); +if (IS_ERR (cs)) +return PTR_ERR (cs); + + *cs++ =MI_LOAD_REGISTER_IMM (w->count); +for (i =0 ; i < w->count; i++) { + *cs++ =i915_mmio_reg_offset (w->reg[i].addr); + *cs++ = w->reg[i].value; + } + *cs++ =MI_NOOP ; + +intel_ring_advance (req, cs); + + ret = req->engine->emit_flush (req,EMIT_BARRIER ); +if (ret) +return ret; + +return 0 ; +} + +static void bdw_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +} + +static void chv_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +} + +static void gen9_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +/* WaContextSwitchWithConcurrentTLBInvalidate:skl,bxt,kbl,glk,cfl */ +I915_WRITE (GEN9_CSFE_CHICKEN1_RCS , +_MASKED_BIT_ENABLE (GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE )); + +/* WaEnableLbsSlaRetryTimerDecrement:skl,bxt,kbl,glk,cfl */ +I915_WRITE (BDW_SCRATCH1 ,I915_READ (BDW_SCRATCH1 ) | +GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE ); + +/* WaDisableKillLogic:bxt,skl,kbl */ +if (!IS_COFFEELAKE (dev_priv)) +I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) | +ECOCHK_DIS_TLB ); + +if (HAS_LLC (dev_priv)) { +/* WaCompressedResourceSamplerPbeMediaNewHashMode:skl,kbl +* +* Must match Display Engine. See +* WaCompressedResourceDisplayNewHashMode. +*/ +I915_WRITE (MMCD_MISC_CTRL , +I915_READ (MMCD_MISC_CTRL ) | +MMCD_PCLA | +MMCD_HOTSPOT_EN ); + } + +/* WaDisableHDCInvalidation:skl,bxt,kbl,cfl */ +I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) | +BDW_DISABLE_HDC_INVALIDATION ); + +/* WaProgramL3SqcReg1DefaultForPerf:bxt,glk */ +if (IS_GEN9_LP (dev_priv)) { +u32 val =I915_READ (GEN8_L3SQCREG1 ); + + val &= ~L3_PRIO_CREDITS_MASK ; + val |=L3_GENERAL_PRIO_CREDITS (62 ) |L3_HIGH_PRIO_CREDITS (2 ); +I915_WRITE (GEN8_L3SQCREG1 , val); + } + +/* WaOCLCoherentLineFlush:skl,bxt,kbl,cfl */ +I915_WRITE (GEN8_L3SQCREG4 , (I915_READ (GEN8_L3SQCREG4 ) | +GEN8_LQSC_FLUSH_COHERENT_LINES )); + +/* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl,[cnl] */ +I915_WRITE (GEN7_FF_SLICE_CS_CHICKEN1 , +_MASKED_BIT_ENABLE (GEN9_FFSC_PERCTX_PREEMPT_CTRL )); +} + +static void skl_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +gen9_gt_workarounds_apply (dev_priv); + +/* WaEnableGapsTsvCreditFix:skl */ +I915_WRITE (GEN8_GARBCNTL , (I915_READ (GEN8_GARBCNTL ) | +GEN9_GAPS_TSV_CREDIT_DISABLE )); + +/* WaDisableGafsUnitClkGating:skl */ +I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) | +GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE )); + +/* WaInPlaceDecompressionHang:skl */ +if (IS_SKL_REVID (dev_priv,SKL_REVID_H0 ,REVID_FOREVER )) +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); +} + +static void bxt_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +gen9_gt_workarounds_apply (dev_priv); + +/* WaDisablePooledEuLoadBalancingFix:bxt */ +I915_WRITE (FF_SLICE_CS_CHICKEN2 , +_MASKED_BIT_ENABLE (GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE )); + +/* WaInPlaceDecompressionHang:bxt */ +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); +} + +static void kbl_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +gen9_gt_workarounds_apply (dev_priv); +/* WaEnableGapsTsvCreditFix:kbl */ I915_WRITE (GEN8_GARBCNTL , (I915_READ (GEN8_GARBCNTL ) |GEN9_GAPS_TSV_CREDIT_DISABLE ));@@ -484,159 +572,224 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine) (I915_READ (GAMT_CHKN_BIT_REG ) | GAMT_CHKN_DISABLE_DYNAMIC_CREDIT_SHARING)); -/* WaDisableFenceDestinationToSLM:kbl (pre-prod) */ -if (IS_KBL_REVID (dev_priv,KBL_REVID_A0 ,KBL_REVID_A0 )) -WA_SET_BIT_MASKED (HDC_CHICKEN0 , -HDC_FENCE_DEST_SLM_DISABLE ); - -/* WaToEnableHwFixForPushConstHWBug:kbl */ -if (IS_KBL_REVID (dev_priv,KBL_REVID_C0 ,REVID_FOREVER )) -WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 , -GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); -/* WaDisableGafsUnitClkGating:kbl */ I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) |GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE )); -/* WaDisableSbeCacheDispatchPortSharing:kbl */ -WA_SET_BIT_MASKED ( -GEN7_HALF_SLICE_CHICKEN1 , -GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE ); -/* WaInPlaceDecompressionHang:kbl */ I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) |GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); - -/* WaDisableLSQCROPERFforOCL:kbl */ - ret =wa_ring_whitelist_reg (engine,GEN8_L3SQCREG4 ); -if (ret) -return ret; - -return 0 ; } -static int glk_init_workarounds (struct intel_engine_cs *engine) +static void glk_gt_workarounds_apply (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915; -int ret; - - ret =gen9_init_workarounds (engine); -if (ret) -return ret; - -/* WA #0862: Userspace has to set "Barrier Mode" to avoid hangs. */ - ret =wa_ring_whitelist_reg (engine,GEN9_SLICE_COMMON_ECO_CHICKEN1 ); -if (ret) -return ret; - -/* WaToEnableHwFixForPushConstHWBug:glk */ -WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 , -GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); - -return 0 ; +gen9_gt_workarounds_apply (dev_priv); } -static int cfl_init_workarounds (struct intel_engine_cs *engine) +static void cfl_gt_workarounds_apply (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915; -int ret; - - ret =gen9_init_workarounds (engine); -if (ret) -return ret; +gen9_gt_workarounds_apply (dev_priv);/* WaEnableGapsTsvCreditFix:cfl */ I915_WRITE (GEN8_GARBCNTL , (I915_READ (GEN8_GARBCNTL ) |GEN9_GAPS_TSV_CREDIT_DISABLE )); -/* WaToEnableHwFixForPushConstHWBug:cfl */ -WA_SET_BIT_MASKED (COMMON_SLICE_CHICKEN2 , -GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION ); -/* WaDisableGafsUnitClkGating:cfl */ I915_WRITE (GEN7_UCGCTL4 , (I915_READ (GEN7_UCGCTL4 ) |GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE )); -/* WaDisableSbeCacheDispatchPortSharing:cfl */ -WA_SET_BIT_MASKED ( -GEN7_HALF_SLICE_CHICKEN1 , -GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE ); -/* WaInPlaceDecompressionHang:cfl */ I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) |GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); - -return 0 ; } -int init_workarounds_ring (struct intel_engine_cs *engine) +static void cnl_gt_workarounds_apply (struct drm_i915_private *dev_priv) { -struct drm_i915_private *dev_priv = engine->i915; -int err; +/* WaDisableI2mCycleOnWRPort:cnl (pre-prod) */ +if (IS_CNL_REVID (dev_priv,CNL_REVID_B0 ,CNL_REVID_B0 )) +I915_WRITE (GAMT_CHKN_BIT_REG , + (I915_READ (GAMT_CHKN_BIT_REG ) | +GAMT_CHKN_DISABLE_I2M_CYCLE_ON_WR_PORT )); -if (GEM_WARN_ON (engine->id !=RCS )) -return -EINVAL ; +/* WaInPlaceDecompressionHang:cnl */ +I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , + (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) | +GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); - dev_priv->workarounds.count =0 ; - dev_priv->workarounds.hw_whitelist_count[engine->id] =0 ; +/* WaEnablePreemptionGranularityControlByUMD:cnl */ +I915_WRITE (GEN7_FF_SLICE_CS_CHICKEN1 , +_MASKED_BIT_ENABLE (GEN9_FFSC_PERCTX_PREEMPT_CTRL )); +} -if (IS_BROADWELL (dev_priv)) - err =bdw_init_workarounds (engine); +void intel_gt_workarounds_apply (struct drm_i915_private *dev_priv) +{ +if (INTEL_GEN (dev_priv) <8 ) +return ; +else if (IS_BROADWELL (dev_priv)) +bdw_gt_workarounds_apply (dev_priv);else if (IS_CHERRYVIEW (dev_priv)) - err =chv_init_workarounds (engine); +chv_gt_workarounds_apply (dev_priv);else if (IS_SKYLAKE (dev_priv)) - err =skl_init_workarounds (engine); +skl_gt_workarounds_apply (dev_priv);else if (IS_BROXTON (dev_priv)) - err =bxt_init_workarounds (engine); +bxt_gt_workarounds_apply (dev_priv);else if (IS_KABYLAKE (dev_priv)) - err =kbl_init_workarounds (engine); +kbl_gt_workarounds_apply (dev_priv);else if (IS_GEMINILAKE (dev_priv)) - err =glk_init_workarounds (engine); +glk_gt_workarounds_apply (dev_priv);else if (IS_COFFEELAKE (dev_priv)) - err =cfl_init_workarounds (engine); +cfl_gt_workarounds_apply (dev_priv);else if (IS_CANNONLAKE (dev_priv)) - err =cnl_init_workarounds (engine); +cnl_gt_workarounds_apply (dev_priv);else - err =0 ; -if (err) -return err; +MISSING_CASE (INTEL_GEN (dev_priv)); +} + +static int wa_ring_whitelist_reg (struct intel_engine_cs *engine, +i915_reg_t reg) +{ +struct drm_i915_private *dev_priv = engine->i915; +struct i915_workarounds *wa = &dev_priv->workarounds; +const uint32_t index = wa->hw_whitelist_count[engine->id]; + +if (WARN_ON (index >=RING_MAX_NONPRIV_SLOTS )) +return -EINVAL ; + +I915_WRITE (RING_FORCE_TO_NONPRIV (engine->mmio_base, index), +i915_mmio_reg_offset (reg)); + wa->hw_whitelist_count[engine->id]++; -DRM_DEBUG_DRIVER ("%s: Number of context specific w/a: %d\n" , - engine->name, dev_priv->workarounds.count);return 0 ; } -int intel_ring_workarounds_emit (struct drm_i915_gem_request *req) +static int gen9_whitelist_workarounds_apply (struct intel_engine_cs *engine) { -struct i915_workarounds *w = &req->i915->workarounds; -u32 *cs; -int ret, i; +int ret; -if (w->count ==0 ) -return 0 ; +/* WaVFEStateAfterPipeControlwithMediaStateClear:skl,bxt,glk,cfl */ + ret =wa_ring_whitelist_reg (engine,GEN9_CTX_PREEMPT_REG ); +if (ret) +return ret; - ret = req->engine->emit_flush (req,EMIT_BARRIER ); +/* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl,[cnl] */ + ret =wa_ring_whitelist_reg (engine,GEN8_CS_CHICKEN1 );if (ret)return ret; - cs =intel_ring_begin (req, (w->count *2 +2 )); -if (IS_ERR (cs)) -return PTR_ERR (cs); +/* WaAllowUMDToModifyHDCChicken1:skl,bxt,kbl,glk,cfl */ + ret =wa_ring_whitelist_reg (engine,GEN8_HDC_CHICKEN1 ); +if (ret) +return ret; - *cs++ =MI_LOAD_REGISTER_IMM (w->count); -for (i =0 ; i < w->count; i++) { - *cs++ =i915_mmio_reg_offset (w->reg[i].addr); - *cs++ = w->reg[i].value; - } - *cs++ =MI_NOOP ; +return 0 ; +} -intel_ring_advance (req, cs); +static int skl_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +int ret =gen9_whitelist_workarounds_apply (engine); +if (ret) +return ret; - ret = req->engine->emit_flush (req,EMIT_BARRIER ); +/* WaDisableLSQCROPERFforOCL:skl */ + ret =wa_ring_whitelist_reg (engine,GEN8_L3SQCREG4 ); +if (ret) +return ret; + +return 0 ; +} + +static int bxt_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +int ret =gen9_whitelist_workarounds_apply (engine); +if (ret) +return ret; + +return 0 ; +} + +static int kbl_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +int ret =gen9_whitelist_workarounds_apply (engine); +if (ret) +return ret; + +/* WaDisableLSQCROPERFforOCL:kbl */ + ret =wa_ring_whitelist_reg (engine,GEN8_L3SQCREG4 ); +if (ret) +return ret; + +return 0 ; +} + +static int glk_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +int ret =gen9_whitelist_workarounds_apply (engine); +if (ret) +return ret; + +/* WA #0862: Userspace has to set "Barrier Mode" to avoid hangs. */ + ret =wa_ring_whitelist_reg (engine,GEN9_SLICE_COMMON_ECO_CHICKEN1 ); +if (ret) +return ret; + +return 0 ; +} + +static int cfl_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +int ret =gen9_whitelist_workarounds_apply (engine); +if (ret) +return ret; + +return 0 ; +} + +static int cnl_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +int ret; + +/* WaEnablePreemptionGranularityControlByUMD:cnl */ + ret =wa_ring_whitelist_reg (engine,GEN8_CS_CHICKEN1 );if (ret)return ret;return 0 ; } + +int intel_whitelist_workarounds_apply (struct intel_engine_cs *engine) +{ +struct drm_i915_private *dev_priv = engine->i915; +int err; + +WARN_ON (engine->id !=RCS ); + + dev_priv->workarounds.hw_whitelist_count[engine->id] =0 ; + +if (INTEL_GEN (dev_priv) <9 ) { +WARN (1 ,"No whitelisting in Gen%u\n" ,INTEL_GEN (dev_priv)); + err =0 ; + }else if (IS_SKYLAKE (dev_priv)) + err =skl_whitelist_workarounds_apply (engine); +else if (IS_BROXTON (dev_priv)) + err =bxt_whitelist_workarounds_apply (engine); +else if (IS_KABYLAKE (dev_priv)) + err =kbl_whitelist_workarounds_apply (engine); +else if (IS_GEMINILAKE (dev_priv)) + err =glk_whitelist_workarounds_apply (engine); +else if (IS_COFFEELAKE (dev_priv)) + err =cfl_whitelist_workarounds_apply (engine); +else if (IS_CANNONLAKE (dev_priv)) + err =cnl_whitelist_workarounds_apply (engine); +else { +MISSING_CASE (INTEL_GEN (dev_priv)); + err =0 ; + } +if (err) +return err; + +DRM_DEBUG_DRIVER ("%s: Number of whitelist w/a: %d\n" , engine->name, + dev_priv->workarounds.hw_whitelist_count[engine->id]); +return 0 ; +}drivers/gpu/drm/i915/intel_workarounds.h +0
-0@@ -7,7 +7,11 @@#ifndef _I915_WORKAROUNDS_H_
drivers/gpu/drm/i915/intel_workarounds.h line 15
Quoted 10 lines
drivers/gpu/drm/i915/intel_workarounds.h +6
-2#define _I915_WORKAROUNDS_H_ -int init_workarounds_ring (struct intel_engine_cs *engine); -int intel_ring_workarounds_emit (struct drm_i915_gem_request *req); +int intel_ctx_workarounds_init (struct drm_i915_private *dev_priv); +int intel_ctx_workarounds_emit (struct drm_i915_gem_request *req); + +void intel_gt_workarounds_apply (struct drm_i915_private *dev_priv); + +int intel_whitelist_workarounds_apply (struct intel_engine_cs *engine);
I'm comfortable with the rest, so if we can make the code flow identical for each path (just some have less work to do than others),
I think we should apply these patches slowly, so refine and resubmit this one by itself.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/6 drm/i915: Apply context workarounds directly
In reply to Oscar MateoOnce upon a time, we tried to apply workarounds for registers that lived inside the context image for every new context. That meant emitting LRI commands soon after each context was created.
Nowadays, we have a single golden context that gets used as a master template for future contexts. That golden context will acquire initial values for its image from the existing values in HW (thanks to inhibit restore bit). If all WAs are applied normally (i.e. using MMIO writes) before that happens, they will get soaked up by the golden context and transmitted correctly to new contexts.
All of this means we don't have to distinguish between context and non-context WAs anymore, because both can be applied in the same way (we still want to distinguish them though, because we would like to check their validity using i-g-t, and that means making sure we have a context loaded for ctx-residing WAs).
--- drivers/gpu/drm/i915/i915_gem_context.c | 5 +- drivers/gpu/drm/i915/intel_lrc.c | 4 - drivers/gpu/drm/i915/intel_ringbuffer.c | 4 - drivers/gpu/drm/i915/intel_workarounds.c | 174 +++++++------------------------ drivers/gpu/drm/i915/intel_workarounds.h | 3 +- 5 files changed, 42 insertions(+), 148 deletions(-)
drivers/gpu/drm/i915/i915_gem_context.c +1 -4
@@ -453,15 +453,12 @@ static bool needs_preempt_context(struct drm_i915_private *i915)int i915_gem_contexts_init (struct drm_i915_private *dev_priv) {struct i915_gem_context *ctx; -int ret;/* Reassure ourselves we are only called once */ GEM_BUG_ON (dev_priv->kernel_context);GEM_BUG_ON (dev_priv->preempt_context); - ret =intel_ctx_workarounds_init (dev_priv); -if (ret) -return ret; +intel_ctx_workarounds_apply (dev_priv);INIT_LIST_HEAD (&dev_priv->contexts.list);INIT_WORK (&dev_priv->contexts.free_work, contexts_free_worker);
drivers/gpu/drm/i915/intel_lrc.c +0 -4
@@ -1908,10 +1908,6 @@ static int gen8_init_rcs_context(struct drm_i915_gem_request *req) {int ret; - ret =intel_ctx_workarounds_emit (req); -if (ret) -return ret; - ret =intel_rcs_context_init_mocs (req);/* * Failing to program the MOCS is non-fatal.The system will not
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -4
@@ -600,10 +600,6 @@ static int intel_rcs_ctx_init(struct drm_i915_gem_request *req) {int ret; - ret =intel_ctx_workarounds_emit (req); -if (ret !=0 ) -return ret; - ret =i915_gem_render_state_emit (req);if (ret)return ret;
drivers/gpu/drm/i915/intel_workarounds.c +40 -134
308 lines not on this page · raw message
drivers/gpu/drm/i915/intel_workarounds.h +1 -2
@@ -7,8 +7,7 @@#ifndef _I915_WORKAROUNDS_H_#define _I915_WORKAROUNDS_H_ -int intel_ctx_workarounds_init (struct drm_i915_private *dev_priv); -int intel_ctx_workarounds_emit (struct drm_i915_gem_request *req); +void intel_ctx_workarounds_apply (struct drm_i915_private *dev_priv);void intel_gt_workarounds_apply (struct drm_i915_private *dev_priv);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/6] drm/i915: Apply context workarounds directly
Quoting Oscar Mateo (2018-02-15 22:46:42)
Quoted 11 lines
Once upon a time, we tried to apply workarounds for registers that lived inside the context image for every new context. That meant emitting LRI commands soon after each context was created.
Nowadays, we have a single golden context that gets used as a master template for future contexts. That golden context will acquire initial values for its image from the existing values in HW (thanks to inhibit restore bit). If all WAs are applied normally (i.e. using MMIO writes) before that happens, they will get soaked up by the golden context and transmitted correctly to new contexts.
Quoted 5 lines
All of this means we don't have to distinguish between context and non-context WAs anymore, because both can be applied in the same way (we still want to distinguish them though, because we would like to check their validity using i-g-t, and that means making sure we have a context loaded for ctx-residing WAs).
I think we need to guarantee that that's no possible sleep between context init and template save (that should be the case as we scrub rc6 during early load and should be holding forcewake for the entire duration). So I think we should mention the danger of losing the context-saved registers if we are not careful, and add assert_forcewakes_active(); with a similar statement inside __intel_engine_record_defaults().
With that explained and annotated,
and then we'll apply this after the dust from the first 2 settles. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/6 drm/i915: Move WA BB stuff to the workarounds file as well
In reply to Oscar MateoSince we are trying to put all WA stuff together, do not forget about the BB WAs.
v2: s/intel_bb_workarounds_init/intel_engine_init_bb_workarounds (Chris)
v3: Rebased to before the WAs are stored
v4: Rebased
--- drivers/gpu/drm/i915/intel_lrc.c | 290 +----------------------------- drivers/gpu/drm/i915/intel_workarounds.c | 291 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_workarounds.h | 3 + 3 files changed, 296 insertions(+), 288 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +2 -288
@@ -1181,292 +1181,6 @@ static int execlists_request_alloc(struct drm_i915_gem_request *request)return 0 ; } -/* -* In this WA we need to set GEN8_L3SQCREG4[21:21] and reset it after -* PIPE_CONTROL instruction. This is required for the flush to happen correctly -* but there is a slight complication as this is applied in WA batch where the -* values are only initialized once so we cannot take register value at the -* beginning and reuse it further; hence we save its value to memory, upload a -* constant value with bit21 set and then we restore it back with the saved value. -* To simplify the WA, a constant value is formed by using the default value -* of this register. This shouldn't be a problem because we are only modifying -* it for a short period and this batch in non-premptible. We can ofcourse -* use additional instructions that read the actual value of the register -* at that time and set our bit of interest but it makes the WA complicated. -* -* This WA is also required for Gen9 so extracting as a function avoids -* code duplication. -*/ -static u32 * -gen8_emit_flush_coherentl3_wa (struct intel_engine_cs *engine,u32 *batch) -{ - *batch++ =MI_STORE_REGISTER_MEM_GEN8 |MI_SRM_LRM_GLOBAL_GTT ; - *batch++ =i915_mmio_reg_offset (GEN8_L3SQCREG4 ); - *batch++ =i915_ggtt_offset (engine->scratch) +256 ; - *batch++ =0 ; - - *batch++ =MI_LOAD_REGISTER_IMM (1 ); - *batch++ =i915_mmio_reg_offset (GEN8_L3SQCREG4 ); - *batch++ =0x40400000 |GEN8_LQSC_FLUSH_COHERENT_LINES ; - - batch =gen8_emit_pipe_control (batch, -PIPE_CONTROL_CS_STALL | -PIPE_CONTROL_DC_FLUSH_ENABLE , -0 ); - - *batch++ =MI_LOAD_REGISTER_MEM_GEN8 |MI_SRM_LRM_GLOBAL_GTT ; - *batch++ =i915_mmio_reg_offset (GEN8_L3SQCREG4 ); - *batch++ =i915_ggtt_offset (engine->scratch) +256 ; - *batch++ =0 ; - -return batch; -} - -/* -* Typically we only have one indirect_ctx and per_ctx batch buffer which are -* initialized at the beginning and shared across all contexts but this field -* helps us to have multiple batches at different offsets and select them based -* on a criteria. At the moment this batch always start at the beginning of the page -* and at this point we don't have multiple wa_ctx batch buffers. -* -* The number of WA applied are not known at the beginning; we use this field -* to return the no of DWORDS written. -* -* It is to be noted that this batch does not contain MI_BATCH_BUFFER_END -* so it adds NOOPs as padding to make it cacheline aligned. -* MI_BATCH_BUFFER_END will be added to perctx batch and both of them together -* makes a complete batch buffer. -*/ -static u32 *gen8_init_indirectctx_bb (struct intel_engine_cs *engine,u32 *batch) -{ -/* WaDisableCtxRestoreArbitration:bdw,chv */ - *batch++ =MI_ARB_ON_OFF |MI_ARB_DISABLE ; - -/* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */ -if (IS_BROADWELL (engine->i915)) - batch =gen8_emit_flush_coherentl3_wa (engine, batch); - -/* WaClearSlmSpaceAtContextSwitch:bdw,chv */ -/* Actual scratch location is at 128 bytes offset */ - batch =gen8_emit_pipe_control (batch, -PIPE_CONTROL_FLUSH_L3 | -PIPE_CONTROL_GLOBAL_GTT_IVB | -PIPE_CONTROL_CS_STALL | -PIPE_CONTROL_QW_WRITE , -i915_ggtt_offset (engine->scratch) + -2 *CACHELINE_BYTES ); - - *batch++ =MI_ARB_ON_OFF |MI_ARB_ENABLE ; - -/* Pad to end of cacheline */ -while ((unsigned long )batch %CACHELINE_BYTES ) - *batch++ =MI_NOOP ; - -/* -* MI_BATCH_BUFFER_END is not required in Indirect ctx BB because -* execution depends on the length specified in terms of cache lines -* in the register CTX_RCS_INDIRECT_CTX -*/ - -return batch; -} - -static u32 *gen9_init_indirectctx_bb (struct intel_engine_cs *engine,u32 *batch) -{ - *batch++ =MI_ARB_ON_OFF |MI_ARB_DISABLE ; - -/* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */ - batch =gen8_emit_flush_coherentl3_wa (engine, batch); - -/* WaDisableGatherAtSetShaderCommonSlice:skl,bxt,kbl,glk */ - *batch++ =MI_LOAD_REGISTER_IMM (1 ); - *batch++ =i915_mmio_reg_offset (COMMON_SLICE_CHICKEN2 ); - *batch++ =_MASKED_BIT_DISABLE ( -GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE ); - *batch++ =MI_NOOP ; - -/* WaClearSlmSpaceAtContextSwitch:kbl */ -/* Actual scratch location is at 128 bytes offset */ -if (IS_KBL_REVID (engine->i915,0 ,KBL_REVID_A0 )) { - batch =gen8_emit_pipe_control (batch, -PIPE_CONTROL_FLUSH_L3 | -PIPE_CONTROL_GLOBAL_GTT_IVB | -PIPE_CONTROL_CS_STALL | -PIPE_CONTROL_QW_WRITE , -i915_ggtt_offset (engine->scratch) - +2 *CACHELINE_BYTES ); - } - -/* WaMediaPoolStateCmdInWABB:bxt,glk */ -if (HAS_POOLED_EU (engine->i915)) { -/* -* EU pool configuration is setup along with golden context -* during context initialization. This value depends on -* device type (2x6 or 3x6) and needs to be updated based -* on which subslice is disabled especially for 2x6 -* devices, however it is safe to load default -* configuration of 3x6 device instead of masking off -* corresponding bits because HW ignores bits of a disabled -* subslice and drops down to appropriate config. Please -* see render_state_setup() in i915_gem_render_state.c for -* possible configurations, to avoid duplication they are -* not shown here again. -*/ - *batch++ =GEN9_MEDIA_POOL_STATE ; - *batch++ =GEN9_MEDIA_POOL_ENABLE ; - *batch++ =0x00777000 ; - *batch++ =0 ; - *batch++ =0 ; - *batch++ =0 ; - } - - *batch++ =MI_ARB_ON_OFF |MI_ARB_ENABLE ; - -/* Pad to end of cacheline */ -while ((unsigned long )batch %CACHELINE_BYTES ) - *batch++ =MI_NOOP ; - -return batch; -} - -static u32 * -gen10_init_indirectctx_bb (struct intel_engine_cs *engine,u32 *batch) -{ -int i; - -/* -* WaPipeControlBefore3DStateSamplePattern: cnl -* -* Ensure the engine is idle prior to programming a -* 3DSTATE_SAMPLE_PATTERN during a context restore. -*/ - batch =gen8_emit_pipe_control (batch, -PIPE_CONTROL_CS_STALL , -0 ); -/* -* WaPipeControlBefore3DStateSamplePattern says we need 4 dwords for -* the PIPE_CONTROL followed by 12 dwords of 0x0, so 16 dwords in -* total. However, a PIPE_CONTROL is 6 dwords long, not 4, which is -* confusing. Since gen8_emit_pipe_control() already advances the -* batch by 6 dwords, we advance the other 10 here, completing a -* cacheline. It's not clear if the workaround requires this padding -* before other commands, or if it's just the regular padding we would -* already have for the workaround bb, so leave it here for now. -*/ -for (i =0 ; i <10 ; i++) - *batch++ =MI_NOOP ; - -/* Pad to end of cacheline */ -while ((unsigned long )batch %CACHELINE_BYTES ) - *batch++ =MI_NOOP ; - -return batch; -} - -#define CTX_WA_BB_OBJ_SIZE (PAGE_SIZE) - -static int lrc_setup_wa_ctx (struct intel_engine_cs *engine) -{ -struct drm_i915_gem_object *obj; -struct i915_vma *vma; -int err; - - obj =i915_gem_object_create (engine->i915,CTX_WA_BB_OBJ_SIZE ); -if (IS_ERR (obj)) -return PTR_ERR (obj); - - vma =i915_vma_instance (obj, &engine->i915->ggtt.base,NULL ); -if (IS_ERR (vma)) { - err =PTR_ERR (vma); - goto err; - } - - err =i915_vma_pin (vma,0 ,PAGE_SIZE ,PIN_GLOBAL |PIN_HIGH ); -if (err) - goto err; - - engine->wa_ctx.vma = vma; -return 0 ; - -err: -i915_gem_object_put (obj); -return err; -} - -static void lrc_destroy_wa_ctx (struct intel_engine_cs *engine) -{ -i915_vma_unpin_and_release (&engine->wa_ctx.vma); -} - -typedef u32 *(*wa_bb_func_t )(struct intel_engine_cs *engine,u32 *batch); - -static int intel_init_workaround_bb (struct intel_engine_cs *engine) -{ -struct i915_ctx_workarounds *wa_ctx = &engine->wa_ctx; -struct i915_wa_ctx_bb *wa_bb[2 ] = { &wa_ctx->indirect_ctx, - &wa_ctx->per_ctx }; -wa_bb_func_t wa_bb_fn[2 ]; -struct page *page; -void *batch, *batch_ptr; -unsigned int i; -int ret; - -if (GEM_WARN_ON (engine->id !=RCS )) -return -EINVAL ; - -switch (INTEL_GEN (engine->i915)) { -case 10 : - wa_bb_fn[0 ] = gen10_init_indirectctx_bb; - wa_bb_fn[1 ] =NULL ; -break ; -case 9 : - wa_bb_fn[0 ] = gen9_init_indirectctx_bb; - wa_bb_fn[1 ] =NULL ; -break ; -case 8 : - wa_bb_fn[0 ] = gen8_init_indirectctx_bb; - wa_bb_fn[1 ] =NULL ; -break ; -default : -MISSING_CASE (INTEL_GEN (engine->i915)); -return 0 ; - } - - ret =lrc_setup_wa_ctx (engine); -if (ret) { -DRM_DEBUG_DRIVER ("Failed to setup context WA page: %d\n" , ret); -return ret; - } - - page =i915_gem_object_get_dirty_page (wa_ctx->vma->obj,0 ); - batch = batch_ptr =kmap_atomic (page); - -/* -* Emit the two workaround batch buffers, recording the offset from the -* start of the workaround batch buffer object for each and their -* respective sizes. -*/ -for (i =0 ; i <ARRAY_SIZE (wa_bb_fn); i++) { - wa_bb[i]->offset = batch_ptr - batch; -if (GEM_WARN_ON (!IS_ALIGNED (wa_bb[i]->offset, -CACHELINE_BYTES ))) { - ret = -EINVAL ; -break ; - } -if (wa_bb_fn[i]) - batch_ptr = wa_bb_fn[i](engine, batch_ptr); - wa_bb[i]->size = batch_ptr - (batch + wa_bb[i]->offset); - } - -BUG_ON (batch_ptr - batch >CTX_WA_BB_OBJ_SIZE ); - -kunmap_atomic (batch); -if (ret) -lrc_destroy_wa_ctx (engine); - -return ret; -} -static u8 gtiir[] = { [RCS ] =0 , [BCS ] =0 ,
@@ -1946,7 +1660,7 @@ void intel_logical_ring_cleanup(struct intel_engine_cs *engine)intel_engine_cleanup_common (engine); -lrc_destroy_wa_ctx (engine); +intel_engine_fini_bb_workarounds (engine); engine->i915 =NULL ; dev_priv->engine[engine->id] =NULL ;
@@ -2082,7 +1796,7 @@ int logical_render_ring_init(struct intel_engine_cs *engine)if (ret)return ret; - ret =intel_init_workaround_bb (engine); + ret =intel_engine_init_bb_workarounds (engine);if (ret) {/* * We continue even if we fail to initialize WA batch
drivers/gpu/drm/i915/intel_workarounds.c +291 -0
294 lines not on this page · raw message
drivers/gpu/drm/i915/intel_workarounds.h +3 -0
@@ -13,4 +13,7 @@int intel_whitelist_workarounds_apply (struct intel_engine_cs *engine); +int intel_engine_init_bb_workarounds (struct intel_engine_cs *engine); +void intel_engine_fini_bb_workarounds (struct intel_engine_cs *engine); +#endif
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/6 drm/i915: Create a new category of display WAs
In reply to Oscar MateoDisplay workarounds do not need to be re-applied on a GPU reset (this is, in Ville's words: "at the very least wasted effort [...] and could even be actively harmful in case we end up clobbering something the current display configuration depends on"). Therefore, they have to be applied in a different place that GT ones so they deserve their own category.
Initially, populate this with the WAs that were being applied in init_clock_gating. Actually discriminating which of these WAS is a real display WA, a GT WA or a context WA is left for the next patch (as it requires a good deal of careful review).
v2: Rebased to carry the init_early nomenclature over (Chris) v3:
- Rebased to before the WAs are stored
- Initially populate with all WAs in init_clock_gating
v4: Rebased
v5: s/disp/display (Jani)
--- drivers/gpu/drm/i915/intel_pm.c | 304 +----------------------------- drivers/gpu/drm/i915/intel_workarounds.c | 309 +++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_workarounds.h | 2 + 3 files changed, 319 insertions(+), 296 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +8 -296
@@ -29,6 +29,7 @@#include <drm/drm_plane_helper.h> #include "i915_drv.h" #include "intel_drv.h" +#include "intel_workarounds.h" #include "../../../platform/x86/intel_ips.h" #include <linux/module.h> #include <drm/drm_atomic_helper.h>
@@ -53,92 +54,6 @@* require higher latency to switch to and wake up. */ -static void gen9_init_clock_gating (struct drm_i915_private *dev_priv) -{ -if (HAS_LLC (dev_priv)) { -/* -* WaCompressedResourceDisplayNewHashMode:skl,kbl -* Display WA #0390: skl,kbl -* -* Must match Sampler, Pixel Back End, and Media. See -* WaCompressedResourceSamplerPbeMediaNewHashMode. -*/ -I915_WRITE (CHICKEN_PAR1_1 , -I915_READ (CHICKEN_PAR1_1 ) | -SKL_DE_COMPRESSED_HASH_MODE ); - } - -/* See Bspec note for PSR2_CTL bit 31, Wa#828:skl,bxt,kbl,cfl */ -I915_WRITE (CHICKEN_PAR1_1 , -I915_READ (CHICKEN_PAR1_1 ) |SKL_EDP_PSR_FIX_RDWRAP ); - -/* WaEnableChickenDCPR:skl,bxt,kbl,glk,cfl */ -I915_WRITE (GEN8_CHICKEN_DCPR_1 , -I915_READ (GEN8_CHICKEN_DCPR_1 ) |MASK_WAKEMEM ); - -/* WaFbcTurnOffFbcWatermark:skl,bxt,kbl,cfl */ -/* WaFbcWakeMemOn:skl,bxt,kbl,glk,cfl */ -I915_WRITE (DISP_ARB_CTL ,I915_READ (DISP_ARB_CTL ) | -DISP_FBC_WM_DIS | -DISP_FBC_MEMORY_WAKE ); - -/* WaFbcHighMemBwCorruptionAvoidance:skl,bxt,kbl,cfl */ -I915_WRITE (ILK_DPFC_CHICKEN ,I915_READ (ILK_DPFC_CHICKEN ) | -ILK_DPFC_DISABLE_DUMMY0 ); - -if (IS_SKYLAKE (dev_priv)) { -/* WaDisableDopClockGating */ -I915_WRITE (GEN7_MISCCPCTL ,I915_READ (GEN7_MISCCPCTL ) - & ~GEN7_DOP_CLOCK_GATE_ENABLE ); - } -} - -static void bxt_init_clock_gating (struct drm_i915_private *dev_priv) -{ -gen9_init_clock_gating (dev_priv); - -/* WaDisableSDEUnitClockGating:bxt */ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* -* FIXME: -* GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only. -*/ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ ); - -/* -* Wa: Backlight PWM may stop in the asserted state, causing backlight -* to stay fully on. -*/ -I915_WRITE (GEN9_CLKGATE_DIS_0 ,I915_READ (GEN9_CLKGATE_DIS_0 ) | -PWM1_GATING_DIS |PWM2_GATING_DIS ); -} - -static void glk_init_clock_gating (struct drm_i915_private *dev_priv) -{ -gen9_init_clock_gating (dev_priv); - -/* -* WaDisablePWMClockGating:glk -* Backlight PWM may stop in the asserted state, causing backlight -* to stay fully on. -*/ -I915_WRITE (GEN9_CLKGATE_DIS_0 ,I915_READ (GEN9_CLKGATE_DIS_0 ) | -PWM1_GATING_DIS |PWM2_GATING_DIS ); - -/* WaDDIIOTimeout:glk */ -if (IS_GLK_REVID (dev_priv,0 ,GLK_REVID_A1 )) { -u32 val =I915_READ (CHICKEN_MISC_2 ); - val &= ~(GLK_CL0_PWR_DOWN | -GLK_CL1_PWR_DOWN | -GLK_CL2_PWR_DOWN ); -I915_WRITE (CHICKEN_MISC_2 , val); - } - -} -static void i915_pineview_get_mem_freq (struct drm_i915_private *dev_priv) {u32 tmp;
@@ -8459,168 +8374,9 @@ static void lpt_suspend_hw(struct drm_i915_private *dev_priv) } } -static void gen8_set_l3sqc_credits (struct drm_i915_private *dev_priv, -int general_prio_credits, -int high_prio_credits) -{ -u32 misccpctl; -u32 val; - -/* WaTempDisableDOPClkGating:bdw */ - misccpctl =I915_READ (GEN7_MISCCPCTL ); -I915_WRITE (GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); - - val =I915_READ (GEN8_L3SQCREG1 ); - val &= ~L3_PRIO_CREDITS_MASK ; - val |=L3_GENERAL_PRIO_CREDITS (general_prio_credits); - val |=L3_HIGH_PRIO_CREDITS (high_prio_credits); -I915_WRITE (GEN8_L3SQCREG1 , val); - -/* -* Wait at least 100 clocks before re-enabling clock gating. -* See the definition of L3SQCREG1 in BSpec. -*/ -POSTING_READ (GEN8_L3SQCREG1 ); -udelay (1 ); -I915_WRITE (GEN7_MISCCPCTL , misccpctl); -} - -static void cnp_init_clock_gating (struct drm_i915_private *dev_priv) -{ -if (!HAS_PCH_CNP (dev_priv)) -return ; - -/* Display WA #1181: cnp */ -I915_WRITE (SOUTH_DSPCLK_GATE_D ,I915_READ (SOUTH_DSPCLK_GATE_D ) | -CNP_PWM_CGE_GATING_DISABLE ); -} - -static void cnl_init_clock_gating (struct drm_i915_private *dev_priv) -{ -u32 val; -cnp_init_clock_gating (dev_priv); - -/* This is not an Wa. Enable for better image quality */ -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE)); - -/* WaEnableChickenDCPR:cnl */ -I915_WRITE (GEN8_CHICKEN_DCPR_1 , -I915_READ (GEN8_CHICKEN_DCPR_1 ) |MASK_WAKEMEM ); - -/* WaFbcWakeMemOn:cnl */ -I915_WRITE (DISP_ARB_CTL ,I915_READ (DISP_ARB_CTL ) | -DISP_FBC_MEMORY_WAKE ); - - val =I915_READ (SLICE_UNIT_LEVEL_CLKGATE ); -/* ReadHitWriteOnlyDisable:cnl */ - val |=RCCUNIT_CLKGATE_DIS ; -/* WaSarbUnitClockGatingDisable:cnl (pre-prod) */ -if (IS_CNL_REVID (dev_priv,CNL_REVID_A0 ,CNL_REVID_B0 )) - val |=SARBUNIT_CLKGATE_DIS ; -I915_WRITE (SLICE_UNIT_LEVEL_CLKGATE , val); - -/* WaDisableVFclkgate:cnl */ - val =I915_READ (UNSLICE_UNIT_LEVEL_CLKGATE ); - val |=VFUNIT_CLKGATE_DIS ; -I915_WRITE (UNSLICE_UNIT_LEVEL_CLKGATE , val); -} - -static void cfl_init_clock_gating (struct drm_i915_private *dev_priv) -{ -cnp_init_clock_gating (dev_priv); -gen9_init_clock_gating (dev_priv); - -/* WaFbcNukeOnHostModify:cfl */ -I915_WRITE (ILK_DPFC_CHICKEN ,I915_READ (ILK_DPFC_CHICKEN ) | -ILK_DPFC_NUKE_ON_ANY_MODIFICATION ); -} - -static void kbl_init_clock_gating (struct drm_i915_private *dev_priv) -{ -gen9_init_clock_gating (dev_priv); - -/* WaDisableSDEUnitClockGating:kbl */ -if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* WaDisableGamClockGating:kbl */ -if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) -I915_WRITE (GEN6_UCGCTL1 ,I915_READ (GEN6_UCGCTL1 ) | -GEN6_GAMUNIT_CLOCK_GATE_DISABLE ); - -/* WaFbcNukeOnHostModify:kbl */ -I915_WRITE (ILK_DPFC_CHICKEN ,I915_READ (ILK_DPFC_CHICKEN ) | -ILK_DPFC_NUKE_ON_ANY_MODIFICATION ); -} - -static void skl_init_clock_gating (struct drm_i915_private *dev_priv) -{ -gen9_init_clock_gating (dev_priv); - -/* WAC6entrylatency:skl */ -I915_WRITE (FBC_LLC_READ_CTRL ,I915_READ (FBC_LLC_READ_CTRL ) | -FBC_LLC_FULLY_OPEN ); - -/* WaFbcNukeOnHostModify:skl */ -I915_WRITE (ILK_DPFC_CHICKEN ,I915_READ (ILK_DPFC_CHICKEN ) | -ILK_DPFC_NUKE_ON_ANY_MODIFICATION ); -} -static void bdw_init_clock_gating (struct drm_i915_private *dev_priv) { -/* The GTT cache must be disabled if the system is using 2M pages. */ -bool can_use_gtt_cache = !HAS_PAGE_SIZES (dev_priv, -I915_GTT_PAGE_SIZE_2M ); -enum pipe pipe; - -/* WaSwitchSolVfFArbitrationPriority:bdw */ -I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); - -/* WaPsrDPAMaskVBlankInSRD:bdw */ -I915_WRITE (CHICKEN_PAR1_1 , -I915_READ (CHICKEN_PAR1_1 ) |DPA_MASK_VBLANK_SRD ); - -/* WaPsrDPRSUnmaskVBlankInSRD:bdw */ -for_each_pipe (dev_priv, pipe) { -I915_WRITE (CHICKEN_PIPESL_1 (pipe), -I915_READ (CHICKEN_PIPESL_1 (pipe)) | -BDW_DPRS_MASK_VBLANK_SRD ); - } - -/* WaVSRefCountFullforceMissDisable:bdw */ -/* WaDSRefCountFullforceMissDisable:bdw */ -I915_WRITE (GEN7_FF_THREAD_MODE , -I915_READ (GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); - -I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , -_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE )); - -/* WaDisableSDEUnitClockGating:bdw */ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* WaProgramL3SqcReg1Default:bdw */ -gen8_set_l3sqc_credits (dev_priv,30 ,2 ); - -/* WaGttCachingOffByDefault:bdw */ -I915_WRITE (HSW_GTT_CACHE_EN , can_use_gtt_cache ?GTT_CACHE_EN_ALL :0 ); - -/* WaKVMNotificationOnConfigChange:bdw */ -I915_WRITE (CHICKEN_PAR2_1 ,I915_READ (CHICKEN_PAR2_1 ) - |KVM_CONFIG_CHANGE_NOTIFICATION_SELECT ); -lpt_init_clock_gating (dev_priv); - -/* WaDisableDopClockGating:bdw -* -* Also see the CHICKEN2 write in bdw_init_workarounds() to disable DOP -* clock gating. -*/ -I915_WRITE (GEN6_UCGCTL1 , -I915_READ (GEN6_UCGCTL1 ) |GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE ); }static void hsw_init_clock_gating (struct drm_i915_private *dev_priv)
@@ -8846,40 +8602,6 @@ static void vlv_init_clock_gating(struct drm_i915_private *dev_priv)I915_WRITE (VLV_GUNIT_CLOCK_GATE ,GCFG_DIS ); } -static void chv_init_clock_gating (struct drm_i915_private *dev_priv) -{ -/* WaVSRefCountFullforceMissDisable:chv */ -/* WaDSRefCountFullforceMissDisable:chv */ -I915_WRITE (GEN7_FF_THREAD_MODE , -I915_READ (GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); - -/* WaDisableSemaphoreAndSyncFlipWait:chv */ -I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , -_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE )); - -/* WaDisableCSUnitClockGating:chv */ -I915_WRITE (GEN6_UCGCTL1 ,I915_READ (GEN6_UCGCTL1 ) | -GEN6_CSUNIT_CLOCK_GATE_DISABLE ); - -/* WaDisableSDEUnitClockGating:chv */ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* -* WaProgramL3SqcReg1Default:chv -* See gfxspecs/Related Documents/Performance Guide/ -* LSQC Setting Recommendations. -*/ -gen8_set_l3sqc_credits (dev_priv,38 ,2 ); - -/* -* GTT cache may not work with big pages, so if those -* are ever enabled GTT cache may need to be disabled. -*/ -I915_WRITE (HSW_GTT_CACHE_EN ,GTT_CACHE_EN_ALL ); -} -static void g4x_init_clock_gating (struct drm_i915_private *dev_priv) {uint32_t dspclk_gate;
@@ -8981,6 +8703,7 @@ static void i830_init_clock_gating(struct drm_i915_private *dev_priv)void intel_init_clock_gating (struct drm_i915_private *dev_priv) { dev_priv->display.init_clock_gating (dev_priv); +intel_display_workarounds_apply (dev_priv); }void intel_suspend_hw (struct drm_i915_private *dev_priv)
@@ -8999,28 +8722,17 @@ static void nop_init_clock_gating(struct drm_i915_private *dev_priv)* @dev_priv: device private * * Setup the hooks that configure which clocks of a given platform can be -* gated and also apply various GT and display specific workarounds for these -* platforms. Note that some GT specific workarounds are applied separately -* when GPU contexts or batchbuffers start their execution. +* gated. */ void intel_init_clock_gating_hooks (struct drm_i915_private *dev_priv) { -if (IS_CANNONLAKE (dev_priv)) - dev_priv->display.init_clock_gating = cnl_init_clock_gating; -else if (IS_COFFEELAKE (dev_priv)) - dev_priv->display.init_clock_gating = cfl_init_clock_gating; -else if (IS_SKYLAKE (dev_priv)) - dev_priv->display.init_clock_gating = skl_init_clock_gating; -else if (IS_KABYLAKE (dev_priv)) - dev_priv->display.init_clock_gating = kbl_init_clock_gating; -else if (IS_BROXTON (dev_priv)) - dev_priv->display.init_clock_gating = bxt_init_clock_gating; -else if (IS_GEMINILAKE (dev_priv)) - dev_priv->display.init_clock_gating = glk_init_clock_gating; +if (IS_CANNONLAKE (dev_priv) ||IS_COFFEELAKE (dev_priv) || +IS_GEMINILAKE (dev_priv) ||IS_KABYLAKE (dev_priv) || +IS_BROXTON (dev_priv) ||IS_SKYLAKE (dev_priv) || +IS_CHERRYVIEW (dev_priv)) + dev_priv->display.init_clock_gating = nop_init_clock_gating;else if (IS_BROADWELL (dev_priv)) dev_priv->display.init_clock_gating = bdw_init_clock_gating; -else if (IS_CHERRYVIEW (dev_priv)) - dev_priv->display.init_clock_gating = chv_init_clock_gating;else if (IS_HASWELL (dev_priv)) dev_priv->display.init_clock_gating = hsw_init_clock_gating;else if (IS_IVYBRIDGE (dev_priv))
drivers/gpu/drm/i915/intel_workarounds.c +309 -0
315 lines not on this page · raw message
drivers/gpu/drm/i915/intel_workarounds.h +2 -0
@@ -11,6 +11,8 @@void intel_gt_workarounds_apply (struct drm_i915_private *dev_priv); +void intel_display_workarounds_apply (struct drm_i915_private *dev_priv); +int intel_whitelist_workarounds_apply (struct intel_engine_cs *engine);int intel_engine_init_bb_workarounds (struct intel_engine_cs *engine);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/6 drm/i915: Classify GT & Display WAs correctly
In reply to Oscar MateoMove GT WAs appropiately from the current xxx_disp_workarounds_apply function to the corresponding xxx_gt_workarounds_apply one.
FIXME: It looks like Chris has found some WAs that actually live in the context image. We need to move these to their rightful xxx_workarounds_init function.
v2: Rebased
v3: Rebased
--- drivers/gpu/drm/i915/intel_workarounds.c | 203 +++++++++++++++---------------- 1 file changed, 101 insertions(+), 102 deletions(-)
drivers/gpu/drm/i915/intel_workarounds.c +101 -102
@@ -374,12 +374,95 @@ void intel_ctx_workarounds_apply(struct drm_i915_private *dev_priv) dev_priv->workarounds.count); } +static void gen8_set_l3sqc_credits (struct drm_i915_private *dev_priv, +int general_prio_credits, +int high_prio_credits) +{ +u32 misccpctl; +u32 val; + +/* WaTempDisableDOPClkGating:bdw */ + misccpctl =I915_READ (GEN7_MISCCPCTL ); +I915_WRITE (GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); + + val =I915_READ (GEN8_L3SQCREG1 ); + val &= ~L3_PRIO_CREDITS_MASK ; + val |=L3_GENERAL_PRIO_CREDITS (general_prio_credits); + val |=L3_HIGH_PRIO_CREDITS (high_prio_credits); +I915_WRITE (GEN8_L3SQCREG1 , val); + +/* +* Wait at least 100 clocks before re-enabling clock gating. +* See the definition of L3SQCREG1 in BSpec. +*/ +POSTING_READ (GEN8_L3SQCREG1 ); +udelay (1 ); +I915_WRITE (GEN7_MISCCPCTL , misccpctl); +} +static void bdw_gt_workarounds_apply (struct drm_i915_private *dev_priv) { +/* The GTT cache must be disabled if the system is using 2M pages. */ +bool can_use_gtt_cache = !HAS_PAGE_SIZES (dev_priv, +I915_GTT_PAGE_SIZE_2M ); +/* WaSwitchSolVfFArbitrationPriority:bdw */ +I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); + +/* WaVSRefCountFullforceMissDisable:bdw */ +/* WaDSRefCountFullforceMissDisable:bdw */ +I915_WRITE (GEN7_FF_THREAD_MODE , +I915_READ (GEN7_FF_THREAD_MODE ) & + ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); + + +I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , +_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE )); + + +/* WaDisableSDEUnitClockGating:bdw */ +I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | +GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); + + +/* WaProgramL3SqcReg1Default:bdw */ +gen8_set_l3sqc_credits (dev_priv,30 ,2 ); + +/* WaGttCachingOffByDefault:bdw */ +I915_WRITE (HSW_GTT_CACHE_EN , can_use_gtt_cache ?GTT_CACHE_EN_ALL :0 ); }static void chv_gt_workarounds_apply (struct drm_i915_private *dev_priv) { +/* WaVSRefCountFullforceMissDisable:chv */ +/* WaDSRefCountFullforceMissDisable:chv */ +I915_WRITE (GEN7_FF_THREAD_MODE , +I915_READ (GEN7_FF_THREAD_MODE ) & + ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); + +/* WaDisableSemaphoreAndSyncFlipWait:chv */ +I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , +_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE )); + +/* WaDisableCSUnitClockGating:chv */ +I915_WRITE (GEN6_UCGCTL1 ,I915_READ (GEN6_UCGCTL1 ) | +GEN6_CSUNIT_CLOCK_GATE_DISABLE ); + +/* WaDisableSDEUnitClockGating:chv */ +I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | +GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); + +/* +* WaProgramL3SqcReg1Default:chv +* See gfxspecs/Related Documents/Performance Guide/ +* LSQC Setting Recommendations. +*/ +gen8_set_l3sqc_credits (dev_priv,38 ,2 ); + +/* +* GTT cache may not work with big pages, so if those +* are ever enabled GTT cache may need to be disabled. +*/ +I915_WRITE (HSW_GTT_CACHE_EN ,GTT_CACHE_EN_ALL ); }static void gen9_gt_workarounds_apply (struct drm_i915_private *dev_priv)
@@ -462,6 +545,10 @@ static void bxt_gt_workarounds_apply(struct drm_i915_private *dev_priv)I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) |GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); + +/* WaDisableSDEUnitClockGating:bxt */ +I915_WRITE (GEN8_UCGCTL6 , (I915_READ (GEN8_UCGCTL6 ) | +GEN8_SDEUNIT_CLOCK_GATE_DISABLE )); }static void kbl_gt_workarounds_apply (struct drm_i915_private *dev_priv)
@@ -486,6 +573,16 @@ static void kbl_gt_workarounds_apply(struct drm_i915_private *dev_priv)I915_WRITE (GEN9_GAMT_ECO_REG_RW_IA , (I915_READ (GEN9_GAMT_ECO_REG_RW_IA ) |GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS )); + +/* WaDisableSDEUnitClockGating:kbl */ +if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) +I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | +GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); + +/* WaDisableGamClockGating:kbl */ +if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) +I915_WRITE (GEN6_UCGCTL1 ,I915_READ (GEN6_UCGCTL1 ) | +GEN6_GAMUNIT_CLOCK_GATE_DISABLE ); }static void glk_gt_workarounds_apply (struct drm_i915_private *dev_priv)
@@ -527,6 +624,10 @@ static void cnl_gt_workarounds_apply(struct drm_i915_private *dev_priv)/* WaEnablePreemptionGranularityControlByUMD:cnl */ I915_WRITE (GEN7_FF_SLICE_CS_CHICKEN1 ,_MASKED_BIT_ENABLE (GEN9_FFSC_PERCTX_PREEMPT_CTRL )); + +/* This is not an Wa. Enable for better image quality */ +I915_WRITE (_3D_CHICKEN3, +_MASKED_BIT_ENABLE (_3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE)); }void intel_gt_workarounds_apply (struct drm_i915_private *dev_priv)
@@ -553,42 +654,10 @@ void intel_gt_workarounds_apply(struct drm_i915_private *dev_priv)MISSING_CASE (INTEL_GEN (dev_priv)); } -static void gen8_set_l3sqc_credits (struct drm_i915_private *dev_priv, -int general_prio_credits, -int high_prio_credits) -{ -u32 misccpctl; -u32 val; - -/* WaTempDisableDOPClkGating:bdw */ - misccpctl =I915_READ (GEN7_MISCCPCTL ); -I915_WRITE (GEN7_MISCCPCTL , misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE ); - - val =I915_READ (GEN8_L3SQCREG1 ); - val &= ~L3_PRIO_CREDITS_MASK ; - val |=L3_GENERAL_PRIO_CREDITS (general_prio_credits); - val |=L3_HIGH_PRIO_CREDITS (high_prio_credits); -I915_WRITE (GEN8_L3SQCREG1 , val); - -/* -* Wait at least 100 clocks before re-enabling clock gating. -* See the definition of L3SQCREG1 in BSpec. -*/ -POSTING_READ (GEN8_L3SQCREG1 ); -udelay (1 ); -I915_WRITE (GEN7_MISCCPCTL , misccpctl); -} -static void bdw_display_workarounds_apply (struct drm_i915_private *dev_priv) { -/* The GTT cache must be disabled if the system is using 2M pages. */ -bool can_use_gtt_cache = !HAS_PAGE_SIZES (dev_priv, -I915_GTT_PAGE_SIZE_2M );enum pipe pipe; -/* WaSwitchSolVfFArbitrationPriority:bdw */ -I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); -/* WaPsrDPAMaskVBlankInSRD:bdw */ I915_WRITE (CHICKEN_PAR1_1 ,I915_READ (CHICKEN_PAR1_1 ) |DPA_MASK_VBLANK_SRD );
@@ -600,25 +669,6 @@ static void bdw_display_workarounds_apply(struct drm_i915_private *dev_priv) BDW_DPRS_MASK_VBLANK_SRD); } -/* WaVSRefCountFullforceMissDisable:bdw */ -/* WaDSRefCountFullforceMissDisable:bdw */ -I915_WRITE (GEN7_FF_THREAD_MODE , -I915_READ (GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); - -I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , -_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE )); - -/* WaDisableSDEUnitClockGating:bdw */ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* WaProgramL3SqcReg1Default:bdw */ -gen8_set_l3sqc_credits (dev_priv,30 ,2 ); - -/* WaGttCachingOffByDefault:bdw */ -I915_WRITE (HSW_GTT_CACHE_EN , can_use_gtt_cache ?GTT_CACHE_EN_ALL :0 ); -/* WaKVMNotificationOnConfigChange:bdw */ I915_WRITE (CHICKEN_PAR2_1 ,I915_READ (CHICKEN_PAR2_1 ) |KVM_CONFIG_CHANGE_NOTIFICATION_SELECT );
@@ -634,36 +684,6 @@ static void bdw_display_workarounds_apply(struct drm_i915_private *dev_priv)static void chv_display_workarounds_apply (struct drm_i915_private *dev_priv) { -/* WaVSRefCountFullforceMissDisable:chv */ -/* WaDSRefCountFullforceMissDisable:chv */ -I915_WRITE (GEN7_FF_THREAD_MODE , -I915_READ (GEN7_FF_THREAD_MODE ) & - ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); - -/* WaDisableSemaphoreAndSyncFlipWait:chv */ -I915_WRITE (GEN6_RC_SLEEP_PSMI_CONTROL , -_MASKED_BIT_ENABLE (GEN8_RC_SEMA_IDLE_MSG_DISABLE )); - -/* WaDisableCSUnitClockGating:chv */ -I915_WRITE (GEN6_UCGCTL1 ,I915_READ (GEN6_UCGCTL1 ) | -GEN6_CSUNIT_CLOCK_GATE_DISABLE ); - -/* WaDisableSDEUnitClockGating:chv */ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* -* WaProgramL3SqcReg1Default:chv -* See gfxspecs/Related Documents/Performance Guide/ -* LSQC Setting Recommendations. -*/ -gen8_set_l3sqc_credits (dev_priv,38 ,2 ); - -/* -* GTT cache may not work with big pages, so if those -* are ever enabled GTT cache may need to be disabled. -*/ -I915_WRITE (HSW_GTT_CACHE_EN ,GTT_CACHE_EN_ALL ); }static void gen9_display_workarounds_apply (struct drm_i915_private *dev_priv)
@@ -723,10 +743,6 @@ static void bxt_display_workarounds_apply(struct drm_i915_private *dev_priv) {gen9_display_workarounds_apply (dev_priv); -/* WaDisableSDEUnitClockGating:bxt */ -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); -/* * FIXME: * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only.
@@ -746,16 +762,6 @@ static void kbl_display_workarounds_apply(struct drm_i915_private *dev_priv) {gen9_display_workarounds_apply (dev_priv); -/* WaDisableSDEUnitClockGating:kbl */ -if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) -I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | -GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); - -/* WaDisableGamClockGating:kbl */ -if (IS_KBL_REVID (dev_priv,0 ,KBL_REVID_B0 )) -I915_WRITE (GEN6_UCGCTL1 ,I915_READ (GEN6_UCGCTL1 ) | -GEN6_GAMUNIT_CLOCK_GATE_DISABLE ); -/* WaFbcNukeOnHostModify:kbl */ I915_WRITE (ILK_DPFC_CHICKEN ,I915_READ (ILK_DPFC_CHICKEN ) |ILK_DPFC_NUKE_ON_ANY_MODIFICATION );
@@ -808,9 +814,6 @@ static void cnl_display_workarounds_apply(struct drm_i915_private *dev_priv)u32 val;cnp_display_workarounds_apply (dev_priv); -/* This is not an Wa. Enable for better image quality */ -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE));/* WaEnableChickenDCPR:cnl */ I915_WRITE(GEN8_CHICKEN_DCPR_1,
@@ -834,10 +837,6 @@ static void cnl_display_workarounds_apply(struct drm_i915_private *dev_priv)I915_WRITE (UNSLICE_UNIT_LEVEL_CLKGATE , val); } -/* -* FIXME: Some of the WAs applied here are incorrectly classified as Display -* WAs. We still need to go through them and apply them in the right place. -*/ void intel_display_workarounds_apply (struct drm_i915_private *dev_priv) {if (INTEL_GEN (dev_priv) <8 )
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 6/6] drm/i915: Classify GT & Display WAs correctly
Quoting Oscar Mateo (2018-02-15 22:46:45)
Quoted 21 lines
Move GT WAs appropiately from the current
xxx_disp_workarounds_applyfunction to the correspondingxxx_gt_workarounds_applyone.FIXME: It looks like Chris has found some WAs that actually live in the context image. We need to move these to their rightful
xxx_workarounds_initfunction.v2: Rebased
v3: RebasedSigned-off-by Oscar Mateo <[email protected]>Cc Mika Kuoppala <[email protected]>Cc Rodrigo Vivi <[email protected]>Cc Chris Wilson <[email protected]>Cc Ville Syrjälä <[email protected]>---
static voidbdw_gt_workarounds_apply(struct drm_i915_private *dev_priv){drivers/gpu/drm/i915/intel_workarounds.c +3
-0+/* The GTT cache must be disabled if the system is using 2M pages. */ +bool can_use_gtt_cache = !HAS_PAGE_SIZES (dev_priv, +I915_GTT_PAGE_SIZE_2M );
drivers/gpu/drm/i915/intel_workarounds.c void intel_ctx_workarounds_apply(struct drm_i915_private *dev_priv) · line 417
Quoted 10 lines
drivers/gpu/drm/i915/intel_workarounds.c +10
-0+/* WaSwitchSolVfFArbitrationPriority:bdw */ +I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL ); + +/* WaVSRefCountFullforceMissDisable:bdw */ +/* WaDSRefCountFullforceMissDisable:bdw */ +I915_WRITE (GEN7_FF_THREAD_MODE , +I915_READ (GEN7_FF_THREAD_MODE ) & + ~(GEN8_FF_DS_REF_CNT_FFME |GEN7_FF_VS_REF_CNT_FFME )); + +
/* WaDisableSemaphoreAndSyncFlipWait:bdw */
Review
Quoted 2 lines
(quoted diff) +2
-0+ I915_WRITE(GEN6_RC_SLEEP_PSMI_CONTROL, + _MASKED_BIT_ENABLE(GEN8_RC_SEMA_IDLE_MSG_DISABLE));
Or can we drop it?
drivers/gpu/drm/i915/intel_workarounds.c void intel_ctx_workarounds_apply(struct drm_i915_private *dev_priv) · line 432
Quoted 13 lines
drivers/gpu/drm/i915/intel_workarounds.c +12
-0+ + +/* WaDisableSDEUnitClockGating:bdw */ +I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) | +GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); + + +/* WaProgramL3SqcReg1Default:bdw */ +gen8_set_l3sqc_credits (dev_priv,30 ,2 ); + +/* WaGttCachingOffByDefault:bdw */ +I915_WRITE (HSW_GTT_CACHE_EN , can_use_gtt_cache ?GTT_CACHE_EN_ALL :0 ); }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
In reply to Oscar Mateo== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
URL : https://patchwork.freedesktop.org/series/38397/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip 349d068aa6d4 drm/i915: Move a bunch of workaround-related code to its own file -:720: WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? #720: new file mode 100644
-:752: WARNING: Macros with flow control statements should be avoided #752: FILE: drivers/gpu/drm/i915/intel_workarounds.c:28:
+#define WA_REG(addr, mask, val) do { \
+ const int r = wa_add(dev_priv, (addr), (mask), (val)); \
+ if (r) \
+ return r; \
+ } while (0)
-:758: CHECK: Macro argument reuse 'mask' - possible side-effects? #758: FILE: drivers/gpu/drm/i915/intel_workarounds.c:34:
+#define WA_SET_BIT_MASKED(addr, mask) \
+ WA_REG(addr, (mask), _MASKED_BIT_ENABLE(mask))
-:761: CHECK: Macro argument reuse 'mask' - possible side-effects? #761: FILE: drivers/gpu/drm/i915/intel_workarounds.c:37:
+#define WA_CLR_BIT_MASKED(addr, mask) \
+ WA_REG(addr, (mask), _MASKED_BIT_DISABLE(mask))
-:764: CHECK: Macro argument reuse 'mask' - possible side-effects? #764: FILE: drivers/gpu/drm/i915/intel_workarounds.c:40:
+#define WA_SET_FIELD_MASKED(addr, mask, value) \
+ WA_REG(addr, mask, _MASKED_FIELD(mask, value))
-:772: CHECK: Prefer kernel type 'u32' over 'uint32_t' #772: FILE: drivers/gpu/drm/i915/intel_workarounds.c:48:
+ const uint32_t index = wa->hw_whitelist_count[engine->id];
-:862: WARNING: line over 80 characters
#862: FILE: drivers/gpu/drm/i915/intel_workarounds.c:138:
+ (IS_BDW_GT3(dev_priv) ? HDC_FENCE_DEST_SLM_DISABLE : 0));
-:891: WARNING: line over 80 characters
#891: FILE: drivers/gpu/drm/i915/intel_workarounds.c:167:
+ I915_WRITE(GEN9_CSFE_CHICKEN1_RCS, _MASKED_BIT_ENABLE(GEN9_PREEMPT_GPGPU_SYNC_SWITCH_DISABLE));
-:1119: WARNING: line over 80 characters
#1119: FILE: drivers/gpu/drm/i915/intel_workarounds.c:395:
+ _MASKED_BIT_ENABLE(GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE));
-:1182: ERROR: spaces required around that '=' (ctx:VxW) #1182: FILE: drivers/gpu/drm/i915/intel_workarounds.c:458:
+ ret= wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1);
^
-:1226: CHECK: Lines should not end with a '(' #1226: FILE: drivers/gpu/drm/i915/intel_workarounds.c:502:
+ WA_SET_BIT_MASKED(
-:1286: CHECK: Lines should not end with a '(' #1286: FILE: drivers/gpu/drm/i915/intel_workarounds.c:562:
+ WA_SET_BIT_MASKED(
total: 1 errors, 5 warnings, 6 checks, 1327 lines checked 28111c392ca3 drm/i915: Split out functions for different kinds of workarounds -:382: CHECK: Lines should not end with a '('
#382: FILE: drivers/gpu/drm/i915/intel_workarounds.c:322:
+ WA_SET_BIT_MASKED(
-:429: CHECK: Lines should not end with a '(' #429: FILE: drivers/gpu/drm/i915/intel_workarounds.c:357:
+ WA_SET_BIT_MASKED(
-:484: CHECK: braces {} should be used on all arms of this statement #484: FILE: drivers/gpu/drm/i915/intel_workarounds.c:408:
+ if (INTEL_GEN(dev_priv) < 8)
[...]
+ else if (IS_BROADWELL(dev_priv))
[...]
+ else if (IS_CHERRYVIEW(dev_priv))
[...]
+ else if (IS_SKYLAKE(dev_priv))
[...]
+ else if (IS_BROXTON(dev_priv))
[...]
+ else if (IS_KABYLAKE(dev_priv))
[...]
+ else if (IS_GEMINILAKE(dev_priv))
[...]
+ else if (IS_COFFEELAKE(dev_priv))
[...]
+ else if (IS_CANNONLAKE(dev_priv))
[...]
+ else {
[...]
-:502: CHECK: Unbalanced braces around else statement #502: FILE: drivers/gpu/drm/i915/intel_workarounds.c:426:
+ else {
-:630: WARNING: line over 80 characters
#630: FILE: drivers/gpu/drm/i915/intel_workarounds.c:553:
+ _MASKED_BIT_ENABLE(GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE));
-:806: CHECK: Prefer kernel type 'u32' over 'uint32_t' #806: FILE: drivers/gpu/drm/i915/intel_workarounds.c:655:
+ const uint32_t index = wa->hw_whitelist_count[engine->id];
-:862: WARNING: Missing a blank line after declarations #862: FILE: drivers/gpu/drm/i915/intel_workarounds.c:692:
+ int ret = gen9_whitelist_workarounds_apply(engine);
+ if (ret)
-:877: WARNING: Missing a blank line after declarations #877: FILE: drivers/gpu/drm/i915/intel_workarounds.c:706:
+ int ret = gen9_whitelist_workarounds_apply(engine);
+ if (ret)
-:886: WARNING: Missing a blank line after declarations #886: FILE: drivers/gpu/drm/i915/intel_workarounds.c:715:
+ int ret = gen9_whitelist_workarounds_apply(engine);
+ if (ret)
-:900: WARNING: Missing a blank line after declarations #900: FILE: drivers/gpu/drm/i915/intel_workarounds.c:729:
+ int ret = gen9_whitelist_workarounds_apply(engine);
+ if (ret)
-:914: WARNING: Missing a blank line after declarations #914: FILE: drivers/gpu/drm/i915/intel_workarounds.c:743:
+ int ret = gen9_whitelist_workarounds_apply(engine);
+ if (ret)
-:941: CHECK: braces {} should be used on all arms of this statement #941: FILE: drivers/gpu/drm/i915/intel_workarounds.c:770:
+ if (INTEL_GEN(dev_priv) < 9) {
[...]
+ } else if (IS_SKYLAKE(dev_priv))
[...]
+ else if (IS_BROXTON(dev_priv))
[...]
+ else if (IS_KABYLAKE(dev_priv))
[...]
+ else if (IS_GEMINILAKE(dev_priv))
[...]
+ else if (IS_COFFEELAKE(dev_priv))
[...]
+ else if (IS_CANNONLAKE(dev_priv))
[...]
+ else {
[...]
-:956: CHECK: Unbalanced braces around else statement #956: FILE: drivers/gpu/drm/i915/intel_workarounds.c:785:
+ else {
total: 0 errors, 6 warnings, 7 checks, 907 lines checked88298b5b30d5 drm/i915: Apply context workarounds directly5af41d9d456c drm/i915: Move WA BB stuff to the workarounds file as well -:6: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #6:
Since we are trying to put all WA stuff together, do not forget about the BB WAs.
-:346: WARNING: line over 80 characters
#346: FILE: drivers/gpu/drm/i915/intel_workarounds.c:709:
+ * constant value with bit21 set and then we restore it back with the saved value.
-:385: WARNING: line over 80 characters
#385: FILE: drivers/gpu/drm/i915/intel_workarounds.c:748:
+ * on a criteria. At the moment this batch always start at the beginning of the page
-:440: CHECK: Lines should not end with a '(' #440: FILE: drivers/gpu/drm/i915/intel_workarounds.c:803:
+ *batch++ = _MASKED_BIT_DISABLE(
-:598: CHECK: multiple assignments should be avoided #598: FILE: drivers/gpu/drm/i915/intel_workarounds.c:961:
+ batch = batch_ptr = kmap_atomic(page);
-:617: WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() #617: FILE: drivers/gpu/drm/i915/intel_workarounds.c:980:
+ BUG_ON(batch_ptr - batch > CTX_WA_BB_OBJ_SIZE);
total: 0 errors, 4 warnings, 2 checks, 609 lines checked 78079494271e drm/i915: Create a new category of display WAs -:624: WARNING: Missing a blank line after declarations #624: FILE: drivers/gpu/drm/i915/intel_workarounds.c:779:
+ u32 val = I915_READ(CHICKEN_MISC_2);
+ val &= ~(GLK_CL0_PWR_DOWN |
-:654: WARNING: Missing a blank line after declarations #654: FILE: drivers/gpu/drm/i915/intel_workarounds.c:809:
+ u32 val;
+ cnp_display_workarounds_apply(dev_priv);
total: 0 errors, 2 warnings, 0 checks, 671 lines checked c5dc8cf7ebe8 drm/i915: Classify GT & Display WAs correctly -:73: CHECK: Please don't use multiple blank lines #73: FILE: drivers/gpu/drm/i915/intel_workarounds.c:417:
+
+
-:77: CHECK: Please don't use multiple blank lines #77: FILE: drivers/gpu/drm/i915/intel_workarounds.c:421:
+
+
-:82: CHECK: Please don't use multiple blank lines #82: FILE: drivers/gpu/drm/i915/intel_workarounds.c:426:
+
+
total: 0 errors, 0 warnings, 3 checks, 279 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
In reply to Oscar Mateo== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
URL : https://patchwork.freedesktop.org/series/38397/
State : success
== Summary ==
Series 38397v1 series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
https://patchwork.freedesktop.org/api/1.0/series/38397/revisions/1/mbox/
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:419s fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:430s fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:377s fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:495s fi-bwr-2160 total:288 pass:183 dwarn:0 dfail:0 fail:0 skip:105 time:289s fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:484s fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:486s fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:476s fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:462s fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:574s fi-cnl-y3 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:575s fi-elk-e7500 total:288 pass:229 dwarn:0 dfail:0 fail:0 skip:59 time:419s fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:286s fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:512s fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:391s fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:420s fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:459s fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:417s fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:462s fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:497s fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:453s fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:506s fi-pnv-d510 total:288 pass:222 dwarn:1 dfail:0 fail:0 skip:65 time:590s fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:433s fi-skl-6600u total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:513s fi-skl-6700hq total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:528s fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:491s fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:477s fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:419s fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:433s fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:529s fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:399s
Blacklisted hosts:
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:467s
b9550076f11d0c3ef583ffb14b3c6ef140f1d088 drm-tip: 2018y-02m-15d-19h-53m-17s UTC integration manifest c5dc8cf7ebe8 drm/i915: Classify GT & Display WAs correctly78079494271e drm/i915: Create a new category of display WAs5af41d9d456c drm/i915: Move WA BB stuff to the workarounds file as well88298b5b30d5 drm/i915: Apply context workarounds directly28111c392ca3 drm/i915: Split out functions for different kinds of workarounds 349d068aa6d4 drm/i915: Move a bunch of workaround-related code to its own file
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8052/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
In reply to Oscar Mateo== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm/i915: Move a bunch of workaround-related code to its own file
URL : https://patchwork.freedesktop.org/series/38397/
State : success
== Summary ==
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-c-frame-sequence:
pass -> FAIL (shard-apl) fdo#103481
Test perf:
Subgroup oa-exponents:
fail -> PASS (shard-apl) fdo#102254
Subgroup buffer-fill:
pass -> FAIL (shard-apl) fdo#103755
Subgroup polling:
fail -> PASS (shard-hsw) fdo#102252
Test kms_flip:
Subgroup 2x-flip-vs-expired-vblank:
fail -> PASS (shard-hsw) fdo#102887
Subgroup dpms-vs-vblank-race-interruptible:
pass -> FAIL (shard-hsw) fdo#103060
Test kms_sysfs_edid_timing:
warn -> PASS (shard-apl) fdo#100047
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test gem_softpin:
Subgroup noreloc-s3:
incomplete -> PASS (shard-hsw) fdo#103540fdo#103481 https://bugs.freedesktop.org/show_bug.cgi?id=103481
fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#103755 https://bugs.freedesktop.org/show_bug.cgi?id=103755
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
shard-apl total:3397 pass:1764 dwarn:1 dfail:0 fail:23 skip:1608 time:12387s shard-hsw total:3427 pass:1759 dwarn:1 dfail:0 fail:10 skip:1656 time:11845s shard-snb total:3427 pass:1346 dwarn:1 dfail:0 fail:13 skip:2067 time:6659s
Blacklisted hosts:
shard-kbl total:3427 pass:1905 dwarn:1 dfail:0 fail:22 skip:1499 time:9765s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8052/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Oscar Mateo (2018-02-15 22:46:40)
Quoted 21 lines
This has grown to be a sizable amount of code, so move it to its own file before we try to refactor anything. For the moment, we are leaving behind the WA BB code and the WAs that get applied (incorrectly) in
init_clock_gating, but we will deal with it later.v2: Use
intel_prefix for code that deals with the hardware (Chris)
v3: Rebased
v4:
- Rebased
- New license headerSigned-off-by Oscar Mateo <[email protected]>Cc Chris Wilson <[email protected]>Cc Mika Kuoppala <[email protected]>---
drivers/gpu/drm/i915/intel_workarounds.c new file +0
-0
drivers/gpu/drm/i915/intel_workarounds.c line 8
Quoted 8 lines
drivers/gpu/drm/i915/intel_workarounds.c new file +8
-0@@ -0,0 +1,642 @@ +/* +* SPDX-License-Identifier: MIT +* +* Copyright © 2014-2018 Intel Corporation +*/ + +#include "i915_drv.h" +#include "intel_workarounds.h"
We probably want some organisational notes here,
infrastructure,
display
- platform in standard gen/chrono order
gt
ctx
? Or
platform
- display
- gt
- ctx
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx