[Mesa-dev] [PATCH] nouveau: set imported buffers to what the kernel gives us

Ilia Mirkin imirkin at alum.mit.edu
Wed Jun 10 01:10:58 PDT 2015


Not sure if we should care, but this could cause issues on G80 where you
can only set memtype on vram mappings. Pretty sure that's already
semi-broken though. But something to consider.
On Jun 10, 2015 5:29 AM, "Dave Airlie" <airlied at gmail.com> wrote:

> 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
> 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;
> --
> 2.4.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150610/c8fefb16/attachment.html>


More information about the mesa-dev mailing list