TTM placement & caching issue/questions

2014-09-05 Thread Jochen Rollwagen
Sorry for chiming in here, i?ve passively followed the discussion. If you produce patches for a 3.14 kernel that solve this issue: http://lists.freedesktop.org/archives/dri-devel/2013-November/049185.html (thereby enabling AGP mode on mac mini G4?s, should still be quite a few of them around)

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Thu, 2014-09-04 at 11:34 +0200, Daniel Vetter wrote: > On Thu, Sep 04, 2014 at 09:44:04AM +0200, Thomas Hellstrom wrote: > > Last time I tested, (and it seems like Michel is on the same track), > > writing with the CPU to write-combined memory was substantially faster > > than writing to cached

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Thu, 2014-09-04 at 16:59 +0900, Michel D?nzer wrote: > > Define 'not reliably'. I have uptimes of weeks, and I'm pretty sure I'm > not alone, at least with AGP 1x it seems to work quite well for most > people. So I don't see the justification for intentionally breaking it > completely for

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Thu, 2014-09-04 at 09:44 +0200, Thomas Hellstrom wrote: > > This will, from what I can tell, try to use the same caching mode as the > > original object: > > > > if ((cur_placement & caching) != 0) > > result |= (cur_placement & caching); > > > > And cur_placement comes from

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Thu, 2014-09-04 at 16:19 +0900, Michel D?nzer wrote: > > +#else /* CONFIG_X86 */ > > +int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t > *placement) > > +{ > > + if (*placement & (TTM_PL_TT | TTM_PL_FLAG_SYSTEM)) { > > + ttm->caching_state = tt_cached; > > +

TTM placement & caching issue/questions

2014-09-04 Thread Michel Dänzer
On 04.09.2014 16:59, Michel D?nzer wrote: > On 04.09.2014 16:54, Benjamin Herrenschmidt wrote: >> On Thu, 2014-09-04 at 16:19 +0900, Michel D?nzer wrote: +#else /* CONFIG_X86 */ +int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t >>> *placement) +{ + if

TTM placement & caching issue/questions

2014-09-04 Thread Michel Dänzer
On 04.09.2014 16:54, Benjamin Herrenschmidt wrote: > On Thu, 2014-09-04 at 16:19 +0900, Michel D?nzer wrote: >>> +#else /* CONFIG_X86 */ >>> +int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t >> *placement) >>> +{ >>> + if (*placement & (TTM_PL_TT | TTM_PL_FLAG_SYSTEM)) { >>> +

TTM placement & caching issue/questions

2014-09-04 Thread Michel Dänzer
On 04.09.2014 11:36, Jerome Glisse wrote: > On Wed, Sep 03, 2014 at 10:31:18PM -0400, Jerome Glisse wrote: >> On Thu, Sep 04, 2014 at 12:25:23PM +1000, Benjamin Herrenschmidt wrote: >>> On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: >>> So in the meantime the attached patch should

TTM placement & caching issue/questions

2014-09-04 Thread Michel Dänzer
On 04.09.2014 10:55, Jerome Glisse wrote: > > While i agree about the issue of incoherent double map of same page, i > think we have more issue. For instance lattely AMD have been pushing a > lot of patches to move things to use uncached memory for radeon and as > usual thoses patches comes with

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Wed, 2014-09-03 at 22:36 -0400, Jerome Glisse wrote: > On Wed, Sep 03, 2014 at 10:31:18PM -0400, Jerome Glisse wrote: > > On Thu, Sep 04, 2014 at 12:25:23PM +1000, Benjamin Herrenschmidt wrote: > > > On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: > > > > > > > So in the meantime the

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: > So in the meantime the attached patch should work, it just silently ignore > the caching attribute request on non x86 instead of pretending that things > are setup as expected and then latter the radeon ou nouveau hw unsetting > the snoop

TTM placement & caching issue/questions

