Skip to content

Commit 354c8bb

Browse files
en4bzgregkh
authored andcommitted
drm/vmwgfx: Don't overwrite KMS surface dirty tracker
[ Upstream commit c6cb77c ] We were overwriting the surface's dirty tracker here causing a memory leak. Reported-by: Mika Penttilä <mpenttil@redhat.com> Closes: https://lore.kernel.org/dri-devel/8c53f3c6-c6de-46fe-a8ca-d98dd52b3abe@redhat.com/ Fixes: 9655441 ("drm/vmwgfx: Refactor cursor handling") Signed-off-by: Ian Forbes <ian.forbes@broadcom.com> Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com> Signed-off-by: Zack Rusin <zack.rusin@broadcom.com> Link: https://patch.msgid.link/20260302200330.66763-1-ian.forbes@broadcom.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8e28a01 commit 354c8bb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,8 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
771771
ret = vmw_bo_dirty_add(bo);
772772
if (!ret && surface && surface->res.func->dirty_alloc) {
773773
surface->res.coherent = true;
774-
ret = surface->res.func->dirty_alloc(&surface->res);
774+
if (surface->res.dirty == NULL)
775+
ret = surface->res.func->dirty_alloc(&surface->res);
775776
}
776777
ttm_bo_unreserve(&bo->tbo);
777778
}

0 commit comments

Comments
 (0)