* [PATCH] drm/i915: Fix disabled semaphores
@ 2013-12-18 4:06 Ben Widawsky
2014-01-13 23:25 ` Ben Widawsky
0 siblings, 1 reply; 2+ messages in thread
From: Ben Widawsky @ 2013-12-18 4:06 UTC (permalink / raw)
To: Intel GFX; +Cc: Ben Widawsky, 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 <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: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index b106984..b242dbb 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -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);
--
1.8.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915: Fix disabled semaphores
2013-12-18 4:06 [PATCH] drm/i915: Fix disabled semaphores Ben Widawsky
@ 2014-01-13 23:25 ` Ben Widawsky
0 siblings, 0 replies; 2+ messages in thread
From: Ben Widawsky @ 2014-01-13 23:25 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel GFX
Daniel, please consider merging this, or the rest of the semaphore
series. Existing code is broken.
On Tue, Dec 17, 2013 at 08:06:00PM -0800, Ben Widawsky wrote:
> 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 <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: Kenneth Graunke <kenneth@whitecape.org>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index b106984..b242dbb 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -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);
> --
> 1.8.5.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-13 23:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-18 4:06 [PATCH] drm/i915: Fix disabled semaphores Ben Widawsky
2014-01-13 23:25 ` Ben Widawsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox