From f8be53a7ef688db08d3592e1c6894def021bef82 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 30 Sep 2024 19:55:28 +0200 Subject: [PATCH] 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. See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- src/omap_dri2.c | 6 ++---- src/omap_xv.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/omap_dri2.c b/src/omap_dri2.c index a81e3c9..a2a9f7f 100644 --- a/src/omap_dri2.c +++ b/src/omap_dri2.c @@ -258,10 +258,8 @@ OMAPDRI2CreateBuffer(DrawablePtr pDraw, unsigned int attachment, PixmapPtr pNewPix = createpix(pDraw, TRUE); // TODO copy contents.. - OMAPPixmapExchange(pPixmap, pNewPix); - - pScreen->DestroyPixmap(pNewPix); + dixDestroyPixmap(pNewPix, 0); } pPixmap->refcnt++; @@ -320,7 +318,7 @@ OMAPDRI2DestroyBuffer(DrawablePtr pDraw, DRI2BufferPtr buffer) if (buffer->attachment == DRI2BufferFrontLeft && buf->pPixmap->refcnt) buf->pPixmap->refcnt--; else - pScreen->DestroyPixmap(buf->pPixmap); + dixDestroyPixmap(buf->pPixmap, 0); free(buf); } diff --git a/src/omap_xv.c b/src/omap_xv.c index b1b9c1f..15d7280 100644 --- a/src/omap_xv.c +++ b/src/omap_xv.c @@ -78,7 +78,7 @@ setupplane(ScreenPtr pScreen, PixmapPtr pSrcPix, int width, int height, if (pSrcPix && ((pSrcPix->drawable.height != height) || (pSrcPix->drawable.width != width))) { - pScreen->DestroyPixmap(pSrcPix); + dixDestroyPixmap(pSrcPix, 0); pSrcPix = NULL; } @@ -110,7 +110,7 @@ freebufs(ScreenPtr pScreen, OMAPPortPrivPtr pPriv) int i; for (i = 0; i < ARRAY_SIZE(pPriv->pSrcPix); i++) { if (pPriv->pSrcPix[i]) - pScreen->DestroyPixmap(pPriv->pSrcPix[i]); + dixDestroyPixmap(pPriv->pSrcPix[i], 0); pPriv->pSrcPix[i] = NULL; } }