linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Gerhard Pircher" <gerhard_pircher@gmx.net>
To: "\"Michel Dänzer\"" <michel@daenzer.net>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: PowerPC radeon KMS - is it possible?
Date: Fri, 20 Apr 2012 18:14:07 +0200	[thread overview]
Message-ID: <20120420161407.190300@gmx.net> (raw)
In-Reply-To: <1334927896.5989.463.camel@thor.local>


-------- Original-Nachricht --------
> Datum: Fri, 20 Apr 2012 15:18:16 +0200
> Von: "Michel Dänzer" <michel@daenzer.net>
> An: Gerhard Pircher <gerhard_pircher@gmx.net>
> CC: linuxppc-dev@lists.ozlabs.org
> Betreff: Re: PowerPC radeon KMS - is it possible?

> On Fre, 2012-04-20 at 13:15 +0200, Gerhard Pircher wrote: 
> > > Von: "Michel Dänzer" <michel@daenzer.net>
> > > On Don, 2012-04-19 at 13:48 +0200, Gerhard Pircher wrote: 
> > > > 
> > > > The "former case" is an explanation, why I see data corruption
> > > > with my< AGPGART driver (more or less a copy of the uninorth
> > > > driver) on my non-coherent platform. There are no cache flushes
> > > > done for writes to already mapped pages.
> > > 
> > > As I said, the radeon driver always maps AGP memory uncacheable for
> > > the CPU, so no such CPU cache flushes should be necessary.
> > I know. We also discussed this topic over two years ago. :-)
> > 
> > What I didn't understand yet is how this uncacheable memory is
> > allocated (well, I never took the time to look at this again). The
> > functions in ttm_page_alloc.c seem to allocate normal cacheable
> > memory and try to set the page flags with set_pages_array_uc(),
> > which is more or less a no-op on powerpc. ttm_page_alloc_dma.c on
> > the other side is only used with SWIOTLB!?
> [...] 
> > Could it be that the memory is finally mapped uncacheable by
> radeon_bo_kmap()/
> > ttm_bo_kmap()/..some other TTM functions../vmap()?
> 
> Yeah, AFAICT, basically ttm_io_prot() defines the mapping attributes,
> and vmap() is used to enforce them for kernel mappings.
Okay, that sounds like the approach used by arch/powerpc/mm/dma-
noncoherent.c in my ("green") ears. What about the PCIGART mode?
Is the driver free to use cached memory in this mode?

> > Here is an excerpt of the 2.6.39 kernel log. IIRC the testing code
> > changed in the meantime so I guess it would make sense to repeat it
> > with a newer kernel version.
> 
> I was going to suggest that. :)
As expected. :-)

> > [    5.490569] [drm:radeon_test_moves] *ERROR* Incorrect GTT->VRAM copy 0: Got 0xf13268c0, expected 0xf1326160 (GTT map 0xf1326000-0xf1426000)
> > [    5.503397] [drm:radeon_test_moves] *ERROR* Incorrect GTT->VRAM copy 0: Got 0xf13268c4, expected 0xf1326164 (GTT map 0xf1326000-0xf1426000)
> > [    5.516202] [drm:radeon_test_moves] *ERROR* Incorrect GTT->VRAM copy 0: Got 0xf13268c0, expected 0xf1326168 (GTT map 0xf1326000-0xf1426000)
> > [    5.528993] [drm:radeon_test_moves] *ERROR* Incorrect GTT->VRAM copy 0: Got 0xf13268c4, expected 0xf132616c (GTT map 0xf1326000-0xf1426000)
> [...] 
> > [    5.878809] [drm:radeon_test_moves] *ERROR* Incorrect VRAM->GTT copy 0: Got 0xf1416ec0, expected 0xf1570ec0 (VRAM map 0xf1480000-0xf1580000)
> 
> > For the GTT->VRAM copy it looks like the AGPGART driver at least
> > gets the graphics aperture translation table right, as both the
> > returned and expected values are within a page. But the page offset
> > of the returned values (0x8c0, 0x8c4) makes me wonder whether I'm
> > fooled by a hardware bug or a cache coherency problem.
> 
> Hard to say... at least it managed to transfer the first 352 bytes
> correctly. ;)
Better than nothing! :-)

