summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-06-10 13:26:56 +1000
committerDave Airlie <[email protected]>2015-06-10 14:10:01 +1000
commitc6877c9e5983287a0741b26a358b7d744aebe232 (patch)
treef2d10728f83fb0609d3eb0a8ba847d1e16a35023 /src/gallium/drivers/nouveau
parent9dca3beb62e894bbd720c5eecb47c0fd2c6132f9 (diff)
nouveau: set imported buffers to what the kernel gives us
When we import a dma-buf fd from another driver the kernel gives us the right info, and this trashes it. Convert the kernel bo flags into the domain flags. This helps getting reverse prime and glamor working. Cc: [email protected] Acked-by: Ben Skeggs <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_miptree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
index 744a3a5bf8b..10cebb17eee 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
@@ -419,7 +419,7 @@ nv50_miptree_from_handle(struct pipe_screen *pscreen,
FREE(mt);
return NULL;
}
- mt->base.domain = NOUVEAU_BO_VRAM;
+ mt->base.domain = mt->base.bo->flags & NOUVEAU_BO_APER;
mt->base.address = mt->base.bo->offset;
mt->base.base = *templ;