Mesa (master): nouveau: set imported buffers to what the kernel gives us

Dave Airlie airlied at kemper.freedesktop.org
Wed Jun 10 04:10:52 UTC 2015


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

Author: Dave Airlie <airlied at gmail.com>
Date:   Wed Jun 10 13:26:56 2015 +1000

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: mesa-stable at lists.freedesktop.org
Acked-by: Ben Skeggs <bskeggs at redhat.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/nouveau/nv50/nv50_miptree.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
index 744a3a5..10cebb1 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;




More information about the mesa-commit mailing list