[PATCH xf86-video-amdgpu 2/2] glamor: Handle ihandle == -1 in amdgpu_glamor_set_shared_pixmap_backing
Alex Deucher
alexdeucher at gmail.com
Thu Aug 30 03:07:45 UTC 2018
On Wed, Aug 29, 2018 at 11:39 AM Michel Dänzer <michel at daenzer.net> wrote:
>
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> (Ported from radeon commit de88ea2755611bdcb18d91d8234d2ab5be8ff2e9)
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Series is:
Acked-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/amdgpu_glamor.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
> index 13d68fe36..699861f73 100644
> --- a/src/amdgpu_glamor.c
> +++ b/src/amdgpu_glamor.c
> @@ -384,6 +384,7 @@ amdgpu_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle)
> {
> ScreenPtr screen = pixmap->drawable.pScreen;
> ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
> + int ihandle = (int)(long)handle;
> struct amdgpu_pixmap *priv;
>
> if (!amdgpu_set_shared_pixmap_backing(pixmap, handle))
> @@ -391,7 +392,8 @@ amdgpu_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle)
>
> priv = amdgpu_get_pixmap_private(pixmap);
>
> - if (!amdgpu_glamor_create_textured_pixmap(pixmap, priv->bo)) {
> + if (ihandle != -1 &&
> + !amdgpu_glamor_create_textured_pixmap(pixmap, priv->bo)) {
> xf86DrvMsg(scrn->scrnIndex, X_ERROR,
> "Failed to get PRIME drawable for glamor pixmap.\n");
> return FALSE;
> --
> 2.18.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list