summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsd-core/drm_context.c4
-rw-r--r--bsd/drm_context.h4
-rw-r--r--linux-core/drm_context.c4
-rw-r--r--linux/drm_context.h4
-rw-r--r--shared-core/sis_drv.h3
-rw-r--r--shared-core/sis_mm.c4
-rw-r--r--shared-core/via_drv.h4
-rw-r--r--shared-core/via_mm.c4
-rw-r--r--shared/sis.h3
-rw-r--r--shared/sis_drv.h3
-rw-r--r--shared/sis_mm.c4
-rw-r--r--shared/via.h3
-rw-r--r--shared/via_drv.h4
-rw-r--r--shared/via_mm.c4
14 files changed, 28 insertions, 24 deletions
diff --git a/bsd-core/drm_context.c b/bsd-core/drm_context.c
index 3cb5992a..a61b7788 100644
--- a/bsd-core/drm_context.c
+++ b/bsd-core/drm_context.c
@@ -280,7 +280,7 @@ int DRM(addctx)( DRM_IOCTL_ARGS )
#ifdef DRIVER_CTX_CTOR
if ( ctx.handle != DRM_KERNEL_CONTEXT )
- DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */
+ DRIVER_CTX_CTOR(dev, ctx.handle);
#endif
DRM_COPY_TO_USER_IOCTL( (drm_ctx_t *)data, ctx, sizeof(ctx) );
@@ -342,7 +342,7 @@ 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 ? */
+ DRIVER_CTX_DTOR(dev, ctx.handle);
#endif
DRM(ctxbitmap_free)( dev, ctx.handle );
}
diff --git a/bsd/drm_context.h b/bsd/drm_context.h
index 3cb5992a..a61b7788 100644
--- a/bsd/drm_context.h
+++ b/bsd/drm_context.h
@@ -280,7 +280,7 @@ int DRM(addctx)( DRM_IOCTL_ARGS )
#ifdef DRIVER_CTX_CTOR
if ( ctx.handle != DRM_KERNEL_CONTEXT )
- DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */
+ DRIVER_CTX_CTOR(dev, ctx.handle);
#endif
DRM_COPY_TO_USER_IOCTL( (drm_ctx_t *)data, ctx, sizeof(ctx) );
@@ -342,7 +342,7 @@ 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 ? */
+ DRIVER_CTX_DTOR(dev, ctx.handle);
#endif
DRM(ctxbitmap_free)( dev, ctx.handle );
}
diff --git a/linux-core/drm_context.c b/linux-core/drm_context.c
index 8795198a..0cf34549 100644
--- a/linux-core/drm_context.c
+++ b/linux-core/drm_context.c
@@ -422,7 +422,7 @@ int DRM(addctx)( struct inode *inode, struct file *filp,
}
#ifdef DRIVER_CTX_CTOR
if ( ctx.handle != DRM_KERNEL_CONTEXT )
- DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */
+ DRIVER_CTX_CTOR(dev, ctx.handle);
#endif
ctx_entry = DRM(alloc)( sizeof(*ctx_entry), DRM_MEM_CTXLIST );
if ( !ctx_entry ) {
@@ -556,7 +556,7 @@ int DRM(rmctx)( struct inode *inode, struct file *filp,
}
if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
#ifdef DRIVER_CTX_DTOR
- DRIVER_CTX_DTOR(ctx.handle); /* XXX: also pass dev ? */
+ DRIVER_CTX_DTOR(dev, ctx.handle);
#endif
DRM(ctxbitmap_free)( dev, ctx.handle );
}
diff --git a/linux/drm_context.h b/linux/drm_context.h
index 8795198a..0cf34549 100644
--- a/linux/drm_context.h
+++ b/linux/drm_context.h
@@ -422,7 +422,7 @@ int DRM(addctx)( struct inode *inode, struct file *filp,
}
#ifdef DRIVER_CTX_CTOR
if ( ctx.handle != DRM_KERNEL_CONTEXT )
- DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */
+ DRIVER_CTX_CTOR(dev, ctx.handle);
#endif
ctx_entry = DRM(alloc)( sizeof(*ctx_entry), DRM_MEM_CTXLIST );
if ( !ctx_entry ) {
@@ -556,7 +556,7 @@ int DRM(rmctx)( struct inode *inode, struct file *filp,
}
if ( ctx.handle != DRM_KERNEL_CONTEXT ) {
#ifdef DRIVER_CTX_DTOR
- DRIVER_CTX_DTOR(ctx.handle); /* XXX: also pass dev ? */
+ DRIVER_CTX_DTOR(dev, ctx.handle);
#endif
DRM(ctxbitmap_free)( dev, ctx.handle );
}
diff --git a/shared-core/sis_drv.h b/shared-core/sis_drv.h
index 40e7f463..814a7ae1 100644
--- a/shared-core/sis_drv.h
+++ b/shared-core/sis_drv.h
@@ -44,4 +44,7 @@ extern int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS );
extern int sis_ioctl_agp_free( DRM_IOCTL_ARGS );
extern int sis_fb_init( DRM_IOCTL_ARGS );
+extern int sis_init_context(drm_device_t *dev, int context);
+extern int sis_final_context(drm_device_t *dev, int context);
+
#endif
diff --git a/shared-core/sis_mm.c b/shared-core/sis_mm.c
index 9b6311a9..cbfab011 100644
--- a/shared-core/sis_mm.c
+++ b/shared-core/sis_mm.c
@@ -330,7 +330,7 @@ int sis_ioctl_agp_free( DRM_IOCTL_ARGS )
return 0;
}
-int sis_init_context(int context)
+int sis_init_context(drm_device_t *dev, int context)
{
int i;
@@ -362,7 +362,7 @@ int sis_init_context(int context)
return 1;
}
-int sis_final_context(int context)
+int sis_final_context(drm_device_t *dev, int context)
{
int i;
diff --git a/shared-core/via_drv.h b/shared-core/via_drv.h
index 1eafc95f..a0ed1e60 100644
--- a/shared-core/via_drv.h
+++ b/shared-core/via_drv.h
@@ -46,7 +46,9 @@ typedef struct drm_via_private {
#define VIA_READ8(reg) DRM_READ8(VIA_BASE, reg)
#define VIA_WRITE8(reg,val) DRM_WRITE8(VIA_BASE, reg, val)
-
+extern int via_init_context(drm_device_t *dev, int context);
+extern int via_final_context(drm_device_t *dev, int context);
+
extern int via_do_init_map(drm_device_t *dev, drm_via_init_t *init);
extern int via_do_cleanup_map(drm_device_t *dev);
extern int via_map_init(struct inode *inode, struct file *filp,
diff --git a/shared-core/via_mm.c b/shared-core/via_mm.c
index 1bf04fe0..dae5aaf0 100644
--- a/shared-core/via_mm.c
+++ b/shared-core/via_mm.c
@@ -103,7 +103,7 @@ int via_fb_init( DRM_IOCTL_ARGS )
return 0;
}
-int via_init_context(int context)
+int via_init_context(drm_device_t *dev, int context)
{
int i;
@@ -134,7 +134,7 @@ int via_init_context(int context)
return 1;
}
-int via_final_context(int context)
+int via_final_context(drm_device_t *dev, int context)
{
int i;
for (i=0; i<MAX_CONTEXT; i++)
diff --git a/shared/sis.h b/shared/sis.h
index c6315d72..df25429d 100644
--- a/shared/sis.h
+++ b/shared/sis.h
@@ -65,9 +65,6 @@
#define DRIVER_AGP_BUFFERS_MAP( dev ) \
((drm_sis_private_t *)((dev)->dev_private))->buffers
-extern int sis_init_context(int context);
-extern int sis_final_context(int context);
-
#define DRIVER_CTX_CTOR sis_init_context
#define DRIVER_CTX_DTOR sis_final_context
diff --git a/shared/sis_drv.h b/shared/sis_drv.h
index 40e7f463..814a7ae1 100644
--- a/shared/sis_drv.h
+++ b/shared/sis_drv.h
@@ -44,4 +44,7 @@ extern int sis_ioctl_agp_alloc( DRM_IOCTL_ARGS );
extern int sis_ioctl_agp_free( DRM_IOCTL_ARGS );
extern int sis_fb_init( DRM_IOCTL_ARGS );
+extern int sis_init_context(drm_device_t *dev, int context);
+extern int sis_final_context(drm_device_t *dev, int context);
+
#endif
diff --git a/shared/sis_mm.c b/shared/sis_mm.c
index 9b6311a9..cbfab011 100644
--- a/shared/sis_mm.c
+++ b/shared/sis_mm.c
@@ -330,7 +330,7 @@ int sis_ioctl_agp_free( DRM_IOCTL_ARGS )
return 0;
}
-int sis_init_context(int context)
+int sis_init_context(drm_device_t *dev, int context)
{
int i;
@@ -362,7 +362,7 @@ int sis_init_context(int context)
return 1;
}
-int sis_final_context(int context)
+int sis_final_context(drm_device_t *dev, int context)
{
int i;
diff --git a/shared/via.h b/shared/via.h
index 46ac6536..f49a9151 100644
--- a/shared/via.h
+++ b/shared/via.h
@@ -46,9 +46,6 @@
#define DRIVER_AGP_BUFFERS_MAP( dev ) \
((drm_via_private_t *)((dev)->dev_private))->buffers
-extern int via_init_context(int context);
-extern int via_final_context(int context);
-
#define DRIVER_CTX_CTOR via_init_context
#define DRIVER_CTX_DTOR via_final_context
diff --git a/shared/via_drv.h b/shared/via_drv.h
index 1eafc95f..a0ed1e60 100644
--- a/shared/via_drv.h
+++ b/shared/via_drv.h
@@ -46,7 +46,9 @@ typedef struct drm_via_private {
#define VIA_READ8(reg) DRM_READ8(VIA_BASE, reg)
#define VIA_WRITE8(reg,val) DRM_WRITE8(VIA_BASE, reg, val)
-
+extern int via_init_context(drm_device_t *dev, int context);
+extern int via_final_context(drm_device_t *dev, int context);
+
extern int via_do_init_map(drm_device_t *dev, drm_via_init_t *init);
extern int via_do_cleanup_map(drm_device_t *dev);
extern int via_map_init(struct inode *inode, struct file *filp,
diff --git a/shared/via_mm.c b/shared/via_mm.c
index 1bf04fe0..dae5aaf0 100644
--- a/shared/via_mm.c
+++ b/shared/via_mm.c
@@ -103,7 +103,7 @@ int via_fb_init( DRM_IOCTL_ARGS )
return 0;
}
-int via_init_context(int context)
+int via_init_context(drm_device_t *dev, int context)
{
int i;
@@ -134,7 +134,7 @@ int via_init_context(int context)
return 1;
}
-int via_final_context(int context)
+int via_final_context(drm_device_t *dev, int context)
{
int i;
for (i=0; i<MAX_CONTEXT; i++)