xf86-video-amdgpu: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 18 17:09:36 UTC 2020


 src/amdgpu_bo_helper.c |    8 +++++---
 src/amdgpu_pixmap.h    |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit cb27a5b1120266e4baaa3eb784ff041977ded43f
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Fri Nov 29 16:37:32 2019 +0100

    Handle NULL fb_ptr in pixmap_get_fb
    
    This can happen when HW acceleration is disabled.
    
    Fixes https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/issues/188
    (ported from radeon commit 4d84cf438e7f1bebf0053035ef0292e9fed257d1)
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/amdgpu_pixmap.h b/src/amdgpu_pixmap.h
index 94ec210..663d414 100644
--- a/src/amdgpu_pixmap.h
+++ b/src/amdgpu_pixmap.h
@@ -162,7 +162,7 @@ amdgpu_pixmap_get_fb(PixmapPtr pix)
 					   handle);
 	}
 
-	return *fb_ptr;
+	return fb_ptr ? *fb_ptr : NULL;
 }
 
 enum {
commit e2cd67abb4aa8b5c942b46dd66dac091b9fad7ad
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Mon Mar 16 17:43:54 2020 +0100

    Bail from amdgpu_pixmap_get_handle with ShadowFB
    
    There's no pixmap private in that case. The callers handle this
    gracefully.
    
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index 6f7d6df..3f62214 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -185,13 +185,15 @@ uint64_t amdgpu_pixmap_get_tiling_info(PixmapPtr pixmap)
 
 Bool amdgpu_pixmap_get_handle(PixmapPtr pixmap, uint32_t *handle)
 {
-#ifdef USE_GLAMOR
 	ScreenPtr screen = pixmap->drawable.pScreen;
 	ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
 	AMDGPUInfoPtr info = AMDGPUPTR(scrn);
-#endif
-	struct amdgpu_pixmap *priv = amdgpu_get_pixmap_private(pixmap);
+	struct amdgpu_pixmap *priv;
+
+	if (info->shadow_fb)
+		return FALSE;
 
+	priv = amdgpu_get_pixmap_private(pixmap);
 	if (!priv) {
 		priv = calloc(1, sizeof(*priv));
 		amdgpu_set_pixmap_private(pixmap, priv);


More information about the xorg-commit mailing list