aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_lock.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-09-25 18:24:48 -0400
committerDave Airlie <airlied@redhat.com>2010-09-25 23:35:49 -0400
commit45ff46c54a31bf8924b61e3e3411654410a3b5c3 (patch)
treed428a95421862f8f1917f7a15e9cd78af4e1a60e /drivers/gpu/drm/drm_lock.c
parent4a445f291ac3faa08f56eaeb6e44856b6b72b74c (diff)
drm: readd drm_lock_free in drm_unlock
I've accidently killed a little bit too much in commit 1da3f87ebb7edb3e0b829ec4bbe5fb3d9d93986f Author: Daniel Vetter <daniel.vetter@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@andyfurniss.entadsl.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30374 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_lock.c')
-rw-r--r--drivers/gpu/drm/drm_lock.c5
1 files changed, 5 insertions, 0 deletions
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)
152int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) 152int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv)
153{ 153{
154 struct drm_lock *lock = data; 154 struct drm_lock *lock = data;
155 struct drm_master *master = file_priv->master;
155 156
156 if (lock->context == DRM_KERNEL_CONTEXT) { 157 if (lock->context == DRM_KERNEL_CONTEXT) {
157 DRM_ERROR("Process %d using kernel context %d\n", 158 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)
161 162
162 atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); 163 atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]);
163 164
165 if (drm_lock_free(&master->lock, lock->context)) {
166 /* FIXME: Should really bail out here. */
167 }
168
164 unblock_all_signals(); 169 unblock_all_signals();
165 return 0; 170 return 0;
166} 171}