[PATCH] i915: change offset for bread crumb read

Use non-reserved offset in hw status page for bread crumb
instead of current dw offset 5.

On i8xx and i915, valid range starts from dword offset 10h.
On i965, it's from 20h.

Signed-off-by: Zhenyu Wang <[EMAIL PROTECTED]>
---
 shared-core/i915_dma.c |    2 +-
 shared-core/i915_drv.h |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 2f34437..2f51c83 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -430,7 +430,7 @@ void i915_emit_breadcrumb(struct drm_device *dev)
 
        BEGIN_LP_RING(4);
        OUT_RING(CMD_STORE_DWORD_IDX);
-       OUT_RING(20);
+       OUT_RING(BREADCRUMB_OFFSET << 2);
        OUT_RING(dev_priv->counter);
        OUT_RING(0);
        ADVANCE_LP_RING();
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 85b5109..1ef5e15 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -709,8 +709,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, 
const char *caller);
 
 #define BREADCRUMB_BITS 31
 #define BREADCRUMB_MASK ((1U << BREADCRUMB_BITS) - 1)
+#define BREADCRUMB_OFFSET      0x20
 
-#define READ_BREADCRUMB(dev_priv)  (((volatile 
u32*)(dev_priv->hw_status_page))[5])
+#define READ_BREADCRUMB(dev_priv)  (((volatile 
u32*)(dev_priv->hw_status_page))[BREADCRUMB_OFFSET])
 #define READ_HWSP(dev_priv, reg)  (((volatile 
u32*)(dev_priv->hw_status_page))[reg])
 
 #define BLC_PWM_CTL            0x61254
-- 
1.5.3.7


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to