aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-20 09:50:41 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-20 16:16:53 -0500
commitd5d2636ed7990b93c7216f6a4d323f6b0eee08af (patch)
tree497dec3a9bc20613069422e40aa8f8b40e389621 /drivers/staging
parentbbe4b99ff2443e305598768ae8eac6bc3516b7c9 (diff)
omapdrm: use modeset_lock_all
I've left the locking in the debugfs code as-is, it's essentially just used to keep the framebuffer object alive (which won't be necessary any more later on). We don't need fb refcounting either, since the new mode_config.fb_lock ensures that the framebuffers can't disappear (once mode_config.mutex doesn't guarantee this any more later on in the series). The fbcon restore needs all modeset locks. The crtc callbacks seem to only need the crtc locks, but I've quickly discussed things with Rob Clark and he's fine with just using modeset_lock_all for those, too. He'll look into converting things over later. Reviewed-by: Rob Clark <rob@ti.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/omapdrm/omap_crtc.c8
-rw-r--r--drivers/staging/omapdrm/omap_drv.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c
index 5c6ed6040eff..510942e67020 100644
--- a/drivers/staging/omapdrm/omap_crtc.c
+++ b/drivers/staging/omapdrm/omap_crtc.c
@@ -278,13 +278,13 @@ static void page_flip_worker(struct work_struct *work)
278 struct drm_display_mode *mode = &crtc->mode; 278 struct drm_display_mode *mode = &crtc->mode;
279 struct drm_gem_object *bo; 279 struct drm_gem_object *bo;
280 280
281 mutex_lock(&dev->mode_config.mutex); 281 drm_modeset_lock_all(dev);
282 omap_plane_mode_set(omap_crtc->plane, crtc, crtc->fb, 282 omap_plane_mode_set(omap_crtc->plane, crtc, crtc->fb,
283 0, 0, mode->hdisplay, mode->vdisplay, 283 0, 0, mode->hdisplay, mode->vdisplay,
284 crtc->x << 16, crtc->y << 16, 284 crtc->x << 16, crtc->y << 16,
285 mode->hdisplay << 16, mode->vdisplay << 16, 285 mode->hdisplay << 16, mode->vdisplay << 16,
286 vblank_cb, crtc); 286 vblank_cb, crtc);
287 mutex_unlock(&dev->mode_config.mutex); 287 drm_modeset_unlock_all(dev);
288 288
289 bo = omap_framebuffer_bo(crtc->fb, 0); 289 bo = omap_framebuffer_bo(crtc->fb, 0);
290 drm_gem_object_unreference_unlocked(bo); 290 drm_gem_object_unreference_unlocked(bo);
@@ -417,7 +417,7 @@ static void apply_worker(struct work_struct *work)
417 * the callbacks and list modification all serialized 417 * the callbacks and list modification all serialized
418 * with respect to modesetting ioctls from userspace. 418 * with respect to modesetting ioctls from userspace.
419 */ 419 */
420 mutex_lock(&dev->mode_config.mutex); 420 drm_modeset_lock_all(dev);
421 dispc_runtime_get(); 421 dispc_runtime_get();
422 422
423 /* 423 /*
@@ -462,7 +462,7 @@ static void apply_worker(struct work_struct *work)
462 462
463out: 463out:
464 dispc_runtime_put(); 464 dispc_runtime_put();
465 mutex_unlock(&dev->mode_config.mutex); 465 drm_modeset_unlock_all(dev);
466} 466}
467 467
468int omap_crtc_apply(struct drm_crtc *crtc, 468int omap_crtc_apply(struct drm_crtc *crtc,
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index ae5ecc2efbc7..dfdb4ba1e7c6 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -449,9 +449,9 @@ static void dev_lastclose(struct drm_device *dev)
449 } 449 }
450 } 450 }
451 451
452 mutex_lock(&dev->mode_config.mutex); 452 drm_modeset_lock_all(dev);
453 ret = drm_fb_helper_restore_fbdev_mode(priv->fbdev); 453 ret = drm_fb_helper_restore_fbdev_mode(priv->fbdev);
454 mutex_unlock(&dev->mode_config.mutex); 454 drm_modeset_unlock_all(dev);
455 if (ret) 455 if (ret)
456 DBG("failed to restore crtc mode"); 456 DBG("failed to restore crtc mode");
457} 457}