public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: add bunit read/write routines
Date: Fri, 1 Nov 2013 21:54:39 +0200	[thread overview]
Message-ID: <20131101195439.GH13047@intel.com> (raw)
In-Reply-To: <1383320487-790-1-git-send-email-jbarnes@virtuousgeek.org>

On Fri, Nov 01, 2013 at 08:41:24AM -0700, Jesse Barnes wrote:
> For modifying self-refresh exit latency.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

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

> ---
>  drivers/gpu/drm/i915/i915_drv.h       |  2 ++
>  drivers/gpu/drm/i915/i915_reg.h       |  1 +
>  drivers/gpu/drm/i915/intel_sideband.c | 16 ++++++++++++++++
>  3 files changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index cc40cbf..5edf9bb 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -2403,6 +2403,8 @@ u32 vlv_cck_read(struct drm_i915_private *dev_priv, u32 reg);
>  void vlv_cck_write(struct drm_i915_private *dev_priv, u32 reg, u32 val);
>  u32 vlv_ccu_read(struct drm_i915_private *dev_priv, u32 reg);
>  void vlv_ccu_write(struct drm_i915_private *dev_priv, u32 reg, u32 val);
> +u32 vlv_bunit_read(struct drm_i915_private *dev_priv, u32 reg);
> +void vlv_bunit_write(struct drm_i915_private *dev_priv, u32 reg, u32 val);
>  u32 vlv_gps_core_read(struct drm_i915_private *dev_priv, u32 reg);
>  void vlv_gps_core_write(struct drm_i915_private *dev_priv, u32 reg, u32 val);
>  u32 vlv_dpio_read(struct drm_i915_private *dev_priv, enum pipe pipe, int reg);
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index de58947..737d8a3 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -349,6 +349,7 @@
>  #define   IOSF_BYTE_ENABLES_SHIFT		4
>  #define   IOSF_BAR_SHIFT			1
>  #define   IOSF_SB_BUSY				(1<<0)
> +#define   IOSF_PORT_BUNIT			0x3
>  #define   IOSF_PORT_PUNIT			0x4
>  #define   IOSF_PORT_NC				0x11
>  #define   IOSF_PORT_DPIO			0x12
> diff --git a/drivers/gpu/drm/i915/intel_sideband.c b/drivers/gpu/drm/i915/intel_sideband.c
> index 9944d81..d43e457 100644
> --- a/drivers/gpu/drm/i915/intel_sideband.c
> +++ b/drivers/gpu/drm/i915/intel_sideband.c
> @@ -90,6 +90,22 @@ void vlv_punit_write(struct drm_i915_private *dev_priv, u8 addr, u32 val)
>  	mutex_unlock(&dev_priv->dpio_lock);
>  }
>  
> +u32 vlv_bunit_read(struct drm_i915_private *dev_priv, u32 reg)
> +{
> +	u32 val = 0;
> +
> +	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_BUNIT,
> +			PUNIT_OPCODE_REG_READ, reg, &val);
> +
> +	return val;
> +}
> +
> +void vlv_bunit_write(struct drm_i915_private *dev_priv, u32 reg, u32 val)
> +{
> +	vlv_sideband_rw(dev_priv, PCI_DEVFN(2, 0), IOSF_PORT_BUNIT,
> +			PUNIT_OPCODE_REG_WRITE, reg, &val);
> +}
> +
>  u32 vlv_nc_read(struct drm_i915_private *dev_priv, u8 addr)
>  {
>  	u32 val = 0;
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

      parent reply	other threads:[~2013-11-01 19:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 15:41 [PATCH 1/4] drm/i915: add bunit read/write routines Jesse Barnes
2013-11-01 15:41 ` [PATCH 2/4] drm/i915: move VLV DDR freq fetch into init_clock_gating Jesse Barnes
2013-11-01 15:41 ` [PATCH 3/4] drm/i915: add modeset_global_pipes callback for global config adjustments Jesse Barnes
2013-11-01 19:37   ` Daniel Vetter
2013-11-01 15:41 ` [PATCH 4/4] drm/i915/vlv: modeset_global_* for VLV Jesse Barnes
2013-11-01 18:02   ` [PATCH] drm/i915/vlv: modeset_global_* for VLV v2 Jesse Barnes
2013-11-01 19:13     ` [PATCH] drm/i915/vlv: modeset_global_* for VLV v3 Jesse Barnes
2013-11-01 19:24       ` [PATCH] drm/i915: add modeset_global_pipes callback for global config adjustments Jesse Barnes
2013-11-01 19:28         ` Jesse Barnes
2013-11-01 19:28       ` [PATCH] drm/i915/vlv: modeset_global_* for VLV v4 Jesse Barnes
2013-11-01 19:52         ` Ville Syrjälä
2013-11-01 20:01           ` Daniel Vetter
2013-11-04 17:41           ` Jesse Barnes
2013-11-01 19:54 ` Ville Syrjälä [this message]

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=20131101195439.GH13047@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox