Re: [Nouveau] BIG changes to kernel module

2012-08-12 Thread Maxim Levitsky
Just tried this tree.
First to compile I had to use attached patch.
I double checked that I use nouveau tree with nothing on top of it.
tree pulled today from git://anongit.freedesktop.org/nouveau/linux-2.6,
branch master.

re-clocking obliviously stopped working and gave me a kernel panic.
3D appears to work, but I didn't test deeply.

First suspend worked, 2nd suspend caused almost same PFIFO context
unload timeout:

nouveau  [ DRM][:01:00.0] suspending fbcon...
nouveau  [ DRM][:01:00.0] suspending display...
sd 0:0:0:0: [sda] Stopping diskSUBSYSTEM=scsi
DEVICE=+scsi:0:0:0:0
nouveau  [ DRM][:01:00.0] unpinning framebuffer(s)...
nouveau  [ DRM][:01:00.0] evicting buffers...
nouveau  [ DRM][:01:00.0] suspending client object trees...
fnouveau E[   PFIFO][:01:00.0] channel 4 unload timeout
fnouveau E[   PFIFO][:01:00.0][0xc000826f][880036e47000] failed
to detach PGRAPH context, -16
fnouveau E[  PGRAPH][:01:00.0][0x03005014][88007ade4000] failed
suspend, -16
nouveau W[  PGRAPH][:01:00.0][0x02005039][88003684e100] parent
failed suspend, -16
fnouveau E[2955] 0x:0xbeef5039 suspend failed with -16
fnouveau E[2955] 0x:0x suspend failed with -16
fnouveau E[2955] 0x:0x suspend failed with -16
fnouveau E[2955] 0x:0x suspend failed with -16
nouveau  [ DRM][:01:00.0] resuming display...

Thanks for the huge work on this!

Best regards,
Maxim Levitsky

commit ba9f878c75ba412a1f3e1db50569ae3e16b65ec9
Author: Maxim Levitsky maximlevit...@gmail.com
Date:   Sun Aug 12 17:53:25 2012 +0300

diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c 
b/drivers/gpu/drm/nouveau/nouveau_bo.c
index ef96bdb..ed16b6e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -41,6 +41,8 @@
 #include nouveau_ttm.h
 #include nouveau_gem.h
 
+#include drm/ttm/ttm_bo_driver.h
+
 /*
  * NV10-NV40 tiling helpers
  */
@@ -459,10 +461,12 @@ nouveau_ttm_tt_create(struct ttm_bo_device *bdev, 
unsigned long size,
struct nouveau_drm *drm = nouveau_bdev(bdev);
struct drm_device *dev = drm-dev;
 
+#if (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE)  defined(MODULE)))
if (drm-agp.stat == ENABLED) {
return ttm_agp_tt_create(bdev, dev-agp-bridge, size,
 page_flags, dummy_read);
}
+#endif
 
return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read);
 }
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.h 
b/drivers/gpu/drm/nouveau/nouveau_drm.h
index 5693518..2b5c962 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.h
@@ -25,6 +25,8 @@
 #include ttm/ttm_module.h
 #include ttm/ttm_page_alloc.h
 
+#include drm/nouveau_drm.h
+
 struct nouveau_channel;
 
 #define DRM_FILE_PAGE_OFFSET (0x1ULL  PAGE_SHIFT)
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c 
b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 4bddb9e..9e1de65 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -31,7 +31,6 @@
 #include nouveau_drm.h
 #include nouveau_ttm.h
 #include nouveau_gem.h
-
 static int
 nouveau_vram_manager_init(struct ttm_mem_type_manager *man, unsigned long 
psize)
 {
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] BIG changes to kernel module

