Commit 5f58e974 authored by Daniel Vetter's avatar Daniel Vetter

drm/vmwgfx: Drop drm_vblank_cleanup

Again stopping the vblank before uninstalling the irq handler is kinda
the wrong way round, but the fb_off stuff should take care of
disabling the dsiplay at least in most cases. So drop the
drm_vblank_cleanup code since it's not really doing anything, it looks
all cargo-culted.

v2: Appease gcc better.

v3: Simplify code (Sean Paul)

Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170626161949.25629-1-daniel.vetter@ffwll.ch
parent 5cbdaccb
...@@ -1771,7 +1771,7 @@ int vmw_kms_init(struct vmw_private *dev_priv) ...@@ -1771,7 +1771,7 @@ int vmw_kms_init(struct vmw_private *dev_priv)
int vmw_kms_close(struct vmw_private *dev_priv) int vmw_kms_close(struct vmw_private *dev_priv)
{ {
int ret; int ret = 0;
/* /*
* Docs says we should take the lock before calling this function * Docs says we should take the lock before calling this function
...@@ -1779,11 +1779,7 @@ int vmw_kms_close(struct vmw_private *dev_priv) ...@@ -1779,11 +1779,7 @@ int vmw_kms_close(struct vmw_private *dev_priv)
* drm_encoder_cleanup which takes the lock we deadlock. * drm_encoder_cleanup which takes the lock we deadlock.
*/ */
drm_mode_config_cleanup(dev_priv->dev); drm_mode_config_cleanup(dev_priv->dev);
if (dev_priv->active_display_unit == vmw_du_screen_object) if (dev_priv->active_display_unit == vmw_du_legacy)
ret = vmw_kms_sou_close_display(dev_priv);
else if (dev_priv->active_display_unit == vmw_du_screen_target)
ret = vmw_kms_stdu_close_display(dev_priv);
else
ret = vmw_kms_ldu_close_display(dev_priv); ret = vmw_kms_ldu_close_display(dev_priv);
return ret; return ret;
......
...@@ -405,7 +405,6 @@ int vmw_kms_update_proxy(struct vmw_resource *res, ...@@ -405,7 +405,6 @@ int vmw_kms_update_proxy(struct vmw_resource *res,
* Screen Objects display functions - vmwgfx_scrn.c * Screen Objects display functions - vmwgfx_scrn.c
*/ */
int vmw_kms_sou_init_display(struct vmw_private *dev_priv); int vmw_kms_sou_init_display(struct vmw_private *dev_priv);
int vmw_kms_sou_close_display(struct vmw_private *dev_priv);
int vmw_kms_sou_do_surface_dirty(struct vmw_private *dev_priv, int vmw_kms_sou_do_surface_dirty(struct vmw_private *dev_priv,
struct vmw_framebuffer *framebuffer, struct vmw_framebuffer *framebuffer,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
...@@ -433,7 +432,6 @@ int vmw_kms_sou_readback(struct vmw_private *dev_priv, ...@@ -433,7 +432,6 @@ int vmw_kms_sou_readback(struct vmw_private *dev_priv,
* Screen Target Display Unit functions - vmwgfx_stdu.c * Screen Target Display Unit functions - vmwgfx_stdu.c
*/ */
int vmw_kms_stdu_init_display(struct vmw_private *dev_priv); int vmw_kms_stdu_init_display(struct vmw_private *dev_priv);
int vmw_kms_stdu_close_display(struct vmw_private *dev_priv);
int vmw_kms_stdu_surface_dirty(struct vmw_private *dev_priv, int vmw_kms_stdu_surface_dirty(struct vmw_private *dev_priv,
struct vmw_framebuffer *framebuffer, struct vmw_framebuffer *framebuffer,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
......
...@@ -582,13 +582,9 @@ int vmw_kms_ldu_init_display(struct vmw_private *dev_priv) ...@@ -582,13 +582,9 @@ int vmw_kms_ldu_init_display(struct vmw_private *dev_priv)
int vmw_kms_ldu_close_display(struct vmw_private *dev_priv) int vmw_kms_ldu_close_display(struct vmw_private *dev_priv)
{ {
struct drm_device *dev = dev_priv->dev;
if (!dev_priv->ldu_priv) if (!dev_priv->ldu_priv)
return -ENOSYS; return -ENOSYS;
drm_vblank_cleanup(dev);
BUG_ON(!list_empty(&dev_priv->ldu_priv->active)); BUG_ON(!list_empty(&dev_priv->ldu_priv->active));
kfree(dev_priv->ldu_priv); kfree(dev_priv->ldu_priv);
......
...@@ -746,15 +746,6 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv) ...@@ -746,15 +746,6 @@ int vmw_kms_sou_init_display(struct vmw_private *dev_priv)
return 0; return 0;
} }
int vmw_kms_sou_close_display(struct vmw_private *dev_priv)
{
struct drm_device *dev = dev_priv->dev;
drm_vblank_cleanup(dev);
return 0;
}
static int do_dmabuf_define_gmrfb(struct vmw_private *dev_priv, static int do_dmabuf_define_gmrfb(struct vmw_private *dev_priv,
struct vmw_framebuffer *framebuffer) struct vmw_framebuffer *framebuffer)
{ {
......
...@@ -1634,36 +1634,11 @@ int vmw_kms_stdu_init_display(struct vmw_private *dev_priv) ...@@ -1634,36 +1634,11 @@ int vmw_kms_stdu_init_display(struct vmw_private *dev_priv)
if (unlikely(ret != 0)) { if (unlikely(ret != 0)) {
DRM_ERROR("Failed to initialize STDU %d", i); DRM_ERROR("Failed to initialize STDU %d", i);
goto err_vblank_cleanup; return ret;
} }
} }
DRM_INFO("Screen Target Display device initialized\n"); DRM_INFO("Screen Target Display device initialized\n");
return 0;
err_vblank_cleanup:
drm_vblank_cleanup(dev);
return ret;
}
/**
* vmw_kms_stdu_close_display - Cleans up after vmw_kms_stdu_init_display
*
* @dev_priv: VMW DRM device
*
* Frees up any resources allocated by vmw_kms_stdu_init_display
*
* RETURNS:
* 0 on success
*/
int vmw_kms_stdu_close_display(struct vmw_private *dev_priv)
{
struct drm_device *dev = dev_priv->dev;
drm_vblank_cleanup(dev);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment