All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Alex Ivanov <gnidorah@p0n4ik.tk>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: drm/radeon: "ring test failed" on PA-RISC Linux
Date: Mon, 23 Sep 2013 16:11:32 -0400	[thread overview]
Message-ID: <20130923201132.GD3019@phenom.dumpdata.com> (raw)
In-Reply-To: <A1F468BF-6988-429F-AA9B-243A53517CC1@p0n4ik.tk>

On Sat, Sep 21, 2013 at 07:39:10AM +0400, Alex Ivanov wrote:
> 21.09.2013, в 1:27, Alex Deucher <alexdeucher@gmail.com> написал(а):
> 
> > On Tue, Sep 17, 2013 at 3:33 PM, Alex Ivanov <gnidorah@p0n4ik.tk> wrote:
> >> 17.09.2013, в 18:24, Alex Deucher <alexdeucher@gmail.com> написал(а):
> >> 
> >>> On Tue, Sep 17, 2013 at 5:23 AM, Alex Ivanov <gnidorah@p0n4ik.tk> wrote:
> >>>> Alex,
> >>>> 
> >>>> 10.09.2013, в 16:37, Alex Deucher <alexdeucher@gmail.com> написал(а):
> >>>> 
> >>>>> The dummy page isn't really going to help much.  That page is just
> >>>>> used as a safety placeholder for gart entries that aren't mapped on
> >>>>> the GPU.  TTM (drivers/gpu/drm/ttm) actually does the allocation of
> >>>>> the backing pages for the gart.
> >>>> 
> >>>>> You may want to look there.
> >>>> 
> >>>> Ah, sorry. Indeed. Though, my idea with:
> >>>> 
> >>>> On Tue, Sep 10, 2013 at 5:20 AM, Alex Ivanov <gnidorah@p0n4ik.tk> wrote:
> >>>> 
> >>>>> Thanks! I'll try. Meanwhile i've tried a switch from page_alloc() to
> >>>>> dma_alloc_coherent() in radeon_dummy_page_*(), which didn't help :(
> >>>> 
> >>>> doesn't make a sense at TTM part as well.
> >>> 
> >>> After the driver is loaded, you can dump some info from debugfs:
> >>> r100_rbbm_info
> >>> r100_cp_ring_info
> >>> r100_cp_csq_fifo
> >>> Which will dump a bunch of registers and internal fifos so we can see
> >>> that the chip actually processed.
> >>> 
> >>> Alex
> >> 
> >> Reading of r100_cp_ring_info leads to a KP:
> >> 
> >> r100_debugfs_cp_ring_info():
> >> count = (rdp + ring->ring_size - wdp) & ring->ptr_mask;
> >> i = (rdp + j) & ring->ptr_mask;
> >> 
> >>        for (j = 0; j <= count; j++) {
> >>                i = (rdp + j) & ring->ptr_mask;
> >>                --> Here at first iteration <--
> >>                --> count = 262080, i = 0 <--
> >>                seq_printf(m, "r[%04d]=0x%08x\n", i, ring->ring[i]);
> >>        }
> >> 
> >> Reading of radeon_ring_gfx (which i've additionally tried to read)
> >> throws an MCE:
> >> 
> >> radeon_debugfs_ring_info():
> >> count = (ring->ring_size / 4) - ring->ring_free_dw;
> >> i = (ring->rptr + ring->ptr_mask + 1 - 32) & ring->ptr_mask;
> >> 
> >>        for (j = 0; j <= (count + 32); j++) {
> >>                --> Here at first iteration <--
> >>                --> i = 262112, j = 0 <--
> >>                seq_printf(m, "r[%5d]=0x%08x\n", i, ring->ring[i]);
> >>                i = (i + 1) & ring->ptr_mask;
> >>        }
> >> 
> >> I'm attaching debug outputs on kernel built with these loops commented.
> > 
> > The register writes seems to be going through the register backbone correctly:
> > 
> > [0x00B] 0x15E0=0x00000000
> > [0x00C] 0x15E4=0xCAFEDEAD
> > [0x00D] 0x4274=0x0000000F
> > [0x00E] 0x42C8=0x00000007
> > [0x00F] 0x4018=0x0000001D
> > [0x010] 0x170C=0x80000000
> > [0x011] 0x3428=0x00020100
> > [0x012] 0x15E4=0xCAFEDEAD
> > 
> > You can see the 0xCAFEDEAD written to the scratch register via MMIO
> > from the ring_test(). The CP fifo however seems to be full of garbage.
> > The CP is busy though, so it seems to be functional.  I guess it's
> > just fetching garbage rather than commands.

If it is fetching garbage, that would imply the DMA (or bus addresses)
that are programmed in the GART are bogus. If you dump them and try
to figure out if bus adress -> physical address -> virtual address ==
virtual address -> bus address that could help. And perhaps seeing what
the virtual address has - and or poisoning it with known data?

Or perhaps the the card has picked up an incorrect page table? Meaning
the (bus) address given to it is not the correct one?

> > 
> > Does doing a posted write when writing to the ring buffer help?
> 
> Unfortunately, no.
> 
> > 
> > diff --git a/drivers/gpu/drm/radeon/radeon_ring.c
> > b/drivers/gpu/drm/radeon/radeon_ring.c
> > index a890756..b4f04d2 100644
> > --- a/drivers/gpu/drm/radeon/radeon_ring.c
> > +++ b/drivers/gpu/drm/radeon/radeon_ring.c
> > @@ -324,12 +324,14 @@ static int radeon_debugfs_ring_init(struct
> > radeon_device *rdev, struct radeon_ri
> >  */
> > void radeon_ring_write(struct radeon_ring *ring, uint32_t v)
> > {
> > +       u32 tmp;
> > #if DRM_DEBUG_CODE
> >        if (ring->count_dw <= 0) {
> >                DRM_ERROR("radeon: writing more dwords to the ring
> > than expected!\n");
> >        }
> > #endif
> >        ring->ring[ring->wptr++] = v;
> > +       tmp = ring->ring[ring->wptr - 1];
> >        ring->wptr &= ring->ptr_mask;
> >        ring->count_dw--;
> >        ring->ring_free_dw--;
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2013-09-23 20:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14  7:11 [PATCH] parisc: fix LMMIO mismatch between PAT length and MASK register Helge Deller
2013-06-14  7:28 ` Matt Turner
2013-06-14  7:38   ` Helge Deller
2013-06-14  7:40     ` Helge Deller
2013-06-14  8:38     ` Thomas Bogendoerfer
2013-07-09  5:34     ` Alex Ivanov
2013-07-09 15:18       ` John David Anglin
2013-07-09 19:45         ` Alex Ivanov
2013-07-09 20:59           ` John David Anglin
2013-07-09 23:35             ` John David Anglin
2013-07-10 20:19               ` Alex Ivanov
2013-07-10 20:28                 ` John David Anglin
2013-07-10 21:14                 ` Matt Turner
2013-07-10 21:29                   ` Alex Ivanov
     [not found]                     ` <51DF0B90.3040506@gmx.de>
2013-07-11 19:47                       ` Helge Deller
2013-08-04 11:00                         ` Alex Ivanov
2013-08-04 15:44                           ` John David Anglin
2013-08-04 16:28                             ` Matt Turner
2013-08-10 19:41                           ` John David Anglin
2013-09-09 16:44                           ` drm/radeon: "ring test failed" on PA-RISC Linux Alex Ivanov
2013-09-09 17:43                             ` Alex Deucher
2013-09-10  9:20                               ` Alex Ivanov
2013-09-10 12:37                                 ` Alex Deucher
2013-09-10 13:03                                   ` Hans Verkuil
2013-09-10 13:25                                 ` Konrad Rzeszutek Wilk
2013-09-11 11:11                                   ` Fwd: " Alex Ivanov
2013-09-17  8:13                                     ` Alex Ivanov
2013-09-17  9:23                                   ` Alex Ivanov
2013-09-17 14:24                                     ` Alex Deucher
2013-09-17 19:33                                       ` Alex Ivanov
2013-09-20  6:52                                         ` Alex Ivanov
2013-09-20 21:27                                         ` Alex Deucher
2013-09-21  3:39                                           ` Alex Ivanov
2013-09-23 20:11                                             ` Konrad Rzeszutek Wilk [this message]
2013-09-25 16:29                                               ` Alex Ivanov
2013-09-25 17:28                                                 ` Konrad Rzeszutek Wilk
2013-09-25 18:17                                                   ` Alex Deucher
2013-09-25 18:51                                                   ` Alex Ivanov
2013-09-26  8:39                                                     ` Alex Ivanov
2013-09-10 15:45                             ` Michel Dänzer
2013-06-14  8:39 ` [PATCH] parisc: fix LMMIO mismatch between PAT length and MASK register Thomas Bogendoerfer
2013-06-18 21:21 ` Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130923201132.GD3019@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnidorah@p0n4ik.tk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.