2012-08-10 Thread Maarten Maathuis
On Mon, Aug 6, 2012 at 8:58 AM, Ben Skeggs skeg...@gmail.com wrote:
 On Sun, Aug 05, 2012 at 10:56:37PM +0200, Marcin Slusarz wrote:
 On Sun, Aug 05, 2012 at 12:40:15PM +1000, Ben Skeggs wrote:
  Hey all,
 
  I've just pushed a major rework/rewrite of the Nouveau kernel module to 
  git[1].
 
  Details of the whys and what-nots of the rework are in the various commit
  messages.  At this point don't expect any exciting cool functionality, the
  work so far is merely a restructure to allow moving forward on a number
  of fronts in the future.
 
  I expect that for a while there will be a *lot* of stupid typos/thinkos 
  that
  cause all sorts of breakage, so please test everything any anything you can
  and report *regressions* from the pre-rework code (vs 3.6-rc1 for example).
 
  I'll endeavour to hunt down and fix the regressions as quickly as 
  possible, so
  please report any issues to this list and/or the freedesktop bugzilla.
 
  There's two areas that didn't get properly ported over, that is 
  PM-related
  things and modesetting.  I'll be handling the modesetting and clk/volt 
  reworks
  starting from nowish (in between fixing regressions), and I suspect Martin
  will handle the rest of the PM bits (therm and fanctrl) since he knows the
  design he's going for there.
 
  One thing to note is that some kernel module options have changed now, the
  more important ones are:
 
  nouveau.vbios=blah - nouveau.config=NvBIOS=blah
  nouveau.noaccel=bool - nouveau.config=PGRAPH=bool
 
  Multiple options are specified like:
 
  nouveau.config=NvBIOS=ACPI,PGRAPH=1
 
  The nouveau.noaccel option now controls acceleration enable/disable for the
  DRM's own GPU usage, and for the abi16 (the new interfaces aren't even
  exposed to userspace yet) interfaces.
 
  The DRM debugging options (drm.debug=bitfield) now only effect the DRM
  specific parts of the nouveau module.  To enable additional debugging etc
  for the core, incantations like the following are used now:
 
  for debug output
 
  nouveau.debug=debug
 
  or for even more verbose debug output
 
  nouveau.debug=trace
 
  or for trace output for everything, and register write logging from POST
 
  nouveau.debug=trace,DEVINIT=spam
 
  Each individual subdev/engine module has its own debug level that can
  override the master debug level.

 It would be very helpful to document this convention and all options in some
 text file in-tree (and later update it when things change).
 Yes, good point.  I'll see to that before any of this hits Linus'.


 Some things I noticed:
 - corruptions / lockups in Warsow (1.0) on one of the bomb maps (I didn't 
 test
   too much, so it might happen on others too) - initially bisected to
   drm/nouveau/instmem: completely new implementation, as a subdev module,
   but I'm not so sure about it - with this commit most textures are corrupted
   and there are PGRAPH_TRAP_MP_EXEC errors in dmesg, but on HEAD I see total
   mayhem with DATA_ERROR, followed by TRAP_MP_EXEC and endless stream of page
   faults
 - new lockups triggerable by piglit
 - VRAM leak? (probably triggered by piglit)
 I'll see if I can reproduce these at all during the week.

 - missing channel id in error messages
 This is actually deliberate, since technically the channel address *is* the
 chid on most engines.  PFIFO errors still log the chid, because there are
 actually indices there.

 I do see how it can be useful to have the PFIFO channel ID too though in
 error messages, so I'll bring them back.

 - debugfs removed (not advertised in any commit, so I don't know if it's
   intentional or not)
 Oops, that *was* a separate commit at some point.  Might have accidentally
 squashed it.  It's intentional for now, it'll come back (better) later.

 - some leftovers:
   - XXX_THIS_IS_A_HACK
   - /* yell very loudly!! */ (no code implementing yelling ;)
 Oops, thanks.  I've fixed both of these and I'll push them shortly.

 Thanks a LOT for looking this over for me.

 Cheers,
 Ben.


 Marcin
 ___
 Nouveau mailing list
 Nouveau@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/nouveau

I've also noticed some problems with huge lag in freespace 2 open, i
see this in dmesg:

[111545.883979] nouveau E[ DRM][:01:00.0] nv50cal_space: -16

I can't find anything obviously wrong with the code checking that we
haven't locked up, but that doesn't mean you shouldn't check it :-)

Note that in the past there were always scenes that were a bit laggy,
but these things are almost like temporary lockups.

-- 
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] BIG changes to kernel module

