summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-06-26 20:53:43 -0400
committerDave Airlie <[email protected]>2014-06-27 13:38:20 +1000
commitc58486516f2ec8341f92554e28fd84c10d835a45 (patch)
tree79d49e180cdf32fbd1d0135e449cfb2b8a01a58b /src/gallium/drivers/nouveau
parent13eddf3bf2d9aee3ebca828d009c01d16f6545c6 (diff)
nv50: fix dri3 prime buffer creation
This is the same fix than "nvc0: fix dri3 prime buffer creation" Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Ilia Mirkin <[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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
index 4c5517978c0..14e5a0da077 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c
@@ -352,7 +352,12 @@ nv50_miptree_create(struct pipe_screen *pscreen,
}
bo_config.nv50.tile_mode = mt->level[0].tile_mode;
- bo_flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_NOSNOOP;
+ if (!bo_config.nv50.memtype && (pt->bind & PIPE_BIND_SHARED))
+ mt->base.domain = NOUVEAU_BO_GART;
+ else
+ mt->base.domain = NOUVEAU_BO_VRAM;
+
+ bo_flags = mt->base.domain | NOUVEAU_BO_NOSNOOP;
if (mt->base.base.bind & (PIPE_BIND_CURSOR | PIPE_BIND_DISPLAY_TARGET))
bo_flags |= NOUVEAU_BO_CONTIG;
@@ -362,7 +367,6 @@ nv50_miptree_create(struct pipe_screen *pscreen,
FREE(mt);
return NULL;
}
- mt->base.domain = NOUVEAU_BO_VRAM;
mt->base.address = mt->base.bo->offset;
return pt;