Install dummy/noop read & poll fops unless the driver has replacements.
parent
23a76c3759
commit
e15b0b6a1b
|
@ -684,6 +684,8 @@ extern void DRM(vm_shm_close)(struct vm_area_struct *vma);
|
|||
extern int DRM(mmap_dma)(struct file *filp,
|
||||
struct vm_area_struct *vma);
|
||||
extern int DRM(mmap)(struct file *filp, struct vm_area_struct *vma);
|
||||
extern unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait);
|
||||
extern ssize_t DRM(read)(struct file *filp, char *buf, size_t count, loff_t *off);
|
||||
|
||||
/* Memory management support (drm_memory.h) */
|
||||
extern void DRM(mem_init)(void);
|
||||
|
|
|
@ -84,6 +84,12 @@
|
|||
#ifndef __HAVE_SG
|
||||
#define __HAVE_SG 0
|
||||
#endif
|
||||
#ifndef __HAVE_DRIVER_FOPS_READ
|
||||
#define __HAVE_DRIVER_FOPS_READ 0
|
||||
#endif
|
||||
#ifndef __HAVE_DRIVER_FOPS_POLL
|
||||
#define __HAVE_DRIVER_FOPS_POLL 0
|
||||
#endif
|
||||
|
||||
#ifndef DRIVER_PREINIT
|
||||
#define DRIVER_PREINIT()
|
||||
|
@ -119,6 +125,8 @@ static struct file_operations DRM(fops) = { \
|
|||
.ioctl = DRM(ioctl), \
|
||||
.mmap = DRM(mmap), \
|
||||
.fasync = DRM(fasync), \
|
||||
.poll = DRM(poll), \
|
||||
.read = DRM(read), \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -113,4 +113,17 @@ int DRM(fasync)(int fd, struct file *filp, int on)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if !__HAVE_DRIVER_FOPS_POLL
|
||||
unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if !__HAVE_DRIVER_FOPS_READ
|
||||
ssize_t DRM(read)(struct file *filp, char *buf, size_t count, loff_t *off)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -684,6 +684,8 @@ extern void DRM(vm_shm_close)(struct vm_area_struct *vma);
|
|||
extern int DRM(mmap_dma)(struct file *filp,
|
||||
struct vm_area_struct *vma);
|
||||
extern int DRM(mmap)(struct file *filp, struct vm_area_struct *vma);
|
||||
extern unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait);
|
||||
extern ssize_t DRM(read)(struct file *filp, char *buf, size_t count, loff_t *off);
|
||||
|
||||
/* Memory management support (drm_memory.h) */
|
||||
extern void DRM(mem_init)(void);
|
||||
|
|
|
@ -84,6 +84,12 @@
|
|||
#ifndef __HAVE_SG
|
||||
#define __HAVE_SG 0
|
||||
#endif
|
||||
#ifndef __HAVE_DRIVER_FOPS_READ
|
||||
#define __HAVE_DRIVER_FOPS_READ 0
|
||||
#endif
|
||||
#ifndef __HAVE_DRIVER_FOPS_POLL
|
||||
#define __HAVE_DRIVER_FOPS_POLL 0
|
||||
#endif
|
||||
|
||||
#ifndef DRIVER_PREINIT
|
||||
#define DRIVER_PREINIT()
|
||||
|
@ -119,6 +125,8 @@ static struct file_operations DRM(fops) = { \
|
|||
.ioctl = DRM(ioctl), \
|
||||
.mmap = DRM(mmap), \
|
||||
.fasync = DRM(fasync), \
|
||||
.poll = DRM(poll), \
|
||||
.read = DRM(read), \
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -113,4 +113,17 @@ int DRM(fasync)(int fd, struct file *filp, int on)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if !__HAVE_DRIVER_FOPS_POLL
|
||||
unsigned int DRM(poll)(struct file *filp, struct poll_table_struct *wait)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if !__HAVE_DRIVER_FOPS_READ
|
||||
ssize_t DRM(read)(struct file *filp, char *buf, size_t count, loff_t *off)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -71,6 +71,9 @@
|
|||
#define __HAVE_OLD_DMA 1
|
||||
#define __HAVE_PCI_DMA 1
|
||||
|
||||
#define __HAVE_DRIVER_FOPS_READ 1
|
||||
#define __HAVE_DRIVER_FOPS_POLL 1
|
||||
|
||||
#define __HAVE_MULTIPLE_DMA_QUEUES 1
|
||||
#define __HAVE_DMA_WAITQUEUE 1
|
||||
|
||||
|
@ -88,7 +91,7 @@
|
|||
#define __HAVE_DMA_QUIESCENT 1
|
||||
#define DRIVER_DMA_QUIESCENT() do { \
|
||||
/* FIXME ! */ \
|
||||
gamma_dma_quiescent_single(dev); \
|
||||
gamma_dma_quiescent_single(dev); \
|
||||
return 0; \
|
||||
} while (0)
|
||||
|
||||
|
@ -98,22 +101,5 @@
|
|||
#define DRIVER_AGP_BUFFERS_MAP( dev ) \
|
||||
((drm_gamma_private_t *)((dev)->dev_private))->buffers
|
||||
|
||||
/* Gamma makes use of a wierd mechanism to get the DDX driver to do
|
||||
* context switches on behalf of the 3d clients via a trip to the
|
||||
* kernel module. This requires read/poll functionality on the drm
|
||||
* file descriptor not normally present:
|
||||
*/
|
||||
#define DRIVER_FOPS \
|
||||
static struct file_operations DRM(fops) = { \
|
||||
.owner = THIS_MODULE, \
|
||||
.open = DRM(open), \
|
||||
.flush = DRM(flush), \
|
||||
.release = DRM(release), \
|
||||
.ioctl = DRM(ioctl), \
|
||||
.mmap = DRM(mmap), \
|
||||
.read = DRM(read), \
|
||||
.fasync = DRM(fasync), \
|
||||
.poll = DRM(poll), \
|
||||
}
|
||||
|
||||
#endif /* __GAMMA_H__ */
|
||||
|
|
Loading…
Reference in New Issue