xf86-video-ati: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 6 22:59:00 UTC 2025
src/drmmode_display.c | 8 +++-----
src/radeon_dri2.c | 8 ++++----
src/radeon_exa_render.c | 10 +++++-----
src/radeon_exa_shared.c | 2 +-
src/radeon_glamor.c | 7 ++++---
src/radeon_kms.c | 2 +-
6 files changed, 18 insertions(+), 19 deletions(-)
New commits:
commit c610c037369500089baddd86aa3cf8046f3dc48b
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date: Tue Oct 1 16:06:16 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
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/-/merge_requests/28>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index a58f24dd..af598999 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -141,15 +141,13 @@ static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn,
return pixmap;
fail:
- pScreen->DestroyPixmap(pixmap);
+ dixDestroyPixmap(pixmap, 0);
return NULL;
}
static void drmmode_destroy_bo_pixmap(PixmapPtr pixmap)
{
- ScreenPtr pScreen = pixmap->drawable.pScreen;
-
- (*pScreen->DestroyPixmap)(pixmap);
+ dixDestroyPixmap(pixmap, 0);
}
static void
@@ -442,7 +440,7 @@ destroy_pixmap_for_fbcon(ScrnInfoPtr pScrn)
return;
if (info->fbcon_pixmap)
- pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap);
+ dixDestroyPixmap(info->fbcon_pixmap, 0);
info->fbcon_pixmap = NULL;
}
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index fba56e5d..114cf22e 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -273,7 +273,7 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen,
error:
free(buffers);
- (*pScreen->DestroyPixmap)(pixmap);
+ dixDestroyPixmap(pixmap, 0);
return NULL;
}
@@ -299,7 +299,7 @@ radeon_dri2_destroy_buffer2(ScreenPtr pScreen,
if (private->refcnt == 0)
{
if (private->pixmap)
- (*pScreen->DestroyPixmap)(private->pixmap);
+ dixDestroyPixmap(private->pixmap, 0);
free(buffers->driverPrivate);
free(buffers);
@@ -649,10 +649,10 @@ update_front(DrawablePtr draw, DRI2BufferPtr front)
if (!info->use_glamor)
exaMoveInPixmap(pixmap);
if (!radeon_get_flink_name(pRADEONEnt, pixmap, &front->name)) {
- (*draw->pScreen->DestroyPixmap)(pixmap);
+ dixDestroyPixmap(pixmap, 0);
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/radeon_exa_render.c b/src/radeon_exa_render.c
index a5f9612b..288e9dd1 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -615,7 +615,7 @@ static Bool R100PrepareComposite(int op,
pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
if (!pMask) {
if (!pSrcPicture->pDrawable)
- pScreen->DestroyPixmap(pSrc);
+ dixDestroyPixmap(pSrc, 0);
RADEON_FALLBACK(("Failed to create solid scratch pixmap\n"));
}
}
@@ -977,7 +977,7 @@ static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture,
pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
if (!pMask) {
if (!pSrcPicture->pDrawable)
- pScreen->DestroyPixmap(pSrc);
+ dixDestroyPixmap(pSrc, 0);
RADEON_FALLBACK(("Failed to create solid scratch pixmap\n"));
}
}
@@ -1469,7 +1469,7 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color));
if (!pMask) {
if (!pSrcPicture->pDrawable)
- pScreen->DestroyPixmap(pSrc);
+ dixDestroyPixmap(pSrc, 0);
RADEON_FALLBACK(("Failed to create solid scratch pixmap\n"));
}
}
@@ -2148,10 +2148,10 @@ static void RadeonDoneComposite(PixmapPtr pDst)
RadeonFinishComposite(pDst);
if (!accel_state->src_pic->pDrawable)
- pScreen->DestroyPixmap(accel_state->src_pix);
+ dixDestroyPixmap(accel_state->src_pix, 0);
if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable)
- pScreen->DestroyPixmap(accel_state->msk_pix);
+ dixDestroyPixmap(accel_state->msk_pix, 0);
}
#define VTX_OUT_MASK(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \
diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c
index 94238a5a..1378876b 100644
--- a/src/radeon_exa_shared.c
+++ b/src/radeon_exa_shared.c
@@ -132,7 +132,7 @@ PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid)
bo = radeon_get_pixmap_bo(pPix)->bo.radeon;
if (radeon_bo_map(bo, 1)) {
- pScreen->DestroyPixmap(pPix);
+ dixDestroyPixmap(pPix, 0);
return NULL;
}
diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index ccf99941..8ca413f7 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -199,7 +199,7 @@ static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap)
#ifndef HAVE_GLAMOR_EGL_DESTROY_TEXTURED_PIXMAP
ScreenPtr screen = pixmap->drawable.pScreen;
RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(screen));
- Bool ret;
+ Bool ret = TRUE;
#endif
if (pixmap->refcnt == 1) {
@@ -214,7 +214,8 @@ static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap)
return TRUE;
#else
screen->DestroyPixmap = info->glamor.SavedDestroyPixmap;
- ret = screen->DestroyPixmap(pixmap);
+ if (screen->DestroyPixmap(pixmap))
+ ret = screen->DestroyPixmap(pixmap);
info->glamor.SavedDestroyPixmap = screen->DestroyPixmap;
screen->DestroyPixmap = radeon_glamor_destroy_pixmap;
@@ -359,7 +360,7 @@ radeon_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/radeon_kms.c b/src/radeon_kms.c
index 51b00dd9..8b4d2dd8 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -209,7 +209,7 @@ static void RADEONFreeRec(ScrnInfoPtr pScrn)
info = RADEONPTR(pScrn);
if (info) {
if (info->fbcon_pixmap)
- pScrn->pScreen->DestroyPixmap(info->fbcon_pixmap);
+ dixDestroyPixmap(info->fbcon_pixmap, 0);
if (info->accel_state) {
free(info->accel_state);
More information about the xorg-commit
mailing list