diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2011-10-17 13:59:43 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-18 12:39:01 +0400 |
commit | 60a16a30d97e8acc9bfed5f4bd1dd03e21a479ea (patch) | |
tree | 39731fbd2536bd8f5444b2ba9750c9eb51ce1b1c /drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | |
parent | b07759bf41d52aaecd5de92c7d725d6834b23349 (diff) | |
download | linux-60a16a30d97e8acc9bfed5f4bd1dd03e21a479ea.tar.xz |
vmwgfx: Fix display system init & close functions
Make sure we null the display private, make sure we catch and
handle vblank failing to init and don't call vblank_cleanup if
we haven't initialized the display system.
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index 347e40699443..319516f4ace2 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c @@ -545,6 +545,7 @@ err_vblank_cleanup: drm_vblank_cleanup(dev); err_free: kfree(dev_priv->sou_priv); + dev_priv->sou_priv = NULL; err_no_mem: return ret; } @@ -553,10 +554,11 @@ int vmw_kms_close_screen_object_display(struct vmw_private *dev_priv) { struct drm_device *dev = dev_priv->dev; - drm_vblank_cleanup(dev); if (!dev_priv->sou_priv) return -ENOSYS; + drm_vblank_cleanup(dev); + if (!list_empty(&dev_priv->sou_priv->active)) DRM_ERROR("Still have active outputs when unloading driver"); |