Re: [PATCH 26/26] drm/radeon: add the ib content and relocs to the ring debugfs file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/4/25 Christian König <deathsimple@xxxxxxxxxxx>:
> Signed-off-by: Christian König <deathsimple@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/radeon/radeon_ring.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
> index 1c4348c..c563c25 100644
> --- a/drivers/gpu/drm/radeon/radeon_ring.c
> +++ b/drivers/gpu/drm/radeon/radeon_ring.c
> @@ -481,6 +481,25 @@ void radeon_ring_fini(struct radeon_device *rdev, struct radeon_ring *ring)
>  */
>  #if defined(CONFIG_DEBUG_FS)
>
> +static void radeon_ib_dump(struct seq_file *m, struct radeon_ib *ib)
> +{
> +       unsigned i;
> +
> +       seq_printf(m, "\n");
> +       seq_printf(m, "\tIB relocs (%d)\n", ib->nrelocs);
> +       for (i = 0; i < ib->nrelocs; ++i) {
> +               struct radeon_bo *bo = ib->relocs[i].robj;
> +               seq_printf(m, "\t%d: %9ld bytes @ 0x%09LX\n", i,
> +                          radeon_bo_size(bo), radeon_bo_gpu_offset(bo));
> +       }
> +       seq_printf(m, "\n");
> +       seq_printf(m, "\tIB size %05u dwords\n", ib->length_dw);
> +       for (i = 0; i < ib->length_dw; ++i) {
> +               seq_printf(m, "\t[%05u]=0x%08X\n", i, ib->ptr[i]);
> +       }
> +       seq_printf(m, "\n");
> +}
> +
>  static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
>  {
>        struct drm_info_node *node = (struct drm_info_node *) m->private;
> @@ -522,6 +541,9 @@ static int radeon_debugfs_ring_info(struct seq_file *m, void *data)
>                fence = NULL;
>        }
>        for (j = 0; j <= count; j++) {
> +               if (fence && fence->emitted_at == i && fence->ib) {
> +                       radeon_ib_dump(m, fence->ib);
> +               }
>                seq_printf(m, "r[%04d]=0x%08x", i, ring->ring[i]);
>                if (i == ring->rptr) {
>                        seq_printf(m, " <- RPTR ");
> --
> 1.7.5.4
>

NAK i would rather have a full dump as i described. I can do a patch
for that if you want.

Cheers,
Jerome
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux