Skip to content

Commit

Permalink
drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful
Browse files Browse the repository at this point in the history
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: <stable@vger.kernel.org> # 4.14, 4.16
Fixes: 20fb5a6 ("drm/vmwgfx: Unpin the screen object backup buffer when not used")
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
  • Loading branch information
Deepak Rawat authored and Thomas Hellstrom committed May 16, 2018
1 parent 13f149d commit 91ba9f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 91ba9f2

Please sign in to comment.