diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-12-10 15:47:28 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-12-10 15:50:22 -0800 |
commit | 9583c099b4a08b49e03f7b461c344b6d277fd262 (patch) | |
tree | e3c17d4b9ee2c2a063c3e30e0a650fc0c9b6cfa7 /linux-core/drm_context.c | |
parent | c34539e8bb5568b1d6059abf139dd08e07e84eea (diff) |
Revert "Merge branch 'modesetting-gem'"
This reverts commit 6656db10551bbb8770dd945b6d81d5138521f208.
We really just want the libdrm and ioctl bits, not all the driver
stuff.
Diffstat (limited to 'linux-core/drm_context.c')
-rw-r--r-- | linux-core/drm_context.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c index f3d69ff7..83ad291e 100644 --- a/linux-core/drm_context.c +++ b/linux-core/drm_context.c @@ -257,13 +257,12 @@ static int drm_context_switch(struct drm_device *dev, int old, int new) * hardware lock is held, clears the drm_device::context_flag and wakes up * drm_device::context_wait. */ -static int drm_context_switch_complete(struct drm_device *dev, - struct drm_file *file_priv, int new) +static int drm_context_switch_complete(struct drm_device *dev, int new) { dev->last_context = new; /* PRE/POST: This is the _only_ writer. */ dev->last_switch = jiffies; - if (!_DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock)) { + if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) { DRM_ERROR("Lock isn't held after context switch\n"); } @@ -422,7 +421,7 @@ int drm_newctx(struct drm_device *dev, void *data, struct drm_ctx *ctx = data; DRM_DEBUG("%d\n", ctx->handle); - drm_context_switch_complete(dev, file_priv, ctx->handle); + drm_context_switch_complete(dev, ctx->handle); return 0; } @@ -444,6 +443,9 @@ int drm_rmctx(struct drm_device *dev, void *data, struct drm_ctx *ctx = data; DRM_DEBUG("%d\n", ctx->handle); + if (ctx->handle == DRM_KERNEL_CONTEXT + 1) { + file_priv->remove_auth_on_close = 1; + } if (ctx->handle != DRM_KERNEL_CONTEXT) { if (dev->driver->context_dtor) dev->driver->context_dtor(dev, ctx->handle); |