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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 24 17:28:28 UTC 2025


 .gitlab-ci.yml |   53 ++++++++---------------------------------------------
 1 file changed, 8 insertions(+), 45 deletions(-)

New commits:
commit 953a14f0103ef1d5ee19679213cf9d8d26487d70
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date:   Sat Jun 14 08:51:31 2025 -0700

    Revert "use dixDestroyPixmap() instead of direct driver call"
    
    This reverts commit 2cb59a92de4a19909682a35e4f31f3c02de2899f

diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index 074617b..bfc14f3 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -200,7 +200,7 @@ amdgpu_dri2_create_buffer2(ScreenPtr pScreen,
 
 error:
 	free(buffers);
-	dixDestroyPixmap(pixmap, 0);
+	(*pScreen->DestroyPixmap) (pixmap);
 	return NULL;
 }
 
@@ -224,7 +224,7 @@ amdgpu_dri2_destroy_buffer2(ScreenPtr pScreen,
 		private->refcnt--;
 		if (private->refcnt == 0) {
 			if (private->pixmap)
-				dixDestroyPixmap(private->pixmap, 0);
+				(*pScreen->DestroyPixmap) (private->pixmap);
 
 			free(buffers->driverPrivate);
 			free(buffers);
@@ -558,7 +558,7 @@ static Bool update_front(DrawablePtr draw, DRI2BufferPtr front)
 	if (!amdgpu_get_flink_name(pAMDGPUEnt, pixmap, &front->name))
 		return FALSE;
 
-	dixDestroyPixmap(priv->pixmap, 0);
+	(*draw->pScreen->DestroyPixmap) (priv->pixmap);
 	front->pitch = pixmap->devKind;
 	front->cpp = pixmap->drawable.bitsPerPixel / 8;
 	priv->pixmap = pixmap;
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 98e36f9..4ecc335 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -157,7 +157,7 @@ static Bool amdgpu_glamor_destroy_pixmap(PixmapPtr pixmap)
 #ifndef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP
 	ScreenPtr screen = pixmap->drawable.pScreen;
 	AMDGPUInfoPtr info = AMDGPUPTR(xf86ScreenToScrn(screen));
-	Bool ret = TRUE;
+	Bool ret;
 #endif
 
 	if (pixmap->refcnt == 1) {
@@ -179,8 +179,7 @@ static Bool amdgpu_glamor_destroy_pixmap(PixmapPtr pixmap)
 	return TRUE;
 #else
 	screen->DestroyPixmap = info->glamor.SavedDestroyPixmap;
-	if (screen->DestroyPixmap)
-		ret = screen->DestroyPixmap(pixmap);
+	ret = screen->DestroyPixmap(pixmap);
 	info->glamor.SavedDestroyPixmap = screen->DestroyPixmap;
 	screen->DestroyPixmap = amdgpu_glamor_destroy_pixmap;
 
@@ -338,7 +337,7 @@ amdgpu_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap)
 				   0, 0, pixmap->devKind, NULL);
 	old->devPrivate.ptr = NULL;
 
-	dixDestroyPixmap(pixmap, 0);
+	screen->DestroyPixmap(pixmap);
 
 	return old;
 }
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 03ce0ea..0b898b9 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -2338,7 +2338,8 @@ void AMDGPULeaveVT_KMS(ScrnInfoPtr pScrn)
 						}
 					}
 				}
-				dixDestroyPixmap(black_scanout, 0);
+
+				pScreen->DestroyPixmap(black_scanout);
 			}
 		}
 
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7a86909..b74b237 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -402,7 +402,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode,
 
 	if (!glamor_egl_create_textured_pixmap(pixmap, fbcon->handle,
 					       pixmap->devKind)) {
-		dixDestroyPixmap(pixmap, 0);
+		pScreen->DestroyPixmap(pixmap);
 		pixmap = NULL;
 	}
 
@@ -460,7 +460,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 	FreeScratchGC(gc);
 
 	pScreen->canDoBGNoneRoot = TRUE;
-	dixDestroyPixmap(src, 0);
+	pScreen->DestroyPixmap(src);
 #endif
 
 	return;
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 0d96dd8..462268f 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -240,7 +240,7 @@ drmmode_crtc_scanout_destroy(PixmapPtr *scanout)
 	if (!*scanout)
 		return;
 
-	dixDestroyPixmap(*scanout, 0);
+	(*scanout)->drawable.pScreen->DestroyPixmap(*scanout);
 	(*scanout) = NULL;
 }
 
commit 353b372ccbd338033cb4cd75841e60f88996e78e
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri May 10 14:51:39 2024 +0200

    ci: compactify redundant declarations via matrix
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8389500..8e560c7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -46,57 +46,20 @@ container-build:
   script:
   - ./autogen.sh
   - make -j$(nproc) check V=1
+  - make install V=1
+  - make -j$(nproc) distcheck
   variables:
     CFLAGS: "-pipe -g -O2 -Werror"
     ACLOCAL_PATH: /usr/local/xserver-$XSERVER_VERSION/share/aclocal
     PKG_CONFIG_PATH: /usr/local/xserver-$XSERVER_VERSION/lib/pkgconfig
 
