~ubuntu-branches/ubuntu/precise/libdrm/precise-proposed

« back to all changes in this revision

Viewing changes to shared-core/via_drm.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2008-10-19 14:26:37 UTC
  • mfrom: (1.1.6 upstream) (2.1.6 gutsy)
  • Revision ID: james.westby@ubuntu.com-20081019142637-fdzty862e9yx2y67
Remove from the source package a bunch of files that are only used by the
kernel drm component.  This gets rid of the mga, r128 and radeon
microcode, and thus closes: #502675.  Thanks, Ben Hutchings!

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 * backwards incompatibilities, (which should be avoided whenever possible).
43
43
 */
44
44
 
45
 
#define VIA_DRM_DRIVER_DATE             "20060616"
 
45
#define VIA_DRM_DRIVER_DATE             "20070202"
46
46
 
47
47
#define VIA_DRM_DRIVER_MAJOR            2
48
 
#define VIA_DRM_DRIVER_MINOR            10
49
 
#define VIA_DRM_DRIVER_PATCHLEVEL       2
50
 
#define VIA_DRM_DRIVER_VERSION          (((VIA_DRM_DRIVER_MAJOR) << 16) | (VIA_DRM_DRIVER_MINOR))
 
48
#define VIA_DRM_DRIVER_MINOR            11
 
49
#define VIA_DRM_DRIVER_PATCHLEVEL       1
 
50
#define VIA_DRM_DRIVER_VERSION    (((VIA_DRM_DRIVER_MAJOR) << 16) | (VIA_DRM_DRIVER_MINOR))
51
51
 
52
 
#define VIA_NR_SAREA_CLIPRECTS          8
53
 
#define VIA_NR_XVMC_PORTS               10
54
 
#define VIA_NR_XVMC_LOCKS               5
55
 
#define VIA_MAX_CACHELINE_SIZE          64
 
52
#define VIA_NR_SAREA_CLIPRECTS          8
 
53
#define VIA_NR_XVMC_PORTS              10
 
54
#define VIA_NR_XVMC_LOCKS              5
 
