Skip to contentSkip to conversation

drm/i915: Fix disabled semaphores

PATCH In review Ben Widawsky 2 participants 2 messages Dec 18, 2013 – Jan 13, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Fix disabled semaphores

The ring will emit too many if semaphores are disabled since we do not add the correct number to num_dwords anymore.

This was introduced:
commit 52ed23253b68e1cf154b03d91bed619504cf955b

Author: Ben Widawsky <[email protected]>
Date:   Mon Dec 16 20:50:38 2013 -0800

drm/i915: Don't emit mbox updates without semaphores

FWIW, the bug was fixed later in the series.

/me hangs head in shame.

Daniel: Also note that we should have merged the read-only semaphore modparam before this patch.

---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +6 -4
index b106984..b242dbb 100644
@@ -673,10 +673,12 @@ gen6_add_request(struct intel_ring_buffer *ring)
 	if (ret)
 		return ret;
 
-	for_each_ring(useless, dev_priv, i) {
-		u32 mbox_reg = ring->signal_mbox[i];
-		if (mbox_reg != GEN6_NOSYNC)
-			update_mboxes(ring, mbox_reg);
+	if (i915_semaphore_is_enabled(dev)) {
+		for_each_ring(useless, dev_priv, i) {
+			u32 mbox_reg = ring->signal_mbox[i];
+			if (mbox_reg != GEN6_NOSYNC)
+				update_mboxes(ring, mbox_reg);
+		}
 	}
 
 	intel_ring_emit(ring, MI_STORE_DWORD_INDEX);
Signature · 1 line
1.8.5.1
#1 lore raw

Daniel, please consider merging this, or the rest of the semaphore series. Existing code is broken.

Quoted 51 lines · Ben Widawsky

The ring will emit too many if semaphores are disabled since we do not add the correct number to num_dwords anymore.

This was introduced:
commit 52ed23253b68e1cf154b03d91bed619504cf955b

Author: Ben Widawsky <[email protected]>
Date:   Mon Dec 16 20:50:38 2013 -0800

drm/i915: Don't emit mbox updates without semaphores

FWIW, the bug was fixed later in the series.

/me hangs head in shame.

Daniel: Also note that we should have merged the read-only semaphore modparam before this patch.

---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +6 -4
index b106984..b242dbb 100644
@@ -673,10 +673,12 @@ gen6_add_request(struct intel_ring_buffer *ring)
 	if (ret)
 		return ret;
 
-	for_each_ring(useless, dev_priv, i) {
-		u32 mbox_reg = ring->signal_mbox[i];
-		if (mbox_reg != GEN6_NOSYNC)
-			update_mboxes(ring, mbox_reg);
+	if (i915_semaphore_is_enabled(dev)) {
+		for_each_ring(useless, dev_priv, i) {
+			u32 mbox_reg = ring->signal_mbox[i];
+			if (mbox_reg != GEN6_NOSYNC)
+				update_mboxes(ring, mbox_reg);
+		}
 	}
 
 	intel_ring_emit(ring, MI_STORE_DWORD_INDEX);
Signature · 6 lines
1.8.5.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center