On Wed, Jun 8, 2016 at 4:45 AM, Michel Dänzer <[email protected]> wrote:
> From: Michel Dänzer <[email protected]>
>
> Fixes corruption when using DRI2 PRIME render offloading with the master
> screen using this driver.
>
> Reported-by: Qiang Yu <[email protected]>
> Signed-off-by: Michel Dänzer <[email protected]>

Series is:
Reviewed-by: Alex Deucher <[email protected]>

> ---
>  src/amdgpu_glamor.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
> index 1159e29..53ba277 100644
> --- a/src/amdgpu_glamor.c
> +++ b/src/amdgpu_glamor.c
> @@ -328,10 +328,28 @@ amdgpu_glamor_share_pixmap_backing(PixmapPtr pixmap, 
> ScreenPtr slave,
>                                    void **handle_p)
>  {
>         ScreenPtr screen = pixmap->drawable.pScreen;
> +       uint64_t tiling_info;
>         CARD16 stride;
>         CARD32 size;
>         int fd;
>
> +       tiling_info = amdgpu_pixmap_get_tiling_info(pixmap);
> +       if (AMDGPU_TILING_GET(tiling_info, ARRAY_MODE) != 0) {
> +               PixmapPtr linear;
> +
> +               /* We don't want to re-allocate the screen pixmap as
> +                * linear, to avoid trouble with page flipping
> +                */
> +               if (screen->GetScreenPixmap(screen) == pixmap)
> +                       return FALSE;
> +
> +               linear = screen->CreatePixmap(screen, pixmap->drawable.width,
> +                                             pixmap->drawable.height,
> +                                             pixmap->drawable.depth,
> +                                             CREATE_PIXMAP_USAGE_SHARED);
> +               amdgpu_glamor_set_pixmap_bo(&pixmap->drawable, linear);
> +       }
> +
>         fd = glamor_fd_from_pixmap(screen, pixmap, &stride, &size);
>         if (fd < 0)
>                 return FALSE;
> --
> 2.8.1
>
> _______________________________________________
> xorg-driver-ati mailing list
> [email protected]
> https://lists.x.org/mailman/listinfo/xorg-driver-ati
_______________________________________________
xorg-driver-ati mailing list
[email protected]
https://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to