From: Arun Siluvery Date: Fri, 25 Sep 2015 16:40:37 +0000 (+0100) Subject: drm/i915/gen8: Add gen8_init_workarounds for common WA X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e9a64adaec93ce5dfcdee44bbd89c90b4d997f6f;p=openwrt%2Fstaging%2Fblogic.git drm/i915/gen8: Add gen8_init_workarounds for common WA WA in this function should be ordered based on register address. The following order is suggested (Ville), instpm mi_mode row chicken half slice chicken common slice chicken hdc chicken cache_mode_0 cache_mode_1 gt_mode Cc: Ville Syrjälä Signed-off-by: Arun Siluvery Reviewed-by: Ville Syrjälä Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index a0b2219baf77..2c4f097acd0e 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -800,11 +800,22 @@ static int wa_add(struct drm_i915_private *dev_priv, #define WA_WRITE(addr, val) WA_REG(addr, 0xffffffff, val) +static int gen8_init_workarounds(struct intel_engine_cs *ring) +{ + + return 0; +} + static int bdw_init_workarounds(struct intel_engine_cs *ring) { + int ret; struct drm_device *dev = ring->dev; struct drm_i915_private *dev_priv = dev->dev_private; + ret = gen8_init_workarounds(ring); + if (ret) + return ret; + WA_SET_BIT_MASKED(INSTPM, INSTPM_FORCE_ORDERING); /* WaDisableAsyncFlipPerfMode:bdw */ @@ -868,9 +879,14 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring) static int chv_init_workarounds(struct intel_engine_cs *ring) { + int ret; struct drm_device *dev = ring->dev; struct drm_i915_private *dev_priv = dev->dev_private; + ret = gen8_init_workarounds(ring); + if (ret) + return ret; + WA_SET_BIT_MASKED(INSTPM, INSTPM_FORCE_ORDERING); /* WaDisableAsyncFlipPerfMode:chv */