drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful
authorDeepak Rawat <drawat@vmware.com>
Tue, 15 May 2018 13:39:09 +0000 (15:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:42 +0000 (07:52 +0200)
commitcd95b6e707122f33bcf85c39c8aedd356de10412
tree6ab77b379ee8f6b1042728cfc89377547ec63687
parent829484eb3e003a98a2973acbb90babd898e8ca96
drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful

commit 91ba9f28a3de97761c2b5fd5df5d88421268e507 upstream.

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: 20fb5a635a0c ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c