Mesa (master): nvc0: fix mp_stack_bo relocation

Ben Skeggs darktama at kemper.freedesktop.org
Thu Jan 13 04:47:13 UTC 2011


Module: Mesa
Branch: master
Commit: 0c1db2feb9c2f5c9a2ef486053b6e9dcd9860b3e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c1db2feb9c2f5c9a2ef486053b6e9dcd9860b3e

Author: Ben Skeggs <bskeggs at redhat.com>
Date:   Thu Jan 13 13:23:55 2011 +1000

nvc0: fix mp_stack_bo relocation

Fixes a PT_NOT_PRESENT error cause by:
- allocating in VRAM
- emitting GART relocs to 0x17bc/0x17c0, moving the buffer
- telling the bufmgr that the buffer should be in VRAM when we use it,
  but not correcting the value sent to 0x17bc/0x17c0.

Signed-off-by: Ben Skeggs <bskeggs at redhat.com>

---

 src/gallium/drivers/nvc0/nvc0_screen.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
index c191790..928ea7e 100644
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
@@ -503,8 +503,8 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
       goto fail;
 
    BEGIN_RING(chan, RING_3D_(0x17bc), 3);
-   OUT_RELOCh(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RDWR);
-   OUT_RELOCl(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_GART | NOUVEAU_BO_RDWR);
+   OUT_RELOCh(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
+   OUT_RELOCl(chan, screen->mp_stack_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR);
    OUT_RING  (chan, 1);
 
    ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 1 << 17, 1 << 17, &screen->txc);




More information about the mesa-commit mailing list