[Intel-gfx] [PATCH] drm/i915: Fix semaphore_seqno and semaphore_mboxes sizes

Rodrigo Vivi rodrigo.vivi at intel.com
Thu Jul 17 14:00:46 CEST 2014


Otherwise some iteractions depending on the current number of active rings could overflow.

Cc: Ben Widawsky <benjamin.widawsky at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 2b8308d..190f0e5 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -342,7 +342,7 @@ struct drm_i915_error_state {
 		u32 cpu_ring_head;
 		u32 cpu_ring_tail;
 
-		u32 semaphore_seqno[I915_NUM_RINGS - 1];
+		u32 semaphore_seqno[I915_NUM_RINGS];
 
 		/* Register state */
 		u32 tail;
@@ -361,7 +361,7 @@ struct drm_i915_error_state {
 		u32 fault_reg;
 		u64 faddr;
 		u32 rc_psmi; /* sleep state */
-		u32 semaphore_mboxes[I915_NUM_RINGS - 1];
+		u32 semaphore_mboxes[I915_NUM_RINGS];
 
 		struct drm_i915_error_object {
 			int page_count;
-- 
1.9.3




More information about the Intel-gfx mailing list