Patch "drm/vmwgfx: Fix corner case screen target management" has been added to the 4.6-stable tree
Subsystems (4)
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 <[email protected]> know about it.
Quoted 1 line
From
beca4cf55323147ca9c8a98de1871be6e4fe8f34Mon Sep 17 00:00:00 2001
From: Thomas Hellstrom <[email protected]>
Date: Wed, 29 Jun 2016 13:37:35 -0700
Subject: drm/vmwgfx: Fix corner case screen target management
From: Thomas Hellstrom <[email protected]>
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.
--- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +4 -4
@@ -399,8 +399,10 @@ static int vmw_stdu_bind_fb(struct vmw_pWARN_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_preturn 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 [email protected] 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