Re: [PATCH xf86-video-ati 2/2] glamor: Bail CreatePixmap on unsupported pixmap depth

2018-05-21 Thread Alex Deucher
On Fri, May 18, 2018 at 10:21 AM, Michel Dänzer  wrote:
> From: Michel Dänzer 
>
> Fixes crash in that case.
>
> Bugzilla: https://bugs.freedesktop.org/106293
> Signed-off-by: Michel Dänzer 

Series is:
Reviewed-by: Alex Deucher 

> ---
>  src/radeon_glamor.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
> index 7c09abba5..10d513ea9 100644
> --- a/src/radeon_glamor.c
> +++ b/src/radeon_glamor.c
> @@ -214,6 +214,9 @@ radeon_glamor_create_pixmap(ScreenPtr screen, int w, int 
> h, int depth,
> struct radeon_pixmap *priv;
> PixmapPtr pixmap, new_pixmap = NULL;
>
> +   if (!xf86GetPixFormat(scrn, depth))
> +   return NULL;
> +
> if (!RADEON_CREATE_PIXMAP_SHARED(usage)) {
> if (info->shadow_primary) {
> if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP)
> --
> 2.17.0
>
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH xf86-video-ati 2/2] glamor: Bail CreatePixmap on unsupported pixmap depth

2018-05-18 Thread Michel Dänzer
From: Michel Dänzer 

Fixes crash in that case.

Bugzilla: https://bugs.freedesktop.org/106293
Signed-off-by: Michel Dänzer 
---
 src/radeon_glamor.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 7c09abba5..10d513ea9 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -214,6 +214,9 @@ radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, 
int depth,
struct radeon_pixmap *priv;
PixmapPtr pixmap, new_pixmap = NULL;
 
+   if (!xf86GetPixFormat(scrn, depth))
+   return NULL;
+
if (!RADEON_CREATE_PIXMAP_SHARED(usage)) {
if (info->shadow_primary) {
if (usage != CREATE_PIXMAP_USAGE_BACKING_PIXMAP)
-- 
2.17.0

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx