[PATCH] drm: readd drm_lock_free in drm_unlock

Daniel Vetter daniel.vetter at ffwll.ch
Sat Sep 25 15:24:48 PDT 2010


I've accidently killed a little bit too much in

commit 1da3f87ebb7edb3e0b829ec4bbe5fb3d9d93986f
Author: Daniel Vetter <daniel.vetter at ffwll.ch>
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 <lists at andyfurniss.entadsl.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30374
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/drm_lock.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_lock.c b/drivers/gpu/drm/drm_lock.c
index 4b9007e..e5d228e 100644
--- a/drivers/gpu/drm/drm_lock.c
+++ b/drivers/gpu/drm/drm_lock.c
@@ -150,6 +150,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",
@@ -159,6 +160,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;
 }
-- 
1.7.1



More information about the dri-devel mailing list