55
#define VIA_MAX_CACHELINE_SIZE    64
56
56
#define XVMCLOCKPTR(saPriv,lockNo)                                      \
57
 
        ((volatile drm_hw_lock_t *)(((((unsigned long) (saPriv)->XvMCLockArea) + \
 
57
        ((volatile struct drm_hw_lock *)(((((unsigned long) (saPriv)->XvMCLockArea) + \
58
58
                                      (VIA_MAX_CACHELINE_SIZE - 1)) &   \
59
59
                                     ~(VIA_MAX_CACHELINE_SIZE - 1)) +   \
60
60
                                    VIA_MAX_CACHELINE_SIZE*(lockNo)))
61
 
 
62
 
/* Each region is a minimum of 64k, and there are at most 64 of them.
63
 
 */
64
61
#define VIA_NR_TEX_REGIONS 64
65
 
#define VIA_LOG_MIN_TEX_REGION_SIZE 16
 
62
 
66
63
#endif
67
64
 
68
 
#define VIA_UPLOAD_TEX0IMAGE  0x1       /* handled clientside */
69
 
#define VIA_UPLOAD_TEX1IMAGE  0x2       /* handled clientside */
70
 
#define VIA_UPLOAD_CTX        0x4
71
 
#define VIA_UPLOAD_BUFFERS    0x8
72
 
#define VIA_UPLOAD_TEX0       0x10
73
 
#define VIA_UPLOAD_TEX1       0x20
74
 
#define VIA_UPLOAD_CLIPRECTS  0x40
75
 
#define VIA_UPLOAD_ALL        0xff
 
65
#define DRM_VIA_FENCE_TYPE_ACCEL 0x00000002
76
66
 
77
67
/* VIA specific ioctls */
78
68
#define DRM_VIA_ALLOCMEM        0x00
79
 
#define DRM_VIA_FREEMEM         0x01
 
69
#define DRM_VIA_FREEMEM         0x01
80
70
#define DRM_VIA_AGP_INIT        0x02
81
 
#define DRM_VIA_FB_INIT         0x03
 
71
#define DRM_VIA_FB_INIT         0x03
82
72
#define DRM_VIA_MAP_INIT        0x04
83
73
#define DRM_VIA_DEC_FUTEX       0x05
84
74
#define NOT_USED
85
75
#define DRM_VIA_DMA_INIT        0x07
86
76
#define DRM_VIA_CMDBUFFER       0x08
87
 
#define DRM_VIA_FLUSH           0x09
88
 
#define DRM_VIA_PCICMD          0x0a
 
77
#define DRM_VIA_FLUSH           0x09
 
78
#define DRM_VIA_PCICMD          0x0a
89
79
#define DRM_VIA_CMDBUF_SIZE     0x0b
90
80
#define NOT_USED
91
 
#define DRM_VIA_WAIT_IRQ        0x0d
92
 
#define DRM_VIA_DMA_BLIT        0x0e
 
81
#define DRM_VIA_WAIT_IRQ        0x0d
 
82
#define DRM_VIA_DMA_BLIT        0x0e
93
83
#define DRM_VIA_BLIT_SYNC       0x0f
94
84
 
95
85
#define DRM_IOCTL_VIA_ALLOCMEM    DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_ALLOCMEM, drm_via_mem_t)
124
114
 
125
115
#define VIA_MEM_VIDEO   0       /* matches drm constant */
126
116
#define VIA_MEM_AGP     1       /* matches drm constant */
127
 
#define VIA_MEM_SYSTEM  2               
 
117
#define VIA_MEM_SYSTEM  2
128
118
#define VIA_MEM_MIXED   3
129
119
#define VIA_MEM_UNKNOWN 4
130
120
 
172
162
        enum {
173
163
                VIA_INIT_DMA = 0x01,
174
164
                VIA_CLEANUP_DMA = 0x02,
175
 
                VIA_DMA_INITIALIZED = 0x03
 
165
                VIA_DMA_INITIALIZED = 0x03
176
166
        } func;
177
167
 
178
168
        unsigned long offset;
197
187
typedef struct _drm_via_sarea {
198
188
        unsigned int dirty;
199
189
        unsigned int nbox;
200
 
        drm_clip_rect_t boxes[VIA_NR_SAREA_CLIPRECTS];
 
190
        struct drm_clip_rect boxes[VIA_NR_SAREA_CLIPRECTS];
201
191
        drm_via_tex_region_t texList[VIA_NR_TEX_REGIONS + 1];
202
192
        int texAge;             /* last time texture was uploaded */
203
193
        int ctxOwner;           /* last context to upload state */
213
203
 
214
204
        unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS];
215
205
        unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS];
216
 
        unsigned int XvMCCtxNoGrabbed;  /* Last context to hold decoder */      
 
206
        unsigned int XvMCCtxNoGrabbed;  /* Last context to hold decoder */
217
207
 
218
208
        /* Used by the 3d driver only at this point, for pageflipping:
219
209
         */
220
 
        unsigned int pfCurrentOffset;
 
210
        unsigned int pfCurrentOffset;
221
211
} drm_via_sarea_t;
222
212
 
223
213
typedef struct _drm_via_cmdbuf_size {
238
228
 
239
229
#define VIA_IRQ_FLAGS_MASK 0xF0000000
240
230
 
241
 
enum drm_via_irqs{
 
231
enum drm_via_irqs {
242
232
        drm_via_irq_hqv0 = 0,
243
233
        drm_via_irq_hqv1,
244
234
        drm_via_irq_dma0_dd,
248
238
        drm_via_irq_num
249
239
};
250
240
 
251
 
struct drm_via_wait_irq_request{
 
241
struct drm_via_wait_irq_request {
252
242
        unsigned irq;
253
243
        via_irq_seq_type_t type;
254
244
        uint32_t sequence;
260
250
        struct drm_wait_vblank_reply reply;
261
251
} drm_via_irqwait_t;
262
252
 
263
 
typedef struct drm_via_blitsync { 
 
253
typedef struct drm_via_blitsync {
264
254
        uint32_t sync_handle;
265
255
        unsigned engine;
266
256
} drm_via_blitsync_t;
267
257
 
268
 
/* 
 
258
/*
269
259
 * Below,"flags" is currently unused but will be used for possible future
270
 
 * extensions like kernel space bounce buffers for bad alignments and 
 
260
 * extensions like kernel space bounce buffers for bad alignments and
271
261
 * blit engine busy-wait polling for better latency in the absence of
272
262
 * interrupts.
273
263
 */
274
264
 
275
265
typedef struct drm_via_dmablit {
276
 
        uint32_t num_lines;          
277
 
        uint32_t line_length;        
278
 
 
279
 
        uint32_t fb_addr;                
280
 
        uint32_t fb_stride;              
281
 
 
282
 
        unsigned char *mem_addr;        
283
 
        uint32_t  mem_stride;        
284
 
       
285
 
        uint32_t  flags;
286
 
        int to_fb;
287
 
 
288
 
        drm_via_blitsync_t sync;   
 
266
        uint32_t num_lines;
 
267
        uint32_t line_length;
 
268
 
 
269
        uint32_t fb_addr;
 
270
        uint32_t fb_stride;
 
271
 
 
272
        unsigned char *mem_addr;
 
273
        uint32_t mem_stride;
 
274
 
 
275
        uint32_t flags;
 
276
        int to_fb;
 
277
 
 
278
        drm_via_blitsync_t sync;
289
279
} drm_via_dmablit_t;
290
280
 
291
281