All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@gmail.com>
Cc: intel-gfx@lists.freedesktop.org,
	Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/psr: Warn for erroneous enabling of both PSR1 and PSR2.
Date: Mon, 25 Jun 2018 17:09:26 -0700	[thread overview]
Message-ID: <20180626000926.GF3008@intel.com> (raw)
In-Reply-To: <20180625054741.3919-2-dhinakaran.pandiyan@intel.com>

On Sun, Jun 24, 2018 at 10:47:41PM -0700, Dhinakaran Pandiyan wrote:
> Depending whether PSR1 or PSR2 was configured, we print a warning if the
> corresponding control mmio indicated PSR was erroneously enabled. As
> Chris pointed out, it makes more sense to check for both the mmio's
> since we expect neither PSR1 nor PSR2 to be enabled when psr_activate() is
> called.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_psr.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 7aa324f0d1f7..970b8ced46a3 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -576,10 +576,8 @@ static void intel_psr_activate(struct intel_dp *intel_dp)
>  	struct drm_device *dev = intel_dig_port->base.base.dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  
> -	if (dev_priv->psr.psr2_enabled)
> -		WARN_ON(I915_READ(EDP_PSR2_CTL) & EDP_PSR2_ENABLE);
> -	else
> -		WARN_ON(I915_READ(EDP_PSR_CTL) & EDP_PSR_ENABLE);
> +	WARN_ON(I915_READ(EDP_PSR2_CTL) & EDP_PSR2_ENABLE);

now you have to check for platform which really has this register
to avoid unclaimed registers accesses...

> +	WARN_ON(I915_READ(EDP_PSR_CTL) & EDP_PSR_ENABLE);
>  	WARN_ON(dev_priv->psr.active);
>  	lockdep_assert_held(&dev_priv->psr.lock);
>  
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-06-26  0:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-25  5:47 [PATCH 1/2] drm/i915/psr: Fix race in intel_psr_work() Dhinakaran Pandiyan
2018-06-25  5:47 ` [PATCH 2/2] drm/i915/psr: Warn for erroneous enabling of both PSR1 and PSR2 Dhinakaran Pandiyan
2018-06-26  0:09   ` Rodrigo Vivi [this message]
2018-06-26  6:44     ` Dhinakaran Pandiyan
2018-06-26  9:05   ` [PATCH v2 " Dhinakaran Pandiyan
2018-06-26 15:50     ` Rodrigo Vivi
2018-06-26 20:02       ` Dhinakaran Pandiyan
2018-06-25  6:21 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/psr: Fix race in intel_psr_work() Patchwork
2018-06-25  7:46 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-26  0:10 ` [PATCH 1/2] " Rodrigo Vivi
2018-06-26  9:42 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/psr: Fix race in intel_psr_work() (rev2) Patchwork
2018-06-26 11:26 ` ✓ Fi.CI.IGT: " 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=20180626000926.GF3008@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dhinakaran.pandiyan@gmail.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --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.