aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/via_drv.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-11-12 05:52:46 -0500
committerDave Airlie <airlied@linux.ie>2005-11-12 05:52:46 -0500
commit925142431bd653175b80ae153bd7a8bc13628bde (patch)
tree594c1e65d3bf25b10961ea2b97dee5704b4f6cb5 /drivers/char/drm/via_drv.h
parent792d2b9a12594522111fbe2a7f17460a4d7edff7 (diff)
drm: update VIA driver to 2.7.2
Add PCI DMA blitengine to VIA DRM Add portability code for porting VIA to FreeBSD. Sync via_drm.h with 3d driver From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/via_drv.h')
-rw-r--r--drivers/char/drm/via_drv.h56
1 files changed, 43 insertions, 13 deletions
diff --git a/drivers/char/drm/via_drv.h b/drivers/char/drm/via_drv.h
index 7d5daf43797e..0606c752dccb 100644
--- a/drivers/char/drm/via_drv.h
+++ b/drivers/char/drm/via_drv.h
@@ -24,24 +24,26 @@
24#ifndef _VIA_DRV_H_ 24#ifndef _VIA_DRV_H_
25#define _VIA_DRV_H_ 25#define _VIA_DRV_H_
26 26
27#define DRIVER_AUTHOR "VIA" 27#define DRIVER_AUTHOR "Various"
28 28
29#define DRIVER_NAME "via" 29#define DRIVER_NAME "via"
30#define DRIVER_DESC "VIA Unichrome / Pro" 30#define DRIVER_DESC "VIA Unichrome / Pro"
31#define DRIVER_DATE "20050523" 31#define DRIVER_DATE "20051022"
32 32
33#define DRIVER_MAJOR 2 33#define DRIVER_MAJOR 2
34#define DRIVER_MINOR 6 34#define DRIVER_MINOR 7
35#define DRIVER_PATCHLEVEL 3 35#define DRIVER_PATCHLEVEL 2
36 36
37#include "via_verifier.h" 37#include "via_verifier.h"
38 38
39#include "via_dmablit.h"
40
39#define VIA_PCI_BUF_SIZE 60000 41#define VIA_PCI_BUF_SIZE 60000
40#define VIA_FIRE_BUF_SIZE 1024 42#define VIA_FIRE_BUF_SIZE 1024
41#define VIA_NUM_IRQS 2 43#define VIA_NUM_IRQS 4
42 44
43typedef struct drm_via_ring_buffer { 45typedef struct drm_via_ring_buffer {
44 drm_map_t map; 46 drm_local_map_t map;
45 char *virtual_start; 47 char *virtual_start;
46} drm_via_ring_buffer_t; 48} drm_via_ring_buffer_t;
47 49
@@ -56,9 +58,9 @@ typedef struct drm_via_irq {
56 58
57typedef struct drm_via_private { 59typedef struct drm_via_private {
58 drm_via_sarea_t *sarea_priv; 60 drm_via_sarea_t *sarea_priv;
59 drm_map_t *sarea; 61 drm_local_map_t *sarea;
60 drm_map_t *fb; 62 drm_local_map_t *fb;
61 drm_map_t *mmio; 63 drm_local_map_t *mmio;
62 unsigned long agpAddr; 64 unsigned long agpAddr;
63 wait_queue_head_t decoder_queue[VIA_NR_XVMC_LOCKS]; 65 wait_queue_head_t decoder_queue[VIA_NR_XVMC_LOCKS];
64 char *dma_ptr; 66 char *dma_ptr;
@@ -82,8 +84,15 @@ typedef struct drm_via_private {
82 maskarray_t *irq_masks; 84 maskarray_t *irq_masks;
83 uint32_t irq_enable_mask; 85 uint32_t irq_enable_mask;
84 uint32_t irq_pending_mask; 86 uint32_t irq_pending_mask;
87 int *irq_map;
88 drm_via_blitq_t blit_queues[VIA_NUM_BLIT_ENGINES];
85} drm_via_private_t; 89} drm_via_private_t;
86 90
91enum via_family {
92 VIA_OTHER = 0,
93 VIA_PRO_GROUP_A,
94};
95
87/* VIA MMIO register access */ 96/* VIA MMIO register access */
88#define VIA_BASE ((dev_priv->mmio)) 97#define VIA_BASE ((dev_priv->mmio))
89 98
@@ -92,12 +101,31 @@ typedef struct drm_via_private {
92#define VIA_READ8(reg) DRM_READ8(VIA_BASE, reg) 101#define VIA_READ8(reg) DRM_READ8(VIA_BASE, reg)
93#define VIA_WRITE8(reg,val) DRM_WRITE8(VIA_BASE, reg, val) 102#define VIA_WRITE8(reg,val) DRM_WRITE8(VIA_BASE, reg, val)
94 103
104extern drm_ioctl_desc_t via_ioctls[];
105extern int via_max_ioctl;
106
107extern int via_fb_init(DRM_IOCTL_ARGS);
108extern int via_mem_alloc(DRM_IOCTL_ARGS);
109extern int via_mem_free(DRM_IOCTL_ARGS);
110extern int via_agp_init(DRM_IOCTL_ARGS);
111extern int via_map_init(DRM_IOCTL_ARGS);
112extern int via_decoder_futex(DRM_IOCTL_ARGS);
113extern int via_dma_init(DRM_IOCTL_ARGS);
114extern int via_cmdbuffer(DRM_IOCTL_ARGS);
115extern int via_flush_ioctl(DRM_IOCTL_ARGS);
116extern int via_pci_cmdbuffer(DRM_IOCTL_ARGS);
117extern int via_cmdbuf_size(DRM_IOCTL_ARGS);
118extern int via_wait_irq(DRM_IOCTL_ARGS);
119extern int via_dma_blit_sync( DRM_IOCTL_ARGS );
120extern int via_dma_blit( DRM_IOCTL_ARGS );
121
122extern int via_driver_load(drm_device_t *dev, unsigned long chipset);
123extern int via_driver_unload(drm_device_t *dev);
124
95extern int via_init_context(drm_device_t * dev, int context); 125extern int via_init_context(drm_device_t * dev, int context);
96extern int via_final_context(drm_device_t * dev, int context); 126extern int via_final_context(drm_device_t * dev, int context);
97 127
98extern int via_do_cleanup_map(drm_device_t * dev); 128extern int via_do_cleanup_map(drm_device_t * dev);
99extern int via_map_init(struct inode *inode, struct file *filp,
100 unsigned int cmd, unsigned long arg);
101extern int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence); 129extern int via_driver_vblank_wait(drm_device_t * dev, unsigned int *sequence);
102 130
103extern irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS); 131extern irqreturn_t via_driver_irq_handler(DRM_IRQ_ARGS);
@@ -111,8 +139,10 @@ extern int via_driver_dma_quiescent(drm_device_t * dev);
111extern void via_init_futex(drm_via_private_t * dev_priv); 139extern void via_init_futex(drm_via_private_t * dev_priv);
112extern void via_cleanup_futex(drm_via_private_t * dev_priv); 140extern void via_cleanup_futex(drm_via_private_t * dev_priv);
113extern void via_release_futex(drm_via_private_t * dev_priv, int context); 141extern void via_release_futex(drm_via_private_t * dev_priv, int context);
142extern int via_driver_irq_wait(drm_device_t * dev, unsigned int irq,
143 int force_sequence, unsigned int *sequence);
114 144
115extern int via_parse_command_stream(drm_device_t * dev, const uint32_t * buf, 145extern void via_dmablit_handler(drm_device_t *dev, int engine, int from_irq);
116 unsigned int size); 146extern void via_init_dmablit(drm_device_t *dev);
117 147
118#endif 148#endif