* [PATCH 1/2] drm/i915/debugfs: Prune a couple of superfluous leading zeros from bo domains
@ 2012-11-27 17:06 Chris Wilson
2012-11-27 17:06 ` [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state Chris Wilson
0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2012-11-27 17:06 UTC (permalink / raw)
To: intel-gfx
As we do not have any domains occupying the high bits, there is no point
in always printing the leading 00.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index af67308..c52758c 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -102,7 +102,7 @@ static const char *cache_level_str(int type)
static void
describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj)
{
- seq_printf(m, "%p: %s%s %8zdKiB %04x %04x %d %d %d%s%s%s",
+ seq_printf(m, "%p: %s%s %8zdKiB %02x %02x %d %d %d%s%s%s",
&obj->base,
get_pin_flag(obj),
get_tiling_flag(obj),
@@ -610,7 +610,7 @@ static void print_error_buffers(struct seq_file *m,
seq_printf(m, "%s [%d]:\n", name, count);
while (count--) {
- seq_printf(m, " %08x %8u %04x %04x %x %x%s%s%s%s%s%s%s",
+ seq_printf(m, " %08x %8u %02x %02x %x %x%s%s%s%s%s%s%s",
err->gtt_offset,
err->size,
err->read_domains,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state
2012-11-27 17:06 [PATCH 1/2] drm/i915/debugfs: Prune a couple of superfluous leading zeros from bo domains Chris Wilson
@ 2012-11-27 17:06 ` Chris Wilson
2012-11-27 20:54 ` Ben Widawsky
2012-11-29 9:16 ` Mika Kuoppala
0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2012-11-27 17:06 UTC (permalink / raw)
To: intel-gfx
Should be useful to know what the driver thought the other ring's seqno
was when it last used a semaphore.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++----
drivers/gpu/drm/i915/i915_drv.h | 1 +
drivers/gpu/drm/i915/i915_irq.c | 2 ++
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index c52758c..5359f376 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -657,10 +657,12 @@ static void i915_ring_error_state(struct seq_file *m,
if (INTEL_INFO(dev)->gen >= 6) {
seq_printf(m, " RC PSMI: 0x%08x\n", error->rc_psmi[ring]);
seq_printf(m, " FAULT_REG: 0x%08x\n", error->fault_reg[ring]);
- seq_printf(m, " SYNC_0: 0x%08x\n",
- error->semaphore_mboxes[ring][0]);
- seq_printf(m, " SYNC_1: 0x%08x\n",
- error->semaphore_mboxes[ring][1]);
+ seq_printf(m, " SYNC_0: 0x%08x [last synced 0x%08x]\n",
+ error->semaphore_mboxes[ring][0],
+ error->semaphore_seqno[ring][0]);
+ seq_printf(m, " SYNC_1: 0x%08x [last synced 0x%08x]\n",
+ error->semaphore_mboxes[ring][1],
+ error->semaphore_seqno[ring][1]);
}
seq_printf(m, " seqno: 0x%08x\n", error->seqno[ring]);
seq_printf(m, " waiting: %s\n", yesno(error->waiting[ring]));
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 23afc21..476aa94 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -199,6 +199,7 @@ struct drm_i915_error_state {
u32 instdone[I915_NUM_RINGS];
u32 acthd[I915_NUM_RINGS];
u32 semaphore_mboxes[I915_NUM_RINGS][I915_NUM_RINGS - 1];
+ u32 semaphore_seqno[I915_NUM_RINGS][I915_NUM_RINGS - 1];
u32 rc_psmi[I915_NUM_RINGS]; /* sleep state */
/* our own tracking of ring head and tail */
u32 cpu_ring_head[I915_NUM_RINGS];
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index bfb6c51..1f40090 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1156,6 +1156,8 @@ static void i915_record_ring_state(struct drm_device *dev,
= I915_READ(RING_SYNC_0(ring->mmio_base));
error->semaphore_mboxes[ring->id][1]
= I915_READ(RING_SYNC_1(ring->mmio_base));
+ error->semaphore_seqno[ring->id][0] = ring->sync_seqno[0];
+ error->semaphore_seqno[ring->id][1] = ring->sync_seqno[1];
}
if (INTEL_INFO(dev)->gen >= 4) {
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state
2012-11-27 17:06 ` [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state Chris Wilson
@ 2012-11-27 20:54 ` Ben Widawsky
2012-11-27 21:04 ` Chris Wilson
2012-11-29 9:16 ` Mika Kuoppala
1 sibling, 1 reply; 6+ messages in thread
From: Ben Widawsky @ 2012-11-27 20:54 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Tue, 27 Nov 2012 17:06:54 +0000
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Should be useful to know what the driver thought the other ring's seqno
> was when it last used a semaphore.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Note to Daniel: It would be nice to work on merging VECS and then adding
this IMO
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++----
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_irq.c | 2 ++
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index c52758c..5359f376 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -657,10 +657,12 @@ static void i915_ring_error_state(struct seq_file *m,
> if (INTEL_INFO(dev)->gen >= 6) {
> seq_printf(m, " RC PSMI: 0x%08x\n", error->rc_psmi[ring]);
> seq_printf(m, " FAULT_REG: 0x%08x\n", error->fault_reg[ring]);
> - seq_printf(m, " SYNC_0: 0x%08x\n",
> - error->semaphore_mboxes[ring][0]);
> - seq_printf(m, " SYNC_1: 0x%08x\n",
> - error->semaphore_mboxes[ring][1]);
> + seq_printf(m, " SYNC_0: 0x%08x [last synced 0x%08x]\n",
> + error->semaphore_mboxes[ring][0],
> + error->semaphore_seqno[ring][0]);
> + seq_printf(m, " SYNC_1: 0x%08x [last synced 0x%08x]\n",
> + error->semaphore_mboxes[ring][1],
> + error->semaphore_seqno[ring][1]);
> }
> seq_printf(m, " seqno: 0x%08x\n", error->seqno[ring]);
> seq_printf(m, " waiting: %s\n", yesno(error->waiting[ring]));
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 23afc21..476aa94 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -199,6 +199,7 @@ struct drm_i915_error_state {
> u32 instdone[I915_NUM_RINGS];
> u32 acthd[I915_NUM_RINGS];
> u32 semaphore_mboxes[I915_NUM_RINGS][I915_NUM_RINGS - 1];
> + u32 semaphore_seqno[I915_NUM_RINGS][I915_NUM_RINGS - 1];
> u32 rc_psmi[I915_NUM_RINGS]; /* sleep state */
> /* our own tracking of ring head and tail */
> u32 cpu_ring_head[I915_NUM_RINGS];
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index bfb6c51..1f40090 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1156,6 +1156,8 @@ static void i915_record_ring_state(struct drm_device *dev,
> = I915_READ(RING_SYNC_0(ring->mmio_base));
> error->semaphore_mboxes[ring->id][1]
> = I915_READ(RING_SYNC_1(ring->mmio_base));
> + error->semaphore_seqno[ring->id][0] = ring->sync_seqno[0];
> + error->semaphore_seqno[ring->id][1] = ring->sync_seqno[1];
> }
>
> if (INTEL_INFO(dev)->gen >= 4) {
--
Ben Widawsky, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state
2012-11-27 20:54 ` Ben Widawsky
@ 2012-11-27 21:04 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2012-11-27 21:04 UTC (permalink / raw)
To: Ben Widawsky; +Cc: intel-gfx
On Tue, 27 Nov 2012 12:54:35 -0800, Ben Widawsky <ben@bwidawsk.net> wrote:
> On Tue, 27 Nov 2012 17:06:54 +0000
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> > Should be useful to know what the driver thought the other ring's seqno
> > was when it last used a semaphore.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Note to Daniel: It would be nice to work on merging VECS and then adding
> this IMO
Note to Mika, you need to apply this patch asap. :-p
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state
2012-11-27 17:06 ` [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state Chris Wilson
2012-11-27 20:54 ` Ben Widawsky
@ 2012-11-29 9:16 ` Mika Kuoppala
2012-11-29 10:01 ` Daniel Vetter
1 sibling, 1 reply; 6+ messages in thread
From: Mika Kuoppala @ 2012-11-29 9:16 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Tue, 27 Nov 2012 17:06:54 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Should be useful to know what the driver thought the other ring's seqno
> was when it last used a semaphore.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++----
> drivers/gpu/drm/i915/i915_drv.h | 1 +
> drivers/gpu/drm/i915/i915_irq.c | 2 ++
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index c52758c..5359f376 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -657,10 +657,12 @@ static void i915_ring_error_state(struct seq_file *m,
> if (INTEL_INFO(dev)->gen >= 6) {
> seq_printf(m, " RC PSMI: 0x%08x\n", error->rc_psmi[ring]);
> seq_printf(m, " FAULT_REG: 0x%08x\n", error->fault_reg[ring]);
> - seq_printf(m, " SYNC_0: 0x%08x\n",
> - error->semaphore_mboxes[ring][0]);
> - seq_printf(m, " SYNC_1: 0x%08x\n",
> - error->semaphore_mboxes[ring][1]);
> + seq_printf(m, " SYNC_0: 0x%08x [last synced 0x%08x]\n",
> + error->semaphore_mboxes[ring][0],
> + error->semaphore_seqno[ring][0]);
> + seq_printf(m, " SYNC_1: 0x%08x [last synced 0x%08x]\n",
> + error->semaphore_mboxes[ring][1],
> + error->semaphore_seqno[ring][1]);
> }
> seq_printf(m, " seqno: 0x%08x\n", error->seqno[ring]);
> seq_printf(m, " waiting: %s\n", yesno(error->waiting[ring]));
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 23afc21..476aa94 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -199,6 +199,7 @@ struct drm_i915_error_state {
> u32 instdone[I915_NUM_RINGS];
> u32 acthd[I915_NUM_RINGS];
> u32 semaphore_mboxes[I915_NUM_RINGS][I915_NUM_RINGS - 1];
> + u32 semaphore_seqno[I915_NUM_RINGS][I915_NUM_RINGS - 1];
> u32 rc_psmi[I915_NUM_RINGS]; /* sleep state */
> /* our own tracking of ring head and tail */
> u32 cpu_ring_head[I915_NUM_RINGS];
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index bfb6c51..1f40090 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1156,6 +1156,8 @@ static void i915_record_ring_state(struct drm_device *dev,
> = I915_READ(RING_SYNC_0(ring->mmio_base));
> error->semaphore_mboxes[ring->id][1]
> = I915_READ(RING_SYNC_1(ring->mmio_base));
> + error->semaphore_seqno[ring->id][0] = ring->sync_seqno[0];
> + error->semaphore_seqno[ring->id][1] = ring->sync_seqno[1];
> }
>
> if (INTEL_INFO(dev)->gen >= 4) {
> --
> 1.7.10.4
This patch was important for catching a seqno wrap problem in i915_gem_object_sync().
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state
2012-11-29 9:16 ` Mika Kuoppala
@ 2012-11-29 10:01 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-11-29 10:01 UTC (permalink / raw)
To: Mika Kuoppala; +Cc: intel-gfx
On Thu, Nov 29, 2012 at 11:16:20AM +0200, Mika Kuoppala wrote:
> On Tue, 27 Nov 2012 17:06:54 +0000, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > Should be useful to know what the driver thought the other ring's seqno
> > was when it last used a semaphore.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > drivers/gpu/drm/i915/i915_debugfs.c | 10 ++++++----
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > drivers/gpu/drm/i915/i915_irq.c | 2 ++
> > 3 files changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > index c52758c..5359f376 100644
> > --- a/drivers/gpu/drm/i915/i915_debugfs.c
> > +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> > @@ -657,10 +657,12 @@ static void i915_ring_error_state(struct seq_file *m,
> > if (INTEL_INFO(dev)->gen >= 6) {
> > seq_printf(m, " RC PSMI: 0x%08x\n", error->rc_psmi[ring]);
> > seq_printf(m, " FAULT_REG: 0x%08x\n", error->fault_reg[ring]);
> > - seq_printf(m, " SYNC_0: 0x%08x\n",
> > - error->semaphore_mboxes[ring][0]);
> > - seq_printf(m, " SYNC_1: 0x%08x\n",
> > - error->semaphore_mboxes[ring][1]);
> > + seq_printf(m, " SYNC_0: 0x%08x [last synced 0x%08x]\n",
> > + error->semaphore_mboxes[ring][0],
> > + error->semaphore_seqno[ring][0]);
> > + seq_printf(m, " SYNC_1: 0x%08x [last synced 0x%08x]\n",
> > + error->semaphore_mboxes[ring][1],
> > + error->semaphore_seqno[ring][1]);
> > }
> > seq_printf(m, " seqno: 0x%08x\n", error->seqno[ring]);
> > seq_printf(m, " waiting: %s\n", yesno(error->waiting[ring]));
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 23afc21..476aa94 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -199,6 +199,7 @@ struct drm_i915_error_state {
> > u32 instdone[I915_NUM_RINGS];
> > u32 acthd[I915_NUM_RINGS];
> > u32 semaphore_mboxes[I915_NUM_RINGS][I915_NUM_RINGS - 1];
> > + u32 semaphore_seqno[I915_NUM_RINGS][I915_NUM_RINGS - 1];
> > u32 rc_psmi[I915_NUM_RINGS]; /* sleep state */
> > /* our own tracking of ring head and tail */
> > u32 cpu_ring_head[I915_NUM_RINGS];
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index bfb6c51..1f40090 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -1156,6 +1156,8 @@ static void i915_record_ring_state(struct drm_device *dev,
> > = I915_READ(RING_SYNC_0(ring->mmio_base));
> > error->semaphore_mboxes[ring->id][1]
> > = I915_READ(RING_SYNC_1(ring->mmio_base));
> > + error->semaphore_seqno[ring->id][0] = ring->sync_seqno[0];
> > + error->semaphore_seqno[ring->id][1] = ring->sync_seqno[1];
> > }
> >
> > if (INTEL_INFO(dev)->gen >= 4) {
> > --
> > 1.7.10.4
>
> This patch was important for catching a seqno wrap problem in i915_gem_object_sync().
>
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Applied both patches to dinq.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-29 10:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 17:06 [PATCH 1/2] drm/i915/debugfs: Prune a couple of superfluous leading zeros from bo domains Chris Wilson
2012-11-27 17:06 ` [PATCH 2/2] drm/i915: Include the last semaphore sync point in the error-state Chris Wilson
2012-11-27 20:54 ` Ben Widawsky
2012-11-27 21:04 ` Chris Wilson
2012-11-29 9:16 ` Mika Kuoppala
2012-11-29 10:01 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.