diff options
author | David Dawes <dawes@xfree86.org> | 2002-01-27 20:05:42 +0000 |
---|---|---|
committer | David Dawes <dawes@xfree86.org> | 2002-01-27 20:05:42 +0000 |
commit | 44aa4d6297874022a4f5a49ea24f2d052584d3dc (patch) | |
tree | a3b8646dd51527d2fb246dbc11a124f4fd60968a /linux/drm_context.h | |
parent | 14945ada16218e9f918c24e0d702979fae9b07f6 (diff) |
First pass merge of XFree86 4.2.0 import.X_4_2_0-20020128-merge
Diffstat (limited to 'linux/drm_context.h')
-rw-r--r-- | linux/drm_context.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/linux/drm_context.h b/linux/drm_context.h index 33d6112e..e155946d 100644 --- a/linux/drm_context.h +++ b/linux/drm_context.h @@ -27,6 +27,10 @@ * Authors: * Rickard E. (Rik) Faith <faith@valinux.com> * Gareth Hughes <gareth@valinux.com> + * ChangeLog: + * 2001-11-16 Torsten Duwe <duwe@caldera.de> + * added context constructor/destructor hooks, + * needed by SiS driver's memory management. */ #define __NO_VERSION__ @@ -316,6 +320,10 @@ 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(ctx.handle); /* XXX: also pass dev ? */ +#endif if ( copy_to_user( (drm_ctx_t *)arg, &ctx, sizeof(ctx) ) ) return -EFAULT; @@ -390,6 +398,9 @@ 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(ctx.handle); /* XXX: also pass dev ? */ +#endif DRM(ctxbitmap_free)( dev, ctx.handle ); } |