Commit c6cb77c4 authored by Ian Forbes's avatar Ian Forbes Committed by Zack Rusin
Browse files

drm/vmwgfx: Don't overwrite KMS surface dirty tracker



We were overwriting the surface's dirty tracker here causing a memory leak.

Reported-by: default avatarMika Penttilä <mpenttil@redhat.com>
Closes: https://lore.kernel.org/dri-devel/8c53f3c6-c6de-46fe-a8ca-d98dd52b3abe@redhat.com/


Fixes: 96554415 ("drm/vmwgfx: Refactor cursor handling")
Signed-off-by: default avatarIan Forbes <ian.forbes@broadcom.com>
Reviewed-by: default avatarMaaz Mombasawala <maaz.mombasawala@broadcom.com>
Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260302200330.66763-1-ian.forbes@broadcom.com
parent c7feff27
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -771,6 +771,7 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
		ret = vmw_bo_dirty_add(bo);
		if (!ret && surface && surface->res.func->dirty_alloc) {
			surface->res.coherent = true;
			if (surface->res.dirty == NULL)
				ret = surface->res.func->dirty_alloc(&surface->res);
		}
		ttm_bo_unreserve(&bo->tbo);