summaryrefslogtreecommitdiff
path: root/linux-core/drm_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_context.c')
-rw-r--r--linux-core/drm_context.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c
index 83ad291e..febee9f7 100644
--- a/linux-core/drm_context.c
+++ b/linux-core/drm_context.c
@@ -257,12 +257,13 @@ 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, int new)
+static int drm_context_switch_complete(struct drm_device *dev,
+ struct drm_file *file_priv, int new)
{
dev->last_context = new; /* PRE/POST: This is the _only_ writer. */
dev->last_switch = jiffies;
- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
+ if (!_DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock)) {
DRM_ERROR("Lock isn't held after context switch\n");
}
@@ -421,7 +422,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, ctx->handle);
+ drm_context_switch_complete(dev, file_priv, ctx->handle);
return 0;
}