Commit aa74f068 authored by Sinclair Yeh's avatar Sinclair Yeh

drm/vmwgfx: Fixes to vmwgfx_fb

1.  When unsetting a mode, num_connector should be set to zero
2.  The pixel_format field needs to be initialized as newer DRM internal
    functions checks this field
3.  Take the drm_modeset_lock_all() because vmw_fb_kms_detach() can
    change current mode
Signed-off-by: default avatarSinclair Yeh <syeh@vmware.com>
Reviewed-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
parent c46a3064
...@@ -434,7 +434,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par, ...@@ -434,7 +434,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
set.y = 0; set.y = 0;
set.mode = NULL; set.mode = NULL;
set.fb = NULL; set.fb = NULL;
set.num_connectors = 1; set.num_connectors = 0;
set.connectors = &par->con; set.connectors = &par->con;
ret = drm_mode_set_config_internal(&set); ret = drm_mode_set_config_internal(&set);
if (ret) { if (ret) {
...@@ -822,7 +822,9 @@ int vmw_fb_off(struct vmw_private *vmw_priv) ...@@ -822,7 +822,9 @@ int vmw_fb_off(struct vmw_private *vmw_priv)
flush_delayed_work(&par->local_work); flush_delayed_work(&par->local_work);
mutex_lock(&par->bo_mutex); mutex_lock(&par->bo_mutex);
drm_modeset_lock_all(vmw_priv->dev);
(void) vmw_fb_kms_detach(par, true, false); (void) vmw_fb_kms_detach(par, true, false);
drm_modeset_unlock_all(vmw_priv->dev);
mutex_unlock(&par->bo_mutex); mutex_unlock(&par->bo_mutex);
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