summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/drm_context.h
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2003-09-09 00:24:31 +0000
committeranholt <anholt@FreeBSD.org>2003-09-09 00:24:31 +0000
commit6b432655804f704cb7d1fa3e6317548be1cfc164 (patch)
treedcab6440d210d4a1026afdd0cbbd73f19c8c6dd3 /sys/dev/drm/drm_context.h
parent9eac29c0b915eec97e0a9539816cae19448bd20d (diff)
downloadFreeBSD-src-6b432655804f704cb7d1fa3e6317548be1cfc164.zip
FreeBSD-src-6b432655804f704cb7d1fa3e6317548be1cfc164.tar.gz
Merge from DRI CVS. Includes newly ported SiS 300/305/540/630/730 driver and
updates to allow system memory to be used for textures on PCI Radeons. Sponsored by: LinuxFund
Diffstat (limited to 'sys/dev/drm/drm_context.h')
-rw-r--r--sys/dev/drm/drm_context.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/drm/drm_context.h b/sys/dev/drm/drm_context.h
index 3cedfc8..2c8b780 100644
--- a/sys/dev/drm/drm_context.h
+++ b/sys/dev/drm/drm_context.h
@@ -283,6 +283,11 @@ int DRM(addctx)( DRM_IOCTL_ARGS )
return DRM_ERR(ENOMEM);
}
+#ifdef DRIVER_CTX_CTOR
+ if ( ctx.handle != DRM_KERNEL_CONTEXT )
+ DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */
+#endif
+
DRM_COPY_TO_USER_IOCTL( (drm_ctx_t *)data, ctx, sizeof(ctx) );
return 0;
@@ -341,6 +346,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(ctx.handle); /* XXX: also pass dev ? */
+#endif
DRM(ctxbitmap_free)( dev, ctx.handle );
}
OpenPOWER on IntegriCloud