summaryrefslogtreecommitdiff
path: root/bsd
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-10 06:30:28 +0000
committerDave Airlie <airlied@linux.ie>2004-08-10 06:30:28 +0000
commitc9bcc4a6d90c0f2e9c712185a56727a55c11f4e0 (patch)
tree583fcc164c676b40f0fd63230d3965083a876859 /bsd
parent67eae63e8947e06d7ee42d7e23796b8597e23d83 (diff)
dump: DRIVER_CTX_[CD]TOR, HAVE_KERNEL_CTX_SWITCH, DRIVER_BUF_PRIV_T,
DRIVER_AGP_BUFFERS_MAP
Diffstat (limited to 'bsd')
-rw-r--r--bsd/drmP.h4
-rw-r--r--bsd/drm_context.h11
-rw-r--r--bsd/sis_drv.c3
3 files changed, 8 insertions, 10 deletions
diff --git a/bsd/drmP.h b/bsd/drmP.h
index 6ac30087..97168ec6 100644
--- a/bsd/drmP.h
+++ b/bsd/drmP.h
@@ -321,6 +321,10 @@ struct drm_driver_fn {
int (*dma_quiescent)(struct drm_device *);
int (*dma_flush_block_and_flush)(struct drm_device *, int context, drm_lock_flags_t flags);
int (*dma_flush_unblock)(struct drm_device *, int context, drm_lock_flags_t flags);
+ int (*context_ctor)(struct drm_device *dev, int context);
+ int (*context_dtor)(struct drm_device *dev, int context);
+ int (*kernel_context_switch)(struct drm_device *dev, int old, int new);
+ int (*kernel_context_switch_unlock)(struct drm_device *dev);
};
struct drm_device {
diff --git a/bsd/drm_context.h b/bsd/drm_context.h
index 3cb5992a..8988ee22 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(ctx.handle); /* XXX: also pass dev ? */
-#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,8 @@ 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
+ if (dev->fn_tbl.context_dtor)
+ dev->fn_tbl.context_dtor(dev, ctx.handle);
DRM(ctxbitmap_free)( dev, ctx.handle );
}
diff --git a/bsd/sis_drv.c b/bsd/sis_drv.c
index c63b8c56..2d40018e 100644
--- a/bsd/sis_drv.c
+++ b/bsd/sis_drv.c
@@ -51,6 +51,3 @@ DRIVER_MODULE(sisdrm, pci, sisdrv_driver, sisdrv_devclass, 0, 0);
CFDRIVER_DECL(sis, DV_TTY, NULL);
#endif /* __FreeBSD__ */
-void DRM(driver_register_fns)(drm_device_t *dev)
-{
-}