]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/vmwgfx: Fix crash when unloading vmwgfx v2
authorSinclair Yeh <syeh@vmware.com>
Wed, 12 Aug 2015 05:53:39 +0000 (22:53 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 12 Aug 2015 17:06:13 +0000 (10:06 -0700)
commit05c9501859c8bd80635d7299c384e2a8db7c0ce1
treee47acf304f87b83a2fae3cbb0827e3399ab4ffd0
parentdf45e9d410fc07ab816b006414f52ec4e2fbf2d7
drm/vmwgfx: Fix crash when unloading vmwgfx v2

This patch fixes two issues.  One, when a surface is a proxy for a DMA
buffer, it holds an extra reference that needs to be cleared.

Two, when fbdev is enabled, we need to unpin the framebuffer before
unloading the driver.  This is done by a call to vmw_fb_off().

v2
Moved unreferencing surface to from vmw_framebuffer_surface_destroy()
to vmw_kms_new_framebuffer()

Added "struct vmw_framebuffer *vfb = NULL;" to silence a compiler
warning.

Removed error checking after calling vmw_surface/dmabuf_reference()

Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c