diff options
author | Sinclair Yeh <syeh@vmware.com> | 2015-08-11 22:53:39 -0700 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2015-08-12 10:06:13 -0700 |
commit | 05c9501859c8bd80635d7299c384e2a8db7c0ce1 (patch) | |
tree | e47acf304f87b83a2fae3cbb0827e3399ab4ffd0 /drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |
parent | df45e9d410fc07ab816b006414f52ec4e2fbf2d7 (diff) | |
download | linux-05c9501859c8bd80635d7299c384e2a8db7c0ce1.tar.gz linux-05c9501859c8bd80635d7299c384e2a8db7c0ce1.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index bc4235f75f61..65e35654f0f2 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -915,6 +915,7 @@ static int vmw_driver_unload(struct drm_device *dev) drm_ht_remove(&dev_priv->ctx.res_ht); vfree(dev_priv->ctx.cmd_bounce); if (dev_priv->enable_fb) { + vmw_fb_off(dev_priv); vmw_fb_close(dev_priv); vmw_fifo_resource_dec(dev_priv); vmw_svga_disable(dev_priv); |