All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: deepak.s@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915: Verify address field of PCBR register.
Date: Mon, 9 Dec 2013 11:35:20 +0200	[thread overview]
Message-ID: <20131209093520.GF10036@intel.com> (raw)
In-Reply-To: <1386490955-20608-1-git-send-email-deepak.s@intel.com>

On Sun, Dec 08, 2013 at 01:52:35PM +0530, deepak.s@intel.com wrote:
> From: Deepak S <deepak.s@intel.com>
> 
> On VLV the PCBR register has other bits besides the pcbr address
> field. Verify only address field setup by BIOS to make sure we don't
> misinterpret the PCBR setup.
> 
> Signed-off-by: Deepak S <deepak.s@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index e6d98fe..2e1340f 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4036,7 +4036,12 @@ static void valleyview_setup_pctx(struct drm_device *dev)
>  	int pctx_size = 24*1024;
>  
>  	pcbr = I915_READ(VLV_PCBR);
> -	if (pcbr) {
> +
> +	/* PCBR Format: Bits 31:12 - Base address of Process Context

It's called power context, not process context.

> +	 * 		Bits 11:1 - Reserved

These are all 0

> +	 * 		Bit 0 - PCBR Lock

And if this is 1, then we can't change the address anyway, so I don't
think this patch makes much sense.

Have you actually seen cases where the BIOS would be buggy enough to
lock the power context addres at 0? If so, we should just scream and
run away instead of blindly trying to write a new address to PCBR and
pretending that things are fine after that.

> +	 * Check only address field if already setup by BIOS */
> +	if (pcbr >> 12) {
>  		/* BIOS set it up already, grab the pre-alloc'd space */
>  		int pcbr_offset;
>  
> -- 
> 1.8.4.2
> 
> _______________________________________________
> 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-12-09  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08  8:22 [PATCH 1/3] drm/i915: Verify address field of PCBR register deepak.s
2013-12-09  7:58 ` Daniel Vetter
2013-12-09  9:35 ` Ville Syrjälä [this message]
2013-12-09 14:17   ` S, Deepak

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=20131209093520.GF10036@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=deepak.s@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.