* Patch "drm/vmwgfx: Fix corner case screen target management" has been added to the 4.6-stable tree
@ 2016-07-24 23:56 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-07-24 23:56 UTC (permalink / raw)
To: thellstrom, gregkh, syeh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
drm/vmwgfx: Fix corner case screen target management
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-vmwgfx-fix-corner-case-screen-target-management.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From beca4cf55323147ca9c8a98de1871be6e4fe8f34 Mon Sep 17 00:00:00 2001
From: Thomas Hellstrom <thellstrom@vmware.com>
Date: Wed, 29 Jun 2016 13:37:35 -0700
Subject: drm/vmwgfx: Fix corner case screen target management
From: Thomas Hellstrom <thellstrom@vmware.com>
commit beca4cf55323147ca9c8a98de1871be6e4fe8f34 upstream.
When the surface backing a framebuffer doesn't match the framebuffer's
dimensions, the screen target code would test the framebuffer dimensions
rather than the surface dimensions when deciding whether to bind the
surface as a screen target directly. This causes a screen target -
surface dimension mismatch and a subsequent device error.
Fix this by testing against the surface dimension.
v2: Fix review comments by Sinclair Yeh.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -399,8 +399,10 @@ static int vmw_stdu_bind_fb(struct vmw_p
WARN_ON_ONCE(!stdu->defined);
- if (!vfb->dmabuf && new_fb->width == mode->hdisplay &&
- new_fb->height == mode->vdisplay)
+ new_vfbs = (vfb->dmabuf) ? NULL : vmw_framebuffer_to_vfbs(new_fb);
+
+ if (new_vfbs && new_vfbs->surface->base_size.width == mode->hdisplay &&
+ new_vfbs->surface->base_size.height == mode->vdisplay)
new_content_type = SAME_AS_DISPLAY;
else if (vfb->dmabuf)
new_content_type = SEPARATE_DMA;
@@ -444,7 +446,6 @@ static int vmw_stdu_bind_fb(struct vmw_p
content_srf.mip_levels[0] = 1;
content_srf.multisample_count = 0;
} else {
- new_vfbs = vmw_framebuffer_to_vfbs(new_fb);
content_srf = *new_vfbs->surface;
}
@@ -464,7 +465,6 @@ static int vmw_stdu_bind_fb(struct vmw_p
return ret;
}
} else if (new_content_type == SAME_AS_DISPLAY) {
- new_vfbs = vmw_framebuffer_to_vfbs(new_fb);
new_display_srf = vmw_surface_reference(new_vfbs->surface);
}
Patches currently in stable-queue which might be from thellstrom@vmware.com are
queue-4.6/drm-ttm-make-ttm_bo_mem_compat-available.patch
queue-4.6/drm-vmwgfx-delay-pinning-fbdev-framebuffer-until-after-mode-set.patch
queue-4.6/drm-vmwgfx-add-an-option-to-change-assumed-fb-bpp.patch
queue-4.6/drm-vmwgfx-fix-corner-case-screen-target-management.patch
queue-4.6/drm-vmwgfx-check-pin-count-before-attempting-to-move-a-buffer.patch
queue-4.6/drm-vmwgfx-work-around-mode-set-failure-in-2d-vms.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-25 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-24 23:56 Patch "drm/vmwgfx: Fix corner case screen target management" has been added to the 4.6-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).