diff options
author | Rob Clark <robdclark@gmail.com> | 2014-10-30 13:39:04 -0400 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2014-10-31 04:44:35 -0400 |
commit | 21e88620aa21b48d4f62d29275e3e2944a5ea2b5 (patch) | |
tree | 4ea16fa234bc54398da1518c16028189176d4995 /drivers/gpu | |
parent | d34d4d8af8d24afe4e16128e4e7f5c5967c89027 (diff) |
drm/vmwgfx: fix lock breakage
After:
commit d059f652e73c35678d28d4cd09ab2cec89696af9
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Fri Jul 25 18:07:40 2014 +0200
drm: Handle legacy per-crtc locking with full acquire ctx
drm_mode_cursor_common() was switched to use drm_modeset_(un)lock_crtc()
which uses full aquire ctx. So dropping/reaquiring the lock via
drm_modeset_(un)lock() directly isn't the right thing to do, as lockdep
kindly points out.
The 'FIXME's about sorting out whether vmwgfx *really* needs to lock-all
for cursor updates still apply.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Tested-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index d2bc2b03d4c6..8fc1e38bbe44 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
@@ -187,7 +187,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | |||
187 | * can do this since the caller in the drm core doesn't check anything | 187 | * can do this since the caller in the drm core doesn't check anything |
188 | * which is protected by any looks. | 188 | * which is protected by any looks. |
189 | */ | 189 | */ |
190 | drm_modeset_unlock(&crtc->mutex); | 190 | drm_modeset_unlock_crtc(crtc); |
191 | drm_modeset_lock_all(dev_priv->dev); | 191 | drm_modeset_lock_all(dev_priv->dev); |
192 | 192 | ||
193 | /* A lot of the code assumes this */ | 193 | /* A lot of the code assumes this */ |
@@ -252,7 +252,7 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | |||
252 | ret = 0; | 252 | ret = 0; |
253 | out: | 253 | out: |
254 | drm_modeset_unlock_all(dev_priv->dev); | 254 | drm_modeset_unlock_all(dev_priv->dev); |
255 | drm_modeset_lock(&crtc->mutex, NULL); | 255 | drm_modeset_lock_crtc(crtc); |
256 | 256 | ||
257 | return ret; | 257 | return ret; |
258 | } | 258 | } |
@@ -273,7 +273,7 @@ int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) | |||
273 | * can do this since the caller in the drm core doesn't check anything | 273 | * can do this since the caller in the drm core doesn't check anything |
274 | * which is protected by any looks. | 274 | * which is protected by any looks. |
275 | */ | 275 | */ |
276 | drm_modeset_unlock(&crtc->mutex); | 276 | drm_modeset_unlock_crtc(crtc); |
277 | drm_modeset_lock_all(dev_priv->dev); | 277 | drm_modeset_lock_all(dev_priv->dev); |
278 | 278 | ||
279 | vmw_cursor_update_position(dev_priv, shown, | 279 | vmw_cursor_update_position(dev_priv, shown, |
@@ -281,7 +281,7 @@ int vmw_du_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) | |||
281 | du->cursor_y + du->hotspot_y); | 281 | du->cursor_y + du->hotspot_y); |
282 | 282 | ||
283 | drm_modeset_unlock_all(dev_priv->dev); | 283 | drm_modeset_unlock_all(dev_priv->dev); |
284 | drm_modeset_lock(&crtc->mutex, NULL); | 284 | drm_modeset_lock_crtc(crtc); |
285 | 285 | ||
286 | return 0; | 286 | return 0; |
287 | } | 287 | } |