-xserver-21.1:
-  extends: .default_build
-  script:
-  - ./autogen.sh
-  - make -j$(nproc) check V=1
-  - make install V=1
-  - make -j$(nproc) distcheck
-  variables:
-    XSERVER_VERSION: "21.1"
-
-xserver-21.1-clang:
-  extends: .default_build
-  variables:
-    CC: clang
-    XSERVER_VERSION: "21.1"
-
-xserver-1.20:
-  extends: .default_build
-  variables:
-    XSERVER_VERSION: "1.20"
-
-xserver-1.20-clang:
-  extends: .default_build
-  variables:
-    CC: clang
-    XSERVER_VERSION: "1.20"
-
-xserver-1.18:
+linux:
   extends: .default_build
-  script:
-  - ./autogen.sh --disable-glamor
-  - make -j$(nproc) check V=1
-  variables:
-    XSERVER_VERSION: "1.18"
-
-xserver-1.18-clang:
-  extends: xserver-1.18
-  variables:
-    CC: clang
-
-xserver-1.19:
-  extends: .default_build
-  variables:
-    XSERVER_VERSION: "1.19"
+  parallel:
+    matrix:
+      - XSERVER_VERSION: ["1.18", "1.19", "1.20", "21.1"]
 
-xserver-1.19-clang:
-  extends: xserver-1.19
+linux-clang:
+  extends: linux
   variables:
     CC: clang
commit 2cb59a92de4a19909682a35e4f31f3c02de2899f
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Oct 1 10:50:45 2024 +0200

    use dixDestroyPixmap() instead of direct driver call
    
    Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping
    jungle, so use the proper dix function instead - except when calling down the
    chain where we had wrapped ourselves - and protecting those against NULL, so
    we can move subsys-provided functions out of that chain.
    
    See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>

diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index bfc14f3..074617b 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -200,7 +200,7 @@ amdgpu_dri2_create_buffer2(ScreenPtr pScreen,
 
 error:
 	free(buffers);
-	(*pScreen->DestroyPixmap) (pixmap);
+	dixDestroyPixmap(pixmap, 0);
 	return NULL;
 }
 
@@ -224,7 +224,7 @@ amdgpu_dri2_destroy_buffer2(ScreenPtr pScreen,
 		private->refcnt--;
 		if (private->refcnt == 0) {
 			if (private->pixmap)
-				(*pScreen->DestroyPixmap) (private->pixmap);
+				dixDestroyPixmap(private->pixmap, 0);
 
 			free(buffers->driverPrivate);
 			free(buffers);
@@ -558,7 +558,7 @@ static Bool update_front(DrawablePtr draw, DRI2BufferPtr front)
 	if (!amdgpu_get_flink_name(pAMDGPUEnt, pixmap, &front->name))
 		return FALSE;
 
-	(*draw->pScreen->DestroyPixmap) (priv->pixmap);
+	dixDestroyPixmap(priv->pixmap, 0);
 	front->pitch = pixmap->devKind;
 	front->cpp = pixmap->drawable.bitsPerPixel / 8;
 	priv->pixmap = pixmap;
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index 4ecc335..98e36f9 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -157,7 +157,7 @@ static Bool amdgpu_glamor_destroy_pixmap(PixmapPtr pixmap)
 #ifndef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP
 	ScreenPtr screen = pixmap->drawable.pScreen;
 	AMDGPUInfoPtr info = AMDGPUPTR(xf86ScreenToScrn(screen));
-	Bool ret;
+	Bool ret = TRUE;
 #endif
 
 	if (pixmap->refcnt == 1) {
@@ -179,7 +179,8 @@ static Bool amdgpu_glamor_destroy_pixmap(PixmapPtr pixmap)
 	return TRUE;
 #else
 	screen->DestroyPixmap = info->glamor.SavedDestroyPixmap;
-	ret = screen->DestroyPixmap(pixmap);
+	if (screen->DestroyPixmap)
+		ret = screen->DestroyPixmap(pixmap);
 	info->glamor.SavedDestroyPixmap = screen->DestroyPixmap;
 	screen->DestroyPixmap = amdgpu_glamor_destroy_pixmap;
 
@@ -337,7 +338,7 @@ amdgpu_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap)
 				   0, 0, pixmap->devKind, NULL);
 	old->devPrivate.ptr = NULL;
 
-	screen->DestroyPixmap(pixmap);
+	dixDestroyPixmap(pixmap, 0);
 
 	return old;
 }
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 0b898b9..03ce0ea 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -2338,8 +2338,7 @@ void AMDGPULeaveVT_KMS(ScrnInfoPtr pScrn)
 						}
 					}
 				}
-
-				pScreen->DestroyPixmap(black_scanout);
+				dixDestroyPixmap(black_scanout, 0);
 			}
 		}
 
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b74b237..7a86909 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -402,7 +402,7 @@ create_pixmap_for_fbcon(drmmode_ptr drmmode,
 
 	if (!glamor_egl_create_textured_pixmap(pixmap, fbcon->handle,
 					       pixmap->devKind)) {
-		pScreen->DestroyPixmap(pixmap);
+		dixDestroyPixmap(pixmap, 0);
 		pixmap = NULL;
 	}
 
@@ -460,7 +460,7 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
 	FreeScratchGC(gc);
 
 	pScreen->canDoBGNoneRoot = TRUE;
-	pScreen->DestroyPixmap(src);
+	dixDestroyPixmap(src, 0);
 #endif
 
 	return;
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 462268f..0d96dd8 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -240,7 +240,7 @@ drmmode_crtc_scanout_destroy(PixmapPtr *scanout)
 	if (!*scanout)
 		return;
 
-	(*scanout)->drawable.pScreen->DestroyPixmap(*scanout);
+	dixDestroyPixmap(*scanout, 0);
 	(*scanout) = NULL;
 }
 


More information about the xorg-commit mailing list