summaryrefslogtreecommitdiff
path: root/linux/drm_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drm_context.h')
-rw-r--r--linux/drm_context.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/linux/drm_context.h b/linux/drm_context.h
index 0cf34549..dd280e53 100644
--- a/linux/drm_context.h
+++ b/linux/drm_context.h
@@ -420,10 +420,13 @@ int DRM(addctx)( struct inode *inode, struct file *filp,
/* Should this return -EBUSY instead? */
return -ENOMEM;
}
-#ifdef DRIVER_CTX_CTOR
+
if ( ctx.handle != DRM_KERNEL_CONTEXT )
- DRIVER_CTX_CTOR(dev, ctx.handle);
-#endif
+ {
+ if (dev->fn_tbl.context_ctor)
+ dev->fn_tbl.context_ctor(dev, ctx.handle);
+ }
+
ctx_entry = DRM(alloc)( sizeof(*ctx_entry), DRM_MEM_CTXLIST );
if ( !ctx_entry ) {
DRM_DEBUG("out of memory\n");
@@ -555,9 +558,8 @@ int DRM(rmctx)( struct inode *inode, struct file *filp,
priv->remove_auth_on_close = 1;
}
if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
-#ifdef DRIVER_CTX_DTOR
- DRIVER_CTX_DTOR(dev, ctx.handle);
-#endif
+ if (dev->fn_tbl.context_ctor)
+ dev->fn_tbl.context_ctor(dev, ctx.handle);
DRM(ctxbitmap_free)( dev, ctx.handle );
}