⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drmp.h

📁 linux-2.6.15.6
💻 H
📖 第 1 页 / 共 3 页
字号:
	wait_queue_head_t waiting;     /**< Processes waiting on free bufs */	int low_mark;		       /**< Low water mark */	int high_mark;		       /**< High water mark */	atomic_t wfh;		       /**< If waiting for high mark */	spinlock_t lock;} drm_freelist_t;/** * Buffer entry.  There is one of this for each buffer size order. */typedef struct drm_buf_entry {	int buf_size;			/**< size */	int buf_count;			/**< number of buffers */	drm_buf_t *buflist;		/**< buffer list */	int seg_count;	int page_order;	unsigned long *seglist;	drm_freelist_t freelist;} drm_buf_entry_t;/** File private data */typedef struct drm_file {	int authenticated;	int minor;	pid_t pid;	uid_t uid;	drm_magic_t magic;	unsigned long ioctl_count;	struct drm_file *next;	struct drm_file *prev;	struct drm_head *head;	int remove_auth_on_close;	unsigned long lock_count;	void *driver_priv;} drm_file_t;/** Wait queue */typedef struct drm_queue {	atomic_t use_count;		/**< Outstanding uses (+1) */	atomic_t finalization;		/**< Finalization in progress */	atomic_t block_count;		/**< Count of processes waiting */	atomic_t block_read;		/**< Queue blocked for reads */	wait_queue_head_t read_queue;	/**< Processes waiting on block_read */	atomic_t block_write;		/**< Queue blocked for writes */	wait_queue_head_t write_queue;	/**< Processes waiting on block_write */#if 1	atomic_t total_queued;		/**< Total queued statistic */	atomic_t total_flushed;		/**< Total flushes statistic */	atomic_t total_locks;		/**< Total locks statistics */#endif	drm_ctx_flags_t flags;		/**< Context preserving and 2D-only */	drm_waitlist_t waitlist;	/**< Pending buffers */	wait_queue_head_t flush_queue;	/**< Processes waiting until flush */} drm_queue_t;/** * Lock data. */typedef struct drm_lock_data {	drm_hw_lock_t *hw_lock;		/**< Hardware lock */	struct file *filp;		/**< File descr of lock holder (0=kernel) */	wait_queue_head_t lock_queue;	/**< Queue of blocked processes */	unsigned long lock_time;	/**< Time of last lock in jiffies */} drm_lock_data_t;/** * DMA data. */typedef struct drm_device_dma {	drm_buf_entry_t bufs[DRM_MAX_ORDER + 1];	/**< buffers, grouped by their size order */	int buf_count;			/**< total number of buffers */	drm_buf_t **buflist;		/**< Vector of pointers into drm_device_dma::bufs */	int seg_count;	int page_count;			/**< number of pages */	unsigned long *pagelist;	/**< page list */	unsigned long byte_count;	enum {		_DRM_DMA_USE_AGP = 0x01,		_DRM_DMA_USE_SG = 0x02,		_DRM_DMA_USE_FB = 0x04	} flags;} drm_device_dma_t;/** * AGP memory entry.  Stored as a doubly linked list. */typedef struct drm_agp_mem {	unsigned long handle;		/**< handle */	DRM_AGP_MEM *memory;	unsigned long bound;		/**< address */	int pages;	struct drm_agp_mem *prev;	/**< previous entry */	struct drm_agp_mem *next;	/**< next entry */} drm_agp_mem_t;/** * AGP data. * * \sa drm_agp_init() and drm_device::agp. */typedef struct drm_agp_head {	DRM_AGP_KERN agp_info;		/**< AGP device information */	drm_agp_mem_t *memory;		/**< memory entries */	unsigned long mode;		/**< AGP mode */	struct agp_bridge_data *bridge;	int enabled;			/**< whether the AGP bus as been enabled */	int acquired;			/**< whether the AGP device has been acquired */	unsigned long base;	int agp_mtrr;	int cant_use_aperture;	unsigned long page_mask;} drm_agp_head_t;/** * Scatter-gather memory. */typedef struct drm_sg_mem {	unsigned long handle;	void *virtual;	int pages;	struct page **pagelist;	dma_addr_t *busaddr;} drm_sg_mem_t;typedef struct drm_sigdata {	int context;	drm_hw_lock_t *lock;} drm_sigdata_t;typedef struct drm_dma_handle {	dma_addr_t busaddr;	void *vaddr;	size_t size;} drm_dma_handle_t;/** * Mappings list */typedef struct drm_map_list {	struct list_head head;		/**< list head */	drm_map_t *map;			/**< mapping */	unsigned int user_token;} drm_map_list_t;typedef drm_map_t drm_local_map_t;/** * Context handle list */typedef struct drm_ctx_list {	struct list_head head;		/**< list head */	drm_context_t handle;		/**< context handle */	drm_file_t *tag;		/**< associated fd private data */} drm_ctx_list_t;typedef struct drm_vbl_sig {	struct list_head head;	unsigned int sequence;	struct siginfo info;	struct task_struct *task;} drm_vbl_sig_t;/* location of GART table */#define DRM_ATI_GART_MAIN 1#define DRM_ATI_GART_FB   2typedef struct ati_pcigart_info {	int gart_table_location;	int is_pcie;	unsigned long addr;	dma_addr_t bus_addr;} drm_ati_pcigart_info;/** * DRM driver structure. This structure represent the common code for * a family of cards. There will one drm_device for each card present * in this family */struct drm_device;struct drm_driver {	int (*preinit) (struct drm_device *, unsigned long flags);	void (*prerelease) (struct drm_device *, struct file * filp);	void (*pretakedown) (struct drm_device *);	int (*postcleanup) (struct drm_device *);	int (*presetup) (struct drm_device *);	int (*postsetup) (struct drm_device *);	int (*dma_ioctl) (DRM_IOCTL_ARGS);	int (*open_helper) (struct drm_device *, drm_file_t *);	void (*free_filp_priv) (struct drm_device *, drm_file_t *);	void (*release) (struct drm_device *, struct file * filp);	void (*dma_ready) (struct drm_device *);	int (*dma_quiescent) (struct drm_device *);	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);	void (*kernel_context_switch_unlock) (struct drm_device * dev,					      drm_lock_t * lock);	int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence);	/**	 * Called by \c drm_device_is_agp.  Typically used to determine if a	 * card is really attached to AGP or not.	 *	 * \param dev  DRM device handle	 *	 * \returns	 * One of three values is returned depending on whether or not the	 * card is absolutely \b not AGP (return of 0), absolutely \b is AGP	 * (return of 1), or may or may not be AGP (return of 2).	 */	int (*device_is_agp) (struct drm_device * dev);	/* these have to be filled in */	int (*postinit) (struct drm_device *, unsigned long flags);	 irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);	void (*irq_preinstall) (struct drm_device * dev);	void (*irq_postinstall) (struct drm_device * dev);	void (*irq_uninstall) (struct drm_device * dev);	void (*reclaim_buffers) (struct drm_device * dev, struct file * filp);	unsigned long (*get_map_ofs) (drm_map_t * map);	unsigned long (*get_reg_ofs) (struct drm_device * dev);	void (*set_version) (struct drm_device * dev, drm_set_version_t * sv);	int (*version) (drm_version_t * version);	u32 driver_features;	int dev_priv_size;	drm_ioctl_desc_t *ioctls;	int num_ioctls;	struct file_operations fops;	struct pci_driver pci_driver;};/** * DRM head structure. This structure represent a video head on a card * that may contain multiple heads. Embed one per head of these in the * private drm_device structure. */typedef struct drm_head {	int minor;			/**< Minor device number */	struct drm_device *dev;	struct proc_dir_entry *dev_root;  /**< proc directory entry */	dev_t device;			/**< Device number for mknod */	struct class_device *dev_class;} drm_head_t;/** * DRM device structure. This structure represent a complete card that * may contain multiple heads. */typedef struct drm_device {	char *unique;			/**< Unique identifier: e.g., busid */	int unique_len;			/**< Length of unique field */	char *devname;			/**< For /proc/interrupts */	int if_version;			/**< Highest interface version set */	int blocked;			/**< Blocked due to VC switch? */	/** \name Locks */	/*@{ */	spinlock_t count_lock;		/**< For inuse, drm_device::open_count, drm_device::buf_use */	struct semaphore struct_sem;	/**< For others */	/*@} */	/** \name Usage Counters */	/*@{ */	int open_count;			/**< Outstanding files open */	atomic_t ioctl_count;		/**< Outstanding IOCTLs pending */	atomic_t vma_count;		/**< Outstanding vma areas open */	int buf_use;			/**< Buffers in use -- cannot alloc */	atomic_t buf_alloc;		/**< Buffer allocation in progress */	/*@} */	/** \name Performance counters */	/*@{ */	unsigned long counters;	drm_stat_type_t types[15];	atomic_t counts[15];	/*@} */	/** \name Authentication */	/*@{ */	drm_file_t *file_first;		/**< file list head */	drm_file_t *file_last;		/**< file list tail */	drm_magic_head_t magiclist[DRM_HASH_SIZE];	/**< magic hash table */	/*@} */	/** \name Memory management */	/*@{ */	drm_map_list_t *maplist;	/**< Linked list of regions */	int map_count;			/**< Number of mappable regions */	/** \name Context handle management */	/*@{ */	drm_ctx_list_t *ctxlist;	/**< Linked list of context handles */	int ctx_count;			/**< Number of context handles */	struct semaphore ctxlist_sem;	/**< For ctxlist */	drm_map_t **context_sareas;	    /**< per-context SAREA's */	int max_context;	drm_vma_entry_t *vmalist;	/**< List of vmas (for debugging) */	drm_lock_data_t lock;		/**< Information on hardware lock */	/*@} */	/** \name DMA queues (contexts) */	/*@{ */	int queue_count;		/**< Number of active DMA queues */	int queue_reserved;		  /**< Number of reserved DMA queues */	int queue_slots;		/**< Actual length of queuelist */	drm_queue_t **queuelist;	/**< Vector of pointers to DMA queues */	drm_device_dma_t *dma;		/**< Optional pointer for DMA support */	/*@} */	/** \name Context support */	/*@{ */	int irq;			/**< Interrupt used by board */	int irq_enabled;		/**< True if irq handler is enabled */	__volatile__ long context_flag;	/**< Context swapping flag */	__volatile__ long interrupt_flag; /**< Interruption handler flag */	__volatile__ long dma_flag;	/**< DMA dispatch flag */	struct timer_list timer;	/**< Timer for delaying ctx switch */	wait_queue_head_t context_wait;	/**< Processes waiting on ctx switch */	int last_checked;		/**< Last context checked for DMA */	int last_context;		/**< Last current context */	unsigned long last_switch;	/**< jiffies at last context switch */	/*@} */	struct work_struct work;	/** \name VBLANK IRQ support */	/*@{ */	wait_queue_head_t vbl_queue;	/**< VBLANK wait queue */	atomic_t vbl_received;	spinlock_t vbl_lock;	drm_vbl_sig_t vbl_sigs;		/**< signal list to send on VBLANK */	unsigned int vbl_pending;	/*@} */	cycles_t ctx_start;	cycles_t lck_start;	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__	struct pci_controller *hose;#endif	drm_sg_mem_t *sg;	/**< Scatter gather memory */	unsigned long *ctx_bitmap;	/**< context bitmap */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -