summaryrefslogtreecommitdiff
path: root/bsd/drm_context.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-17 13:10:05 +0000
committerDave Airlie <airlied@linux.ie>2004-08-17 13:10:05 +0000
commit5c9ed8309493acb099463d25b32fabb5b7c004af (patch)
treeeec5be6f9374b5a2f61d52bd02ba0a44ba7e636d /bsd/drm_context.h
parent93e8c201afac565942f9d3523ac808d3220d6d0e (diff)
Merged drmfntbl-0-0-1drmfntbl-0-0-1-20040817-merge
Diffstat (limited to 'bsd/drm_context.h')
-rw-r--r--bsd/drm_context.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/bsd/drm_context.h b/bsd/drm_context.h
index a61b7788..aa655297 100644
--- a/bsd/drm_context.h
+++ b/bsd/drm_context.h
@@ -278,10 +278,8 @@ int DRM(addctx)( DRM_IOCTL_ARGS )
return DRM_ERR(ENOMEM);
}
-#ifdef DRIVER_CTX_CTOR
- if ( ctx.handle != DRM_KERNEL_CONTEXT )
- DRIVER_CTX_CTOR(dev, ctx.handle);
-#endif
+ if ( dev->fn_tbl.context_ctor && ctx.handle != DRM_KERNEL_CONTEXT )
+ dev->fn_tbl.context_ctor(dev, ctx.handle);
DRM_COPY_TO_USER_IOCTL( (drm_ctx_t *)data, ctx, sizeof(ctx) );
@@ -341,9 +339,9 @@ int DRM(rmctx)( DRM_IOCTL_ARGS )
DRM_DEBUG( "%d\n", ctx.handle );
if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
-#ifdef DRIVER_CTX_DTOR
- DRIVER_CTX_DTOR(dev, ctx.handle);
-#endif
+ if (dev->fn_tbl.context_dtor)
+ dev->fn_tbl.context_dtor(dev, ctx.handle);
+
DRM(ctxbitmap_free)( dev, ctx.handle );
}