mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
drm/i915: Clear the existing watermarks for g4x when modifying the cursor sr
In a couple of places we attempt to adjust the existing watermark registers to update them for the new cursor watermarks. This goes horribly wrong as instead of clearing the cursor bits prior to or'ing in the new values, we clear the rest of the register with the result that the watermark registers contain bogus values. References: https://bugs.freedesktop.org/show_bug.cgi?id=47034 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
bfd7590d3e
commit
8c919b2893
@ -1325,10 +1325,11 @@ static void valleyview_update_wm(struct drm_device *dev)
|
||||
(planeb_wm << DSPFW_PLANEB_SHIFT) |
|
||||
planea_wm);
|
||||
I915_WRITE(DSPFW2,
|
||||
(I915_READ(DSPFW2) & DSPFW_CURSORA_MASK) |
|
||||
(I915_READ(DSPFW2) & ~DSPFW_CURSORA_MASK) |
|
||||
(cursora_wm << DSPFW_CURSORA_SHIFT));
|
||||
I915_WRITE(DSPFW3,
|
||||
(I915_READ(DSPFW3) | (cursor_sr << DSPFW_CURSOR_SR_SHIFT)));
|
||||
(I915_READ(DSPFW3) & ~DSPFW_CURSOR_SR_MASK) |
|
||||
(cursor_sr << DSPFW_CURSOR_SR_SHIFT));
|
||||
}
|
||||
|
||||
static void g4x_update_wm(struct drm_device *dev)
|
||||
@ -1374,11 +1375,11 @@ static void g4x_update_wm(struct drm_device *dev)
|
||||
(planeb_wm << DSPFW_PLANEB_SHIFT) |
|
||||
planea_wm);
|
||||
I915_WRITE(DSPFW2,
|
||||
(I915_READ(DSPFW2) & DSPFW_CURSORA_MASK) |
|
||||
(I915_READ(DSPFW2) & ~DSPFW_CURSORA_MASK) |
|
||||
(cursora_wm << DSPFW_CURSORA_SHIFT));
|
||||
/* HPLL off in SR has some issues on G4x... disable it */
|
||||
I915_WRITE(DSPFW3,
|
||||
(I915_READ(DSPFW3) & ~DSPFW_HPLL_SR_EN) |
|
||||
(I915_READ(DSPFW3) & ~(DSPFW_HPLL_SR_EN | DSPFW_CURSOR_SR_MASK)) |
|
||||
(cursor_sr << DSPFW_CURSOR_SR_SHIFT));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user