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 <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-omap/-/merge_requests/9>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-09-30 19:55:28 +02:00
parent 40920d386c
commit f8be53a7ef
2 changed files with 4 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -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;
}
}