All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Verify address field of PCBR register.
@ 2013-12-08  8:22 deepak.s
  2013-12-09  7:58 ` Daniel Vetter
  2013-12-09  9:35 ` Ville Syrjälä
  0 siblings, 2 replies; 4+ messages in thread
From: deepak.s @ 2013-12-08  8:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: Deepak S

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
+	 * 		Bits 11:1 - Reserved
+	 * 		Bit 0 - PCBR Lock
+	 * 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-09 14:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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ä
2013-12-09 14:17   ` S, Deepak

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.