nvc0: inform kernel about buffers that screen_create touches
authorBen Skeggs <bskeggs@redhat.com>
Fri, 22 Nov 2013 01:34:13 +0000 (11:34 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 22 Nov 2013 01:34:43 +0000 (11:34 +1000)
Prevents a GPU page fault if somehow the uniform bo gets evicted
before the screen_create pushbuf has been submitted.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c

index 253ee790540af90dfa95acab1e281dffcb5d33c8..b203089ec08a19459b4948eb592fb07d7c518e02 100644 (file)
@@ -743,6 +743,8 @@ nvc0_screen_create(struct nouveau_device *dev)
    if (ret)
       goto fail;
 
+   PUSH_REFN (push, screen->uniform_bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR);
+
    for (i = 0; i < 5; ++i) {
       /* TIC and TSC entries for each unit (nve4+ only) */
       /* auxiliary constants (6 user clip planes, base instance id) */