Skip to content

Commit ed576a5

Browse files
committed
drm/i915: Also clear the punit's PDATA sideband register
As the previous punit i/o may have failed, the contents of the PDATA are undefined. Always clear it to 0 prior to sending the command. Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Mika Kuoppala <[email protected]>
1 parent 9fcee2f commit ed576a5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/gpu/drm/i915/intel_sideband.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ static int vlv_sideband_rw(struct drm_i915_private *dev_priv, u32 devfn,
6060
}
6161

6262
I915_WRITE(VLV_IOSF_ADDR, addr);
63-
if (!is_read)
64-
I915_WRITE(VLV_IOSF_DATA, *val);
63+
I915_WRITE(VLV_IOSF_DATA, is_read ? 0 : *val);
6564
I915_WRITE(VLV_IOSF_DOORBELL_REQ, cmd);
6665

6766
if (intel_wait_for_register(dev_priv,
@@ -74,7 +73,6 @@ static int vlv_sideband_rw(struct drm_i915_private *dev_priv, u32 devfn,
7473

7574
if (is_read)
7675
*val = I915_READ(VLV_IOSF_DATA);
77-
I915_WRITE(VLV_IOSF_DATA, 0);
7876

7977
return 0;
8078
}

0 commit comments

Comments
 (0)