[Intel-gfx] [PATCH 2/2] drm/i915: Also clear the punit's PDATA sideband register
Mika Kuoppala
mika.kuoppala at linux.intel.com
Thu Jan 26 13:28:27 UTC 2017
Chris Wilson <chris at chris-wilson.co.uk> writes:
> 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 <chris at chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
> ---
> drivers/gpu/drm/i915/intel_sideband.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915/intel_sideband.c
> index d3d49a09c919..9f782b5eb6e6 100644
> --- a/drivers/gpu/drm/i915/intel_sideband.c
> +++ b/drivers/gpu/drm/i915/intel_sideband.c
> @@ -60,8 +60,7 @@ static int vlv_sideband_rw(struct drm_i915_private *dev_priv, u32 devfn,
> }
>
> I915_WRITE(VLV_IOSF_ADDR, addr);
> - if (!is_read)
> - I915_WRITE(VLV_IOSF_DATA, *val);
> + I915_WRITE(VLV_IOSF_DATA, is_read ? 0 : *val);
> I915_WRITE(VLV_IOSF_DOORBELL_REQ, cmd);
>
> if (intel_wait_for_register(dev_priv,
> @@ -74,7 +73,6 @@ static int vlv_sideband_rw(struct drm_i915_private *dev_priv, u32 devfn,
>
> if (is_read)
> *val = I915_READ(VLV_IOSF_DATA);
> - I915_WRITE(VLV_IOSF_DATA, 0);
>
> return 0;
> }
> --
> 2.11.0
More information about the Intel-gfx
mailing list