Skip to contentSkip to conversation

drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful

PATCH New Thomas Hellstrom 1 participant 1 message May 16, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful

From: Deepak Rawat <[email protected]>

SOU primary plane prepare_fb hook depends upon dmabuf_size to pin up BO (and not call a new vmw_dmabuf_init) when a new fb size is same as current fb. This was changed in a recent commit which is causing page_flip to fail on VM with low display memory and multi-mon failure when cycle monitors from secondary display.

Cc <[email protected]> # 4.14, 4.16
Fixes 20fb5a635a0c ("drm/vmwgfx: Unpin the screen object backup buffer when not used")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +2 -0
index 648f8127f65a..3d667e903beb 100644
@@ -482,6 +482,8 @@ vmw_sou_primary_plane_prepare_fb(struct drm_plane *plane,
 		return ret;
 	}
 
+	vps->dmabuf_size = size;
+
 	/*
 	 * TTM already thinks the buffer is pinned, but make sure the
 	 * pin_count is upped.
Signature · 1 line
2.14.3