From 3c02be915232c06d60e715a40d302d509239f324 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 28 May 2018 09:57:43 +0200 Subject: [PATCH] 4.16-stable patches added patches: drm-vmwgfx-set-dmabuf_size-when-vmw_dmabuf_init-is-successful.patch --- ...e-when-vmw_dmabuf_init-is-successful.patch | 37 +++++++++++++++++++ queue-4.16/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 queue-4.16/drm-vmwgfx-set-dmabuf_size-when-vmw_dmabuf_init-is-successful.patch diff --git a/queue-4.16/drm-vmwgfx-set-dmabuf_size-when-vmw_dmabuf_init-is-successful.patch b/queue-4.16/drm-vmwgfx-set-dmabuf_size-when-vmw_dmabuf_init-is-successful.patch new file mode 100644 index 00000000000..1af7249fd9f --- /dev/null +++ b/queue-4.16/drm-vmwgfx-set-dmabuf_size-when-vmw_dmabuf_init-is-successful.patch @@ -0,0 +1,37 @@ +From 91ba9f28a3de97761c2b5fd5df5d88421268e507 Mon Sep 17 00:00:00 2001 +From: Deepak Rawat +Date: Tue, 15 May 2018 15:39:09 +0200 +Subject: drm/vmwgfx: Set dmabuf_size when vmw_dmabuf_init is successful + +From: Deepak Rawat + +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: # 4.14, 4.16 +Fixes: 20fb5a635a0c ("drm/vmwgfx: Unpin the screen object backup buffer when not used") +Signed-off-by: Deepak Rawat +Reviewed-by: Sinclair Yeh +Signed-off-by: Thomas Hellstrom +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +@@ -530,6 +530,8 @@ vmw_sou_primary_plane_prepare_fb(struct + return ret; + } + ++ vps->dmabuf_size = size; ++ + /* + * TTM already thinks the buffer is pinned, but make sure the + * pin_count is upped. diff --git a/queue-4.16/series b/queue-4.16/series index 6c3ace6a8c5..1b93ee80196 100644 --- a/queue-4.16/series +++ b/queue-4.16/series @@ -268,3 +268,4 @@ regulator-of-add-a-missing-of_node_put-in-an-error-handling-path-of-of_regulator pinctrl-msm-use-dynamic-gpio-numbering.patch pinctrl-mcp23s08-spi-fix-regmap-debugfs-entries.patch kdb-make-mdr-command-repeat.patch +drm-vmwgfx-set-dmabuf_size-when-vmw_dmabuf_init-is-successful.patch -- 2.47.3