drmp.h
来自「Linux Kernel 2.6.9 for OMAP1710」· C头文件 代码 · 共 994 行 · 第 1/3 页
H
994 行
cycles_t ctx_start; cycles_t lck_start; char buf[DRM_BSZ]; /**< Output buffer */ char *buf_rp; /**< Read pointer */ char *buf_wp; /**< Write pointer */ char *buf_end; /**< End pointer */ struct fasync_struct *buf_async;/**< Processes waiting for SIGIO */ wait_queue_head_t buf_readers; /**< Processes waiting to read */ wait_queue_head_t buf_writers; /**< Processes waiting to ctx switch */ drm_agp_head_t *agp; /**< AGP data */ struct pci_dev *pdev; /**< PCI device structure */ int pci_domain; /**< PCI bus domain number */ int pci_bus; /**< PCI bus number */ int pci_slot; /**< PCI slot number */ int pci_func; /**< PCI function number */#ifdef __alpha__#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,3) struct pci_controler *hose;#else struct pci_controller *hose;#endif#endif drm_sg_mem_t *sg; /**< Scatter gather memory */ unsigned long *ctx_bitmap; /**< context bitmap */ void *dev_private; /**< device private data */ drm_sigdata_t sigdata; /**< For block_all_signals */ sigset_t sigmask; struct drm_driver_fn fn_tbl; drm_local_map_t *agp_buffer_map; int dev_priv_size; u32 driver_features;} drm_device_t;static __inline__ int drm_core_check_feature(struct drm_device *dev, int feature){ return ((dev->driver_features & feature) ? 1 : 0);}#if __OS_HAS_AGPstatic inline int drm_core_has_AGP(struct drm_device *dev){ return drm_core_check_feature(dev, DRIVER_USE_AGP);}#else#define drm_core_has_AGP(dev) (0)#endif#if __OS_HAS_MTRRstatic inline int drm_core_has_MTRR(struct drm_device *dev){ return drm_core_check_feature(dev, DRIVER_USE_MTRR);}#else#define drm_core_has_MTRR(dev) (0)#endifextern void DRM(driver_register_fns)(struct drm_device *dev);/******************************************************************//** \name Internal function definitions *//*@{*/ /* Misc. support (drm_init.h) */extern int DRM(flags);extern void DRM(parse_options)( char *s );extern int DRM(cpu_valid)( void ); /* Driver support (drm_drv.h) */extern int DRM(version)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(open)(struct inode *inode, struct file *filp);extern int DRM(release)(struct inode *inode, struct file *filp);extern int DRM(ioctl)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(lock)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(unlock)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* Device support (drm_fops.h) */extern int DRM(open_helper)(struct inode *inode, struct file *filp, drm_device_t *dev);extern int DRM(flush)(struct file *filp);extern int DRM(fasync)(int fd, struct file *filp, int on); /* Mapping support (drm_vm.h) */extern void DRM(vm_open)(struct vm_area_struct *vma);extern void DRM(vm_close)(struct vm_area_struct *vma);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 __user *buf, size_t count, loff_t *off); /* Memory management support (drm_memory.h) */extern void DRM(mem_init)(void);extern int DRM(mem_info)(char *buf, char **start, off_t offset, int request, int *eof, void *data);extern void *DRM(alloc)(size_t size, int area);extern void *DRM(calloc)(size_t nmemb, size_t size, int area);extern void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area);extern void DRM(free)(void *pt, size_t size, int area);extern unsigned long DRM(alloc_pages)(int order, int area);extern void DRM(free_pages)(unsigned long address, int order, int area);extern void *DRM(ioremap)(unsigned long offset, unsigned long size, drm_device_t *dev);extern void *DRM(ioremap_nocache)(unsigned long offset, unsigned long size, drm_device_t *dev);extern void DRM(ioremapfree)(void *pt, unsigned long size, drm_device_t *dev);extern DRM_AGP_MEM *DRM(alloc_agp)(int pages, u32 type);extern int DRM(free_agp)(DRM_AGP_MEM *handle, int pages);extern int DRM(bind_agp)(DRM_AGP_MEM *handle, unsigned int start);extern int DRM(unbind_agp)(DRM_AGP_MEM *handle); /* Misc. IOCTL support (drm_ioctl.h) */extern int DRM(irq_by_busid)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(getunique)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(setunique)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(getmap)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(getclient)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(getstats)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(setversion)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* Context IOCTL support (drm_context.h) */extern int DRM(resctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(addctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(modctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(getctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(switchctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(newctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(rmctx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(context_switch)(drm_device_t *dev, int old, int new);extern int DRM(context_switch_complete)(drm_device_t *dev, int new);extern int DRM(ctxbitmap_init)( drm_device_t *dev );extern void DRM(ctxbitmap_cleanup)( drm_device_t *dev );extern int DRM(setsareactx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(getsareactx)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); /* Drawable IOCTL support (drm_drawable.h) */extern int DRM(adddraw)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(rmdraw)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* Authentication IOCTL support (drm_auth.h) */extern int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic);extern int DRM(remove_magic)(drm_device_t *dev, drm_magic_t magic);extern int DRM(getmagic)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(authmagic)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* Placeholder for ioctls past */extern int DRM(noop)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* Locking IOCTL support (drm_lock.h) */extern int DRM(lock_take)(__volatile__ unsigned int *lock, unsigned int context);extern int DRM(lock_transfer)(drm_device_t *dev, __volatile__ unsigned int *lock, unsigned int context);extern int DRM(lock_free)(drm_device_t *dev, __volatile__ unsigned int *lock, unsigned int context);extern int DRM(notifier)(void *priv); /* Buffer management support (drm_bufs.h) */extern int DRM(order)( unsigned long size );extern int DRM(addmap)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(rmmap)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(addbufs)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(infobufs)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(markbufs)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(freebufs)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(mapbufs)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg ); /* DMA support (drm_dma.h) */extern int DRM(dma_setup)(drm_device_t *dev);extern void DRM(dma_takedown)(drm_device_t *dev);extern void DRM(free_buffer)(drm_device_t *dev, drm_buf_t *buf);extern void DRM(reclaim_buffers)( struct file *filp ); /* IRQ support (drm_irq.h) */extern int DRM(control)( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg );extern int DRM(irq_install)( drm_device_t *dev );extern int DRM(irq_uninstall)( drm_device_t *dev );extern irqreturn_t DRM(irq_handler)( DRM_IRQ_ARGS );extern void DRM(driver_irq_preinstall)( drm_device_t *dev );extern void DRM(driver_irq_postinstall)( drm_device_t *dev );extern void DRM(driver_irq_uninstall)( drm_device_t *dev );extern int DRM(wait_vblank)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(vblank_wait)(drm_device_t *dev, unsigned int *vbl_seq);extern void DRM(vbl_send_signals)( drm_device_t *dev ); /* AGP/GART support (drm_agpsupport.h) */extern drm_agp_head_t *DRM(agp_init)(void);extern void DRM(agp_uninit)(void);extern int DRM(agp_acquire)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern void DRM(agp_do_release)(void);extern int DRM(agp_release)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(agp_enable)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(agp_info)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(agp_alloc)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(agp_free)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(agp_unbind)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(agp_bind)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern DRM_AGP_MEM *DRM(agp_allocate_memory)(size_t pages, u32 type);extern int DRM(agp_free_memory)(DRM_AGP_MEM *handle);extern int DRM(agp_bind_memory)(DRM_AGP_MEM *handle, off_t start);extern int DRM(agp_unbind_memory)(DRM_AGP_MEM *handle); /* Stub support (drm_stub.h) */int DRM(stub_register)(const char *name, struct file_operations *fops, drm_device_t *dev);int DRM(stub_unregister)(int minor); /* Proc support (drm_proc.h) */extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor, struct proc_dir_entry *root, struct proc_dir_entry **dev_root);extern int DRM(proc_cleanup)(int minor, struct proc_dir_entry *root, struct proc_dir_entry *dev_root); /* Scatter Gather Support (drm_scatter.h) */extern void DRM(sg_cleanup)(drm_sg_mem_t *entry);extern int DRM(sg_alloc)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);extern int DRM(sg_free)(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); /* ATI PCIGART support (ati_pcigart.h) */extern int DRM(ati_pcigart_init)(drm_device_t *dev, unsigned long *addr, dma_addr_t *bus_addr);extern int DRM(ati_pcigart_cleanup)(drm_device_t *dev, unsigned long addr, dma_addr_t bus_addr);/* Inline replacements for DRM_IOREMAP macros */static __inline__ void drm_core_ioremap(struct drm_map *map, struct drm_device *dev){ map->handle = DRM(ioremap)( map->offset, map->size, dev );}static __inline__ void drm_core_ioremap_nocache(struct drm_map *map, struct drm_device *dev){ map->handle = DRM(ioremap_nocache)(map->offset, map->size, dev);}static __inline__ void drm_core_ioremapfree(struct drm_map *map, struct drm_device *dev){ if ( map->handle && map->size ) DRM(ioremapfree)( map->handle, map->size, dev );}static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsigned long offset){ struct list_head *_list; list_for_each( _list, &dev->maplist->head ) { drm_map_list_t *_entry = list_entry( _list, drm_map_list_t, head ); if ( _entry->map && _entry->map->offset == offset ) { return _entry->map; } } return NULL;}static __inline__ void drm_core_dropmap(struct drm_map *map){}/*@}*/extern unsigned long DRM(core_get_map_ofs)(drm_map_t *map);extern unsigned long DRM(core_get_reg_ofs)(struct drm_device *dev);#endif /* __KERNEL__ */#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?