From: Daniel Vetter Date: Sat, 25 Sep 2010 22:24:48 +0000 (+0200) Subject: drm: readd drm_lock_free in drm_unlock X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=45ff46c54a31bf8924b61e3e3411654410a3b5c3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm: readd drm_lock_free in drm_unlock I've accidently killed a little bit too much in commit 1da3f87ebb7edb3e0b829ec4bbe5fb3d9d93986f Author: Daniel Vetter Date: Mon Aug 23 22:53:24 2010 +0200 drm: kill kernel_context_switch callbacks Note to self: Next time also test with AIGLX disabled. Reported-and-Tested-by: Andy Furniss Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30374 Signed-off-by: Daniel Vetter Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c index 1e28b9072068..632ae243ede0 100644 --- a/drivers/gpu/drm/drm_lock.c +++ b/drivers/gpu/drm/drm_lock.c @@ -152,6 +152,7 @@ int drm_lock(struct drm_device *dev, void *data, struct drm_file *file_priv) int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_lock *lock = data; + struct drm_master *master = file_priv->master; if (lock->context == DRM_KERNEL_CONTEXT) { DRM_ERROR("Process %d using kernel context %d\n", @@ -161,6 +162,10 @@ int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); + if (drm_lock_free(&master->lock, lock->context)) { + /* FIXME: Should really bail out here. */ + } + unblock_all_signals(); return 0; }