Skip to content

Commit b2d73de

Browse files
vsyrjalajnikula
authored andcommitted
drm/i915: Extend the async flip VT-d w/a to skl/bxt
Looks like skl/bxt/derivatives also need the plane stride stretch w/a when using async flips and VT-d is enabled, or else we get corruption on screen. To my surprise this was even documented in bspec, but only as a note on the CHICHKEN_PIPESL register description rather than on the w/a list. So very much the same thing as on HSW/BDW, except the bits moved yet again. Cc: [email protected] Cc: Karthik B S <[email protected]> Fixes: 55ea1cb ("drm/i915: Enable async flips in i915") Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Matt Roper <[email protected]> (cherry picked from commit d08df3b) Signed-off-by: Jani Nikula <[email protected]>
1 parent fdddf8c commit b2d73de

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8193,6 +8193,11 @@ enum {
81938193
#define HSW_SPR_STRETCH_MAX_X1 REG_FIELD_PREP(HSW_SPR_STRETCH_MAX_MASK, 3)
81948194
#define HSW_FBCQ_DIS (1 << 22)
81958195
#define BDW_DPRS_MASK_VBLANK_SRD (1 << 0)
8196+
#define SKL_PLANE1_STRETCH_MAX_MASK REG_GENMASK(1, 0)
8197+
#define SKL_PLANE1_STRETCH_MAX_X8 REG_FIELD_PREP(SKL_PLANE1_STRETCH_MAX_MASK, 0)
8198+
#define SKL_PLANE1_STRETCH_MAX_X4 REG_FIELD_PREP(SKL_PLANE1_STRETCH_MAX_MASK, 1)
8199+
#define SKL_PLANE1_STRETCH_MAX_X2 REG_FIELD_PREP(SKL_PLANE1_STRETCH_MAX_MASK, 2)
8200+
#define SKL_PLANE1_STRETCH_MAX_X1 REG_FIELD_PREP(SKL_PLANE1_STRETCH_MAX_MASK, 3)
81968201
#define CHICKEN_PIPESL_1(pipe) _MMIO_PIPE(pipe, _CHICKEN_PIPESL_1_A, _CHICKEN_PIPESL_1_B)
81978202

81988203
#define _CHICKEN_TRANS_A 0x420c0

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ struct intel_wm_config {
7676

7777
static void gen9_init_clock_gating(struct drm_i915_private *dev_priv)
7878
{
79+
enum pipe pipe;
80+
7981
if (HAS_LLC(dev_priv)) {
8082
/*
8183
* WaCompressedResourceDisplayNewHashMode:skl,kbl
@@ -89,6 +91,16 @@ static void gen9_init_clock_gating(struct drm_i915_private *dev_priv)
8991
SKL_DE_COMPRESSED_HASH_MODE);
9092
}
9193

94+
for_each_pipe(dev_priv, pipe) {
95+
/*
96+
* "Plane N strech max must be programmed to 11b (x1)
97+
* when Async flips are enabled on that plane."
98+
*/
99+
if (!IS_GEMINILAKE(dev_priv) && intel_vtd_active())
100+
intel_uncore_rmw(&dev_priv->uncore, CHICKEN_PIPESL_1(pipe),
101+
SKL_PLANE1_STRETCH_MAX_MASK, SKL_PLANE1_STRETCH_MAX_X1);
102+
}
103+
92104
/* See Bspec note for PSR2_CTL bit 31, Wa#828:skl,bxt,kbl,cfl */
93105
intel_uncore_write(&dev_priv->uncore, CHICKEN_PAR1_1,
94106
intel_uncore_read(&dev_priv->uncore, CHICKEN_PAR1_1) | SKL_EDP_PSR_FIX_RDWRAP);

0 commit comments

Comments
 (0)