[PATCH xf86-video-ati 6/6] glamor: Return NullPixmap on failure to create shareable pixmap

Alex Deucher alexdeucher at gmail.com
Tue Feb 16 14:56:43 UTC 2016


On Tue, Feb 16, 2016 at 3:29 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: jimqu <Jim.Qu at amd.com>
>
> If we were asked to create a shareable pixmap, it doesn't make sense
> to return a pixmap which isn't shareable. Doing so caused trouble down
> the line such as a crash with older versions of glamor when trying to
> use GLX pixmaps of bpp < 32 via DRI2.
>
> Signed-off-by: JimQu <jim.qu at amd.com>
> (ported from amdgpu commit 2fcb7dadd3c71cd405cbbaafc777697538ca9c29)
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/radeon_glamor.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
> index 6a12b33..cc2b1f2 100644
> --- a/src/radeon_glamor.c
> +++ b/src/radeon_glamor.c
> @@ -262,7 +262,9 @@ fallback_glamor:
>          */
>                 xf86DrvMsg(scrn->scrnIndex, X_WARNING,
>                            "Failed to create textured DRI2/PRIME pixmap.");
> -               return pixmap;
> +
> +               radeon_glamor_destroy_pixmap(pixmap);
> +               return NullPixmap;
>         }
>         /* Create textured pixmap failed means glamor failed to
>          * create a texture from current BO for some reasons. We turn
> --
> 2.7.0
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> https://lists.x.org/mailman/listinfo/xorg-driver-ati


More information about the xorg-driver-ati mailing list