Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0a9f74c authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Vetter
Browse files

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 52ed2325
Author: Ben Widawsky <benjamin.widawsky@intel.com>
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.

Reported-by: default avatarKenneth Graunke <kenneth@whitecape.org>
Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 8b78f0e5
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -673,11 +673,13 @@ gen6_add_request(struct intel_ring_buffer *ring)
	if (ret)
		return ret;

	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);
	intel_ring_emit(ring, I915_GEM_HWS_INDEX << MI_STORE_DWORD_INDEX_SHIFT);