Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vmwgfx: Fix vmw_du_get_cursor_mob fencing of newly-created MOBs

The fencing of MOB creation used in vmw_du_get_cursor_mob was incompatible
with register-based device communication employed by this routine. As a
result cursor MOB creation was racy, leading to potentially broken/missing
mouse cursor on desktops using CursorMob device feature.

Fixes: 53bc3f6fb6b3 ("drm/vmwgfx: Clean up cursor mobs")
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com>
Reviewed-by: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240126200804.732454-5-zack.rusin@broadcom.com

authored by

Martin Krastev and committed by
Zack Rusin
ed96cf7a 0c10a15d

+10 -1
+10 -1
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
··· 273 273 u32 size = vmw_du_cursor_mob_size(vps->base.crtc_w, vps->base.crtc_h); 274 274 u32 i; 275 275 u32 cursor_max_dim, mob_max_size; 276 + struct vmw_fence_obj *fence = NULL; 276 277 int ret; 277 278 278 279 if (!dev_priv->has_mob || ··· 315 314 if (ret != 0) 316 315 goto teardown; 317 316 318 - vmw_bo_fence_single(&vps->cursor.bo->tbo, NULL); 317 + ret = vmw_execbuf_fence_commands(NULL, dev_priv, &fence, NULL); 318 + if (ret != 0) { 319 + ttm_bo_unreserve(&vps->cursor.bo->tbo); 320 + goto teardown; 321 + } 322 + 323 + dma_fence_wait(&fence->base, false); 324 + dma_fence_put(&fence->base); 325 + 319 326 ttm_bo_unreserve(&vps->cursor.bo->tbo); 320 327 return 0; 321 328