patch-2.4.17 linux/drivers/char/drm/drm_context.h
Next file: linux/drivers/char/drm/sis.h
Previous file: linux/drivers/char/drm/drm.h
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Fri Dec 21 16:40:32 2001
- Orig file:
linux-2.4.16/drivers/char/drm/drm_context.h
- Orig date:
Thu Nov 22 19:46:37 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux-2.4.16/drivers/char/drm/drm_context.h linux/drivers/char/drm/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 @@
/* 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 @@
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 );
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)