Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abb295f3 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie
Browse files

vmwgfx: Fix fb VRAM pinning failure due to fragmentation



If the soon-to-be scanout buffer is partly covering the intended
VRAM region, move and pin will fail. In that case, just move it out
to system before attempting to move it in again.

Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f1a28ee2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -615,6 +615,11 @@ int vmw_dmabuf_to_start_of_vram(struct vmw_private *vmw_priv,
	if (unlikely(ret != 0))
		goto err_unlock;

	if (bo->mem.mem_type == TTM_PL_VRAM &&
	    bo->mem.mm_node->start < bo->num_pages)
		(void) ttm_bo_validate(bo, &vmw_sys_placement, false,
				       false, false);

	ret = ttm_bo_validate(bo, &ne_placement, false, false, false);

	/* Could probably bug on */