* [PATCH] drm/i915: Use LRI to update the semaphore registers
@ 2012-11-14 9:15 Chris Wilson
2012-11-14 19:06 ` Ben Widawsky
0 siblings, 1 reply; 4+ messages in thread
From: Chris Wilson @ 2012-11-14 9:15 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel J Blueman
The bspec was recently updated to remove the ability to update the
semaphore using the MI_SEMAPHORE_BOX command, the ability to wait upon
the semaphore value remained. Instead the advice is to update the
register using the MI_LOAD_REGISTER_IMM command. In cursory testing,
semaphores continue to function - the question is whether this fixes
some of the deadlocks where the semaphore registers contained stale
values?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel J Blueman <daniel@quora.org>
---
drivers/gpu/drm/i915/intel_ringbuffer.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index ee4abc5..dd2e7db 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -554,12 +554,9 @@ update_mboxes(struct intel_ring_buffer *ring,
u32 seqno,
u32 mmio_offset)
{
- intel_ring_emit(ring, MI_SEMAPHORE_MBOX |
- MI_SEMAPHORE_GLOBAL_GTT |
- MI_SEMAPHORE_REGISTER |
- MI_SEMAPHORE_UPDATE);
- intel_ring_emit(ring, seqno);
+ intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
intel_ring_emit(ring, mmio_offset);
+ intel_ring_emit(ring, seqno);
}
/**
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Use LRI to update the semaphore registers
2012-11-14 9:15 [PATCH] drm/i915: Use LRI to update the semaphore registers Chris Wilson
@ 2012-11-14 19:06 ` Ben Widawsky
2012-11-15 17:14 ` Ben Widawsky
0 siblings, 1 reply; 4+ messages in thread
From: Ben Widawsky @ 2012-11-14 19:06 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Daniel J Blueman
On Wed, 14 Nov 2012 09:15:14 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> The bspec was recently updated to remove the ability to update the
> semaphore using the MI_SEMAPHORE_BOX command, the ability to wait upon
> the semaphore value remained. Instead the advice is to update the
> register using the MI_LOAD_REGISTER_IMM command. In cursory testing,
> semaphores continue to function - the question is whether this fixes
> some of the deadlocks where the semaphore registers contained stale
> values?
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel J Blueman <daniel@quora.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index ee4abc5..dd2e7db 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -554,12 +554,9 @@ update_mboxes(struct intel_ring_buffer *ring,
> u32 seqno,
> u32 mmio_offset)
> {
> - intel_ring_emit(ring, MI_SEMAPHORE_MBOX |
> - MI_SEMAPHORE_GLOBAL_GTT |
> - MI_SEMAPHORE_REGISTER |
> - MI_SEMAPHORE_UPDATE);
> - intel_ring_emit(ring, seqno);
> + intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
> intel_ring_emit(ring, mmio_offset);
> + intel_ring_emit(ring, seqno);
> }
>
> /**
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Use LRI to update the semaphore registers
2012-11-14 19:06 ` Ben Widawsky
@ 2012-11-15 17:14 ` Ben Widawsky
2012-11-20 15:37 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Ben Widawsky @ 2012-11-15 17:14 UTC (permalink / raw)
To: Ben Widawsky; +Cc: intel-gfx, Daniel J Blueman
On Wed, 14 Nov 2012 11:06:42 -0800
Ben Widawsky <ben@bwidawsk.net> wrote:
> On Wed, 14 Nov 2012 09:15:14 +0000
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> > The bspec was recently updated to remove the ability to update the
> > semaphore using the MI_SEMAPHORE_BOX command, the ability to wait upon
> > the semaphore value remained. Instead the advice is to update the
> > register using the MI_LOAD_REGISTER_IMM command. In cursory testing,
> > semaphores continue to function - the question is whether this fixes
> > some of the deadlocks where the semaphore registers contained stale
> > values?
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel J Blueman <daniel@quora.org>
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Ben Widawsky <ben@bwidawsk.net>
> > ---
> > drivers/gpu/drm/i915/intel_ringbuffer.c | 7 ++-----
> > 1 file changed, 2 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > index ee4abc5..dd2e7db 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > @@ -554,12 +554,9 @@ update_mboxes(struct intel_ring_buffer *ring,
> > u32 seqno,
> > u32 mmio_offset)
> > {
> > - intel_ring_emit(ring, MI_SEMAPHORE_MBOX |
> > - MI_SEMAPHORE_GLOBAL_GTT |
> > - MI_SEMAPHORE_REGISTER |
> > - MI_SEMAPHORE_UPDATE);
> > - intel_ring_emit(ring, seqno);
> > + intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));
> > intel_ring_emit(ring, mmio_offset);
> > + intel_ring_emit(ring, seqno);
> > }
> >
> > /**
>
>
>
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Use LRI to update the semaphore registers
2012-11-15 17:14 ` Ben Widawsky
@ 2012-11-20 15:37 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-11-20 15:37 UTC (permalink / raw)
To: Ben Widawsky; +Cc: intel-gfx, Daniel J Blueman
On Thu, Nov 15, 2012 at 09:14:48AM -0800, Ben Widawsky wrote:
> On Wed, 14 Nov 2012 11:06:42 -0800
> Ben Widawsky <ben@bwidawsk.net> wrote:
>
> > On Wed, 14 Nov 2012 09:15:14 +0000
> > Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >
> > > The bspec was recently updated to remove the ability to update the
> > > semaphore using the MI_SEMAPHORE_BOX command, the ability to wait upon
> > > the semaphore value remained. Instead the advice is to update the
> > > register using the MI_LOAD_REGISTER_IMM command. In cursory testing,
> > > semaphores continue to function - the question is whether this fixes
> > > some of the deadlocks where the semaphore registers contained stale
> > > values?
> > >
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > Cc: Daniel J Blueman <daniel@quora.org>
> > Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
> Tested-by: Ben Widawsky <ben@bwidawsk.net>
I seem to have forgotten to mention that this is merged. Bad, bad me ...
Thanks for the patch & review.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-20 15:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-14 9:15 [PATCH] drm/i915: Use LRI to update the semaphore registers Chris Wilson
2012-11-14 19:06 ` Ben Widawsky
2012-11-15 17:14 ` Ben Widawsky
2012-11-20 15:37 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox