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