aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs2013-01-06 21:07:13 -0600
committerBen Skeggs2013-01-06 21:15:28 -0600
commit891517f5111cd82909906d5e8ee0299db0d46762 (patch)
tree50e825af9bbbe90854399556a6fa0d87d4c9cc4d
parentbaf0a7daafc7636106e1b19267ed22e22b1a2283 (diff)
downloadlibdrm-891517f5111cd82909906d5e8ee0299db0d46762.tar.gz
libdrm-891517f5111cd82909906d5e8ee0299db0d46762.tar.xz
libdrm-891517f5111cd82909906d5e8ee0299db0d46762.zip
nouveau: disallow pushbuf BOs in multiple memory types
Under certain circumstances it's possible for libdrm to decide to move a GART|VRAM pushbuf to be VRAM-only. This causes the kernel to reject the command submission on GF8 and up, due to a stricter policy where buffers are only allowed to move to memory types that were specified at creation time. The simplest fix for this is to force the creation-time memory type for the lifetime of the push buffer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--nouveau/pushbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 0e37ce3d..ff8e125e 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -574,13 +574,13 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
574 push->client = client; 574 push->client = client;
575 push->channel = immediate ? chan : NULL; 575 push->channel = immediate ? chan : NULL;
576 push->flags = NOUVEAU_BO_RD; 576 push->flags = NOUVEAU_BO_RD;
577 if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_VRAM) {
578 push->flags |= NOUVEAU_BO_VRAM;
579 nvpb->type = NOUVEAU_BO_VRAM;
580 }
581 if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_GART) { 577 if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_GART) {
582 push->flags |= NOUVEAU_BO_GART; 578 push->flags |= NOUVEAU_BO_GART;
583 nvpb->type = NOUVEAU_BO_GART; 579 nvpb->type = NOUVEAU_BO_GART;
580 } else
581 if (fifo->pushbuf & NOUVEAU_GEM_DOMAIN_VRAM) {
582 push->flags |= NOUVEAU_BO_VRAM;
583 nvpb->type = NOUVEAU_BO_VRAM;
584 } 584 }
585 nvpb->type |= NOUVEAU_BO_MAP; 585 nvpb->type |= NOUVEAU_BO_MAP;
586 586