diff options
-rw-r--r-- | linux-core/drm_dma.c | 19 | ||||
-rw-r--r-- | linux-core/drm_drv.c | 2 | ||||
-rw-r--r-- | linux/drm_dma.h | 19 | ||||
-rw-r--r-- | linux/drm_drv.h | 2 | ||||
-rw-r--r-- | linux/i810.h | 16 |
5 files changed, 41 insertions, 17 deletions
diff --git a/linux-core/drm_dma.c b/linux-core/drm_dma.c index 85fa1472..dce376f6 100644 --- a/linux-core/drm_dma.c +++ b/linux-core/drm_dma.c @@ -598,6 +598,25 @@ int DRM(control)( struct inode *inode, struct file *filp, } } +#else + +int DRM(control)( struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg ) +{ + drm_control_t ctl; + + if ( copy_from_user( &ctl, (drm_control_t *)arg, sizeof(ctl) ) ) + return -EFAULT; + + switch ( ctl.func ) { + case DRM_INST_HANDLER: + case DRM_UNINST_HANDLER: + return 0; + default: + return -EINVAL; + } +} + #endif /* __HAVE_DMA_IRQ */ #endif /* __HAVE_DMA */ diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 23568288..2ac32df0 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -187,10 +187,8 @@ static drm_ioctl_desc_t DRM(ioctls)[] = { /* The DRM_IOCTL_DMA ioctl should be defined by the driver. */ -#if __HAVE_DMA_IRQ [DRM_IOCTL_NR(DRM_IOCTL_CONTROL)] = { DRM(control), 1, 1 }, #endif -#endif #if __REALLY_HAVE_AGP [DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { DRM(agp_acquire), 1, 1 }, diff --git a/linux/drm_dma.h b/linux/drm_dma.h index 85fa1472..dce376f6 100644 --- a/linux/drm_dma.h +++ b/linux/drm_dma.h @@ -598,6 +598,25 @@ int DRM(control)( struct inode *inode, struct file *filp, } } +#else + +int DRM(control)( struct inode *inode, struct file *filp, + unsigned int cmd, unsigned long arg ) +{ + drm_control_t ctl; + + if ( copy_from_user( &ctl, (drm_control_t *)arg, sizeof(ctl) ) ) + return -EFAULT; + + switch ( ctl.func ) { + case DRM_INST_HANDLER: + case DRM_UNINST_HANDLER: + return 0; + default: + return -EINVAL; + } +} + #endif /* __HAVE_DMA_IRQ */ #endif /* __HAVE_DMA */ diff --git a/linux/drm_drv.h b/linux/drm_drv.h index 23568288..2ac32df0 100644 --- a/linux/drm_drv.h +++ b/linux/drm_drv.h @@ -187,10 +187,8 @@ static drm_ioctl_desc_t DRM(ioctls)[] = { /* The DRM_IOCTL_DMA ioctl should be defined by the driver. */ -#if __HAVE_DMA_IRQ [DRM_IOCTL_NR(DRM_IOCTL_CONTROL)] = { DRM(control), 1, 1 }, #endif -#endif #if __REALLY_HAVE_AGP [DRM_IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE)] = { DRM(agp_acquire), 1, 1 }, diff --git a/linux/i810.h b/linux/i810.h index 9460adb4..64309f59 100644 --- a/linux/i810.h +++ b/linux/i810.h @@ -60,20 +60,10 @@ i810_dma_quiescent( dev ); \ } while (0) -/* Don't need an irq any more, but this must be kept around for - * backwards compatibility. (Could override the core drm ioctls - * somehow to just return success, but this does the job). - * - * This is pretty hacky: the return's jump out of the drm core - * functions before the irq is allocated or deallocated. Noops might - * be cleaner. +/* Don't need an irq any more. The template code will make sure that + * a noop stub is generated for compatibility. */ -#define __HAVE_DMA_IRQ 1 -#define __HAVE_DMA_IRQ_BH 0 /* ??? */ -#define __HAVE_SHARED_IRQ 1 -#define DRIVER_PREINSTALL() return 0 -#define DRIVER_POSTINSTALL() return 0 -#define DRIVER_UNINSTALL() return 0 +#define __HAVE_DMA_IRQ 0 /* Buffer customization: */ |