From: Axel Davy Date: Fri, 27 Jun 2014 00:53:43 +0000 (-0400) Subject: nv50: fix dri3 prime buffer creation X-Git-Tag: upstream/10.3~1311 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c58486516f2ec8341f92554e28fd84c10d835a45;p=platform%2Fupstream%2Fmesa.git nv50: fix dri3 prime buffer creation This is the same fix than "nvc0: fix dri3 prime buffer creation" Signed-off-by: Axel Davy Reviewed-by: Ilia Mirkin Signed-off-by: Dave Airlie --- diff --git a/src/gallium/drivers/nouveau/nv50/nv50_miptree.c b/src/gallium/drivers/nouveau/nv50/nv50_miptree.c index 4c55179..14e5a0d 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;