diff options
author | anholt <anholt@FreeBSD.org> | 2005-11-28 23:13:57 +0000 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2005-11-28 23:13:57 +0000 |
commit | 3de8a0378fe9d46d02eec1b0054452fdcdee5327 (patch) | |
tree | 1cdf797deb33b0b51180c1ae0a987558664b1077 /sys/dev/drm/drm_context.c | |
parent | e6a12190f6e28e22e3376a0729d6dd9cee1982bc (diff) | |
download | FreeBSD-src-3de8a0378fe9d46d02eec1b0054452fdcdee5327.zip FreeBSD-src-3de8a0378fe9d46d02eec1b0054452fdcdee5327.tar.gz |
Update DRM to CVS snapshot as of 2005-11-28. Notable changes:
- S3 Savage driver ported.
- Added support for ATI_fragment_shader registers for r200.
- Improved r300 support, needed for latest r300 DRI driver.
- (possibly) r300 PCIE support, needs X.Org server from CVS.
- Added support for PCI Matrox cards.
- Software fallbacks fixed for Rage 128, which used to render badly or hang.
- Some issues reported by WITNESS are fixed.
- i915 module Makefile added, as the driver may now be working, but is untested.
- Added scripts for copying and preprocessing DRM CVS for inclusion in the
kernel. Thanks to Daniel Stone for getting me started on that.
Diffstat (limited to 'sys/dev/drm/drm_context.c')
-rw-r--r-- | sys/dev/drm/drm_context.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/drm/drm_context.c b/sys/dev/drm/drm_context.c index 7c02d92..cf5bc15 100644 --- a/sys/dev/drm/drm_context.c +++ b/sys/dev/drm/drm_context.c @@ -29,9 +29,11 @@ * Rickard E. (Rik) Faith <faith@valinux.com> * Gareth Hughes <gareth@valinux.com> * - * $FreeBSD$ */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #include "dev/drm/drmP.h" /* ================================================================ @@ -229,14 +231,17 @@ int drm_context_switch_complete(drm_device_t *dev, int new) int drm_resctx(DRM_IOCTL_ARGS) { drm_ctx_res_t res; + drm_ctx_t ctx; int i; DRM_COPY_FROM_USER_IOCTL( res, (drm_ctx_res_t *)data, sizeof(res) ); if ( res.count >= DRM_RESERVED_CONTEXTS ) { + bzero(&ctx, sizeof(ctx)); for ( i = 0 ; i < DRM_RESERVED_CONTEXTS ; i++ ) { + ctx.handle = i; if ( DRM_COPY_TO_USER( &res.contexts[i], - &i, sizeof(i) ) ) + &ctx, sizeof(ctx) ) ) return DRM_ERR(EFAULT); } } @@ -266,9 +271,9 @@ int drm_addctx(DRM_IOCTL_ARGS) return DRM_ERR(ENOMEM); } - if (dev->context_ctor && ctx.handle != DRM_KERNEL_CONTEXT) { + if (dev->driver.context_ctor && ctx.handle != DRM_KERNEL_CONTEXT) { DRM_LOCK(); - dev->context_ctor(dev, ctx.handle); + dev->driver.context_ctor(dev, ctx.handle); DRM_UNLOCK(); } @@ -330,9 +335,9 @@ int drm_rmctx(DRM_IOCTL_ARGS) DRM_DEBUG( "%d\n", ctx.handle ); if ( ctx.handle != DRM_KERNEL_CONTEXT ) { - if (dev->context_dtor) { + if (dev->driver.context_dtor) { DRM_LOCK(); - dev->context_dtor(dev, ctx.handle); + dev->driver.context_dtor(dev, ctx.handle); DRM_UNLOCK(); } |