All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Clear PCODE_DATA1 on SNB+
Date: Wed, 10 Sep 2014 20:32:28 +0300	[thread overview]
Message-ID: <20140910173228.GZ4193@intel.com> (raw)
In-Reply-To: <1409921592-23754-3-git-send-email-damien.lespiau@intel.com>

On Fri, Sep 05, 2014 at 01:53:12PM +0100, Damien Lespiau wrote:
> Ville found out that the DATA1 register exists since SNB with some
> scarce apparitions in the specs throughout the times. In his own words:
> 
>   Also according to Bspec the mailbox data1 register already existed
>   since snb.  The hsw cdclk change sequence also mentions that it should
>   be set to 0, but eg. the bdw IPS sequence doesn't mention it. I guess
>   in theory some pcode command might cause it to be clobbered, so I'm
>   thinking we should just explicitly set it to 0 for all platforms in
>   the pcode read/write functions
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/i915_reg.h | 2 +-
>  drivers/gpu/drm/i915/intel_pm.c | 3 +--
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 5a7adb1..56cccde 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -5952,8 +5952,8 @@ enum skl_disp_power_wells {
>  #define GEN6_PCODE_DATA				0x138128
>  #define   GEN6_PCODE_FREQ_IA_RATIO_SHIFT	8
>  #define   GEN6_PCODE_FREQ_RING_RATIO_SHIFT	16
> +#define GEN6_PCODE_DATA1			0x13812C
>  
> -#define GEN9_PCODE_DATA1			0x13812C
>  #define   GEN9_PCODE_READ_MEM_LATENCY		0x6
>  #define   GEN9_MEM_LATENCY_LEVEL_MASK		0xFF
>  #define   GEN9_MEM_LATENCY_LEVEL_1_5_SHIFT	8
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 3f69f9a..7bc8f73 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -8716,8 +8716,7 @@ int sandybridge_pcode_read(struct drm_i915_private *dev_priv, u8 mbox, u32 *val)
>  	}
>  
>  	I915_WRITE(GEN6_PCODE_DATA, *val);
> -	if (INTEL_INFO(dev_priv)->gen >= 9)
> -		I915_WRITE(GEN9_PCODE_DATA1, 0);
> +	I915_WRITE(GEN6_PCODE_DATA1, 0);
>  	I915_WRITE(GEN6_PCODE_MAILBOX, GEN6_PCODE_READY | mbox);
>  
>  	if (wait_for((I915_READ(GEN6_PCODE_MAILBOX) & GEN6_PCODE_READY) == 0,
> -- 
> 1.8.3.1

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2014-09-10 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-05 12:53 [PATCH 0/2] Couple of patches on top of the SKL latency retrieval Damien Lespiau
2014-09-05 12:53 ` [PATCH 1/2] drm/i915: Use anonymous union/struct to save space taken by latency values Damien Lespiau
2014-09-10 17:33   ` Ville Syrjälä
2014-09-05 12:53 ` [PATCH 2/2] drm/i915: Clear PCODE_DATA1 on SNB+ Damien Lespiau
2014-09-10 17:32   ` Ville Syrjälä [this message]
2014-11-04 19:00 ` [PATCH 0/2] Couple of patches on top of the SKL latency retrieval Rodrigo Vivi
2014-11-05 16:49   ` Damien Lespiau

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=20140910173228.GZ4193@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=damien.lespiau@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.