2014-09-04 Thread Thomas Hellstrom
On 09/04/2014 11:43 AM, Benjamin Herrenschmidt wrote: > On Thu, 2014-09-04 at 11:34 +0200, Daniel Vetter wrote: >> On Thu, Sep 04, 2014 at 09:44:04AM +0200, Thomas Hellstrom wrote: >>> Last time I tested, (and it seems like Michel is on the same track), >>> writing with the CPU to write-combined

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
On Wed, 2014-09-03 at 21:55 -0400, Jerome Glisse wrote: > So i think we need to get a platform flags and or set_pages_array_wc|uc > needs to fail and this would fallback to cached mapping if the fallback > code still works. So if your arch properly return and error for those > cache changing

TTM placement & caching issue/questions

2014-09-04 Thread Daniel Vetter
On Thu, Sep 04, 2014 at 09:44:04AM +0200, Thomas Hellstrom wrote: > Last time I tested, (and it seems like Michel is on the same track), > writing with the CPU to write-combined memory was substantially faster > than writing to cached memory, with the additional side-effect that CPU > caches are

TTM placement & caching issue/questions

2014-09-04 Thread Thomas Hellstrom
On 09/04/2014 10:06 AM, Benjamin Herrenschmidt wrote: > On Thu, 2014-09-04 at 09:44 +0200, Thomas Hellstrom wrote: > >>> This will, from what I can tell, try to use the same caching mode as the >>> original object: >>> >>> if ((cur_placement & caching) != 0) >>> result |=

TTM placement & caching issue/questions

2014-09-04 Thread Benjamin Herrenschmidt
Hi folks ! I've been tracking down some problems with the recent DRI on powerpc and stumbled upon something that doesn't look right, and not necessarily only for us. Now it's possible that I haven't fully understood the code here and I also don't know to what extent some of that behaviour is

TTM placement & caching issue/questions

2014-09-04 Thread Thomas Hellstrom
Hi! Let me try to bring some clarity and suggestions into this. On 09/04/2014 02:12 AM, Benjamin Herrenschmidt wrote: > Hi folks ! > > I've been tracking down some problems with the recent DRI on powerpc and > stumbled upon something that doesn't look right, and not necessarily > only for us. >

TTM placement & caching issue/questions

2014-09-04 Thread Gabriel Paubert
On Wed, Sep 03, 2014 at 10:36:57PM -0400, Jerome Glisse wrote: > On Wed, Sep 03, 2014 at 10:31:18PM -0400, Jerome Glisse wrote: > > On Thu, Sep 04, 2014 at 12:25:23PM +1000, Benjamin Herrenschmidt wrote: > > > On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: > > > > > > > So in the

TTM placement & caching issue/questions

2014-09-03 Thread Jerome Glisse
On Wed, Sep 03, 2014 at 10:31:18PM -0400, Jerome Glisse wrote: > On Thu, Sep 04, 2014 at 12:25:23PM +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: > > > > > So in the meantime the attached patch should work, it just silently ignore > > > the

TTM placement & caching issue/questions

2014-09-03 Thread Jerome Glisse
On Wed, Sep 03, 2014 at 10:31:18PM -0400, Jerome Glisse wrote: > On Thu, Sep 04, 2014 at 12:25:23PM +1000, Benjamin Herrenschmidt wrote: > > On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: > > > > > So in the meantime the attached patch should work, it just silently ignore > > > the

TTM placement & caching issue/questions

2014-09-03 Thread Jerome Glisse
On Thu, Sep 04, 2014 at 12:25:23PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2014-09-03 at 22:07 -0400, Jerome Glisse wrote: > > > So in the meantime the attached patch should work, it just silently ignore > > the caching attribute request on non x86 instead of pretending that things > > are

TTM placement & caching issue/questions

2014-09-03 Thread Jerome Glisse
On Wed, Sep 03, 2014 at 09:55:53PM -0400, Jerome Glisse wrote: > On Thu, Sep 04, 2014 at 10:12:27AM +1000, Benjamin Herrenschmidt wrote: > > Hi folks ! > > > > I've been tracking down some problems with the recent DRI on powerpc and > > stumbled upon something that doesn't look right, and not

TTM placement & caching issue/questions

2014-09-03 Thread Jerome Glisse
On Thu, Sep 04, 2014 at 10:12:27AM +1000, Benjamin Herrenschmidt wrote: > Hi folks ! > > I've been tracking down some problems with the recent DRI on powerpc and > stumbled upon something that doesn't look right, and not necessarily > only for us. > > Now it's possible that I haven't fully