> > The VRAM->GTT copy totally puzzles me, as it returns a wrong page
> > address, but the offset is fine!?
> 
> Maybe it's still the values from the GTT->VRAM test, i.e. either the GPU
> writes didn't make it to the memory mapped into the AGP GART (some AGP
Good point. Maybe I should explicitly clear the gtt_map before the
VRAM->GTT copy test is executed.

> bridges are known to have issues with that) or the CPU doesn't see it.
What is the workaround for such an AGP bridge? If there is one at all...

> BTW, does your driver set cant_use_aperture, or is the linear aperture
> accessible by the CPU?
The driver sets cant_use_aperture. I couldn't get it working at all
without it.

regards,
Gerhard
-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

  reply	other threads:[~2012-04-20 16:14 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 11:15 PowerPC radeon KMS - is it possible? Gerhard Pircher
2012-04-20 13:18 ` Michel Dänzer
2012-04-20 16:14   ` Gerhard Pircher [this message]
2012-04-23  9:56     ` Michel Dänzer
2012-04-23 16:45       ` Gerhard Pircher
2012-04-24 14:15         ` Michel Dänzer
2012-04-24 17:10           ` Gerhard Pircher
  -- strict thread matches above, loose matches on Subject: below --
2012-04-17 19:49 o jordan
2012-04-18  6:35 ` Michel Dänzer
2012-04-18  6:59 ` Benjamin Herrenschmidt
     [not found] ` <1334730915.5989.265.camel__41553.0639271767$1334731329$gmane$org@thor.local>
2012-04-18  7:42   ` Andreas Schwab
2012-04-18  7:52     ` Michel Dänzer
2012-04-18 11:25       ` Andreas Schwab
2012-04-18 13:02         ` Michel Dänzer
2012-04-18 13:22           ` Andreas Schwab
2012-04-18 13:25             ` Michel Dänzer
2012-04-18 13:47               ` Andreas Schwab
2012-04-18  7:54   ` Andreas Schwab
2012-04-18  8:02     ` Michel Dänzer
2012-04-18 10:20       ` Benjamin Herrenschmidt
2012-04-18 10:34         ` Michel Dänzer
2012-04-18 10:44           ` Michel Dänzer
2012-04-18 11:19             ` Benjamin Herrenschmidt
2012-04-18 13:08               ` Michel Dänzer
2012-04-18 12:49             ` Andreas Schwab
2012-04-18 11:17           ` Benjamin Herrenschmidt
2012-04-18 13:27             ` Michel Dänzer
2012-04-18 11:30       ` Andreas Schwab
2012-04-18 13:38         ` Michel Dänzer
2012-04-18 14:28           ` Andreas Schwab
2012-04-18 14:31             ` Michel Dänzer
2012-04-18 14:55               ` Andreas Schwab
2012-04-18 15:01                 ` Michel Dänzer
2012-04-18 15:49                   ` Gerhard Pircher
2012-04-18 16:06                     ` Michel Dänzer
2012-04-18 16:23                       ` Gerhard Pircher
2012-04-19  6:32                         ` Michel Dänzer
2012-04-19 11:48                           ` Gerhard Pircher
2012-04-19 12:41                             ` Michel Dänzer
2012-04-18 15:39       ` Andreas Schwab
     [not found] ` <1334732346.1159.5.camel__22339.9641145535$1334732429$gmane$org@pasglop>
2012-04-18  7:46   ` Andreas Schwab
2012-04-18 10:35     ` Benjamin Herrenschmidt
2012-04-18 10:37       ` Benjamin Herrenschmidt
2012-04-18 10:54         ` Michel Dänzer
2012-04-18 11:23           ` Benjamin Herrenschmidt
2012-04-18 13:07             ` Michel Dänzer
2012-04-18 22:25               ` Benjamin Herrenschmidt

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=20120420161407.190300@gmx.net \
    --to=gerhard_pircher@gmx.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michel@daenzer.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).