All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Also clear the punit's PDATA	sideband register
Date: Thu, 26 Jan 2017 15:28:27 +0200	[thread overview]
Message-ID: <8737g69chw.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20170125134808.6152-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@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@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>

> Cc: Mika Kuoppala <mika.kuoppala@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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-01-26 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 13:48 [PATCH 1/2] drm/i915: Report the failure to write to the punit Chris Wilson
2017-01-25 13:48 ` [PATCH 2/2] drm/i915: Also clear the punit's PDATA sideband register Chris Wilson
2017-01-26 13:28   ` Mika Kuoppala [this message]
2017-01-25 14:24 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Report the failure to write to the punit Patchwork
2017-01-26 10:19 ` [PATCH v2] " Chris Wilson
2017-01-26 13:25   ` Mika Kuoppala
2017-01-26 12:24 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Report the failure to write to the punit (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737g69chw.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.