2012-08-05 Thread Marcin Slusarz
On Sun, Aug 05, 2012 at 12:40:15PM +1000, Ben Skeggs wrote:
 Hey all,
 
 I've just pushed a major rework/rewrite of the Nouveau kernel module to 
 git[1].
 
 Details of the whys and what-nots of the rework are in the various commit
 messages.  At this point don't expect any exciting cool functionality, the
 work so far is merely a restructure to allow moving forward on a number
 of fronts in the future.
 
 I expect that for a while there will be a *lot* of stupid typos/thinkos that
 cause all sorts of breakage, so please test everything any anything you can
 and report *regressions* from the pre-rework code (vs 3.6-rc1 for example).
 
 I'll endeavour to hunt down and fix the regressions as quickly as possible, so
 please report any issues to this list and/or the freedesktop bugzilla.
 
 There's two areas that didn't get properly ported over, that is PM-related
 things and modesetting.  I'll be handling the modesetting and clk/volt reworks
 starting from nowish (in between fixing regressions), and I suspect Martin
 will handle the rest of the PM bits (therm and fanctrl) since he knows the
 design he's going for there.
 
 One thing to note is that some kernel module options have changed now, the
 more important ones are:
 
 nouveau.vbios=blah - nouveau.config=NvBIOS=blah
 nouveau.noaccel=bool - nouveau.config=PGRAPH=bool
 
 Multiple options are specified like:
 
 nouveau.config=NvBIOS=ACPI,PGRAPH=1
 
 The nouveau.noaccel option now controls acceleration enable/disable for the
 DRM's own GPU usage, and for the abi16 (the new interfaces aren't even
 exposed to userspace yet) interfaces.
 
 The DRM debugging options (drm.debug=bitfield) now only effect the DRM
 specific parts of the nouveau module.  To enable additional debugging etc
 for the core, incantations like the following are used now:
 
 for debug output
 
 nouveau.debug=debug
 
 or for even more verbose debug output
 
 nouveau.debug=trace
 
 or for trace output for everything, and register write logging from POST
 
 nouveau.debug=trace,DEVINIT=spam
 
 Each individual subdev/engine module has its own debug level that can
 override the master debug level.

It would be very helpful to document this convention and all options in some
text file in-tree (and later update it when things change).

Some things I noticed:
- corruptions / lockups in Warsow (1.0) on one of the bomb maps (I didn't test
  too much, so it might happen on others too) - initially bisected to
  drm/nouveau/instmem: completely new implementation, as a subdev module,
  but I'm not so sure about it - with this commit most textures are corrupted
  and there are PGRAPH_TRAP_MP_EXEC errors in dmesg, but on HEAD I see total
  mayhem with DATA_ERROR, followed by TRAP_MP_EXEC and endless stream of page
  faults
- new lockups triggerable by piglit
- VRAM leak? (probably triggered by piglit)
- missing channel id in error messages
- debugfs removed (not advertised in any commit, so I don't know if it's
  intentional or not)
- some leftovers:
  - XXX_THIS_IS_A_HACK
  - /* yell very loudly!! */ (no code implementing yelling ;)

Marcin
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] BIG changes to kernel module

2012-08-04 Thread Ben Skeggs
Hey all,

I've just pushed a major rework/rewrite of the Nouveau kernel module to git[1].

Details of the whys and what-nots of the rework are in the various commit
messages.  At this point don't expect any exciting cool functionality, the
work so far is merely a restructure to allow moving forward on a number
of fronts in the future.

I expect that for a while there will be a *lot* of stupid typos/thinkos that
cause all sorts of breakage, so please test everything any anything you can
and report *regressions* from the pre-rework code (vs 3.6-rc1 for example).

I'll endeavour to hunt down and fix the regressions as quickly as possible, so
please report any issues to this list and/or the freedesktop bugzilla.

There's two areas that didn't get properly ported over, that is PM-related
things and modesetting.  I'll be handling the modesetting and clk/volt reworks
starting from nowish (in between fixing regressions), and I suspect Martin
will handle the rest of the PM bits (therm and fanctrl) since he knows the
design he's going for there.

One thing to note is that some kernel module options have changed now, the
more important ones are:

nouveau.vbios=blah - nouveau.config=NvBIOS=blah
nouveau.noaccel=bool - nouveau.config=PGRAPH=bool

Multiple options are specified like:

nouveau.config=NvBIOS=ACPI,PGRAPH=1

The nouveau.noaccel option now controls acceleration enable/disable for the
DRM's own GPU usage, and for the abi16 (the new interfaces aren't even
exposed to userspace yet) interfaces.

The DRM debugging options (drm.debug=bitfield) now only effect the DRM
specific parts of the nouveau module.  To enable additional debugging etc
for the core, incantations like the following are used now:

for debug output

nouveau.debug=debug

or for even more verbose debug output

nouveau.debug=trace

or for trace output for everything, and register write logging from POST

nouveau.debug=trace,DEVINIT=spam

Each individual subdev/engine module has its own debug level that can
override the master debug level.

Now, I'm off to relax a bit (read: hide) before the storm of bug reports :)

Cheers,
Ben.


[1] http://cgit.freedesktop.org/nouveau/linux-2.6
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau