4329
|
1 #include <inttypes.h>
|
|
2
|
|
3 #define RIVA_FIFO_FREE(hwptr, cnt) \
|
|
4 { \
|
|
5 while (nv_fifo_space < (cnt)) { \
|
|
6 nv_fifo_space = hwptr->fifo_free >> 2; \
|
|
7 } \
|
|
8 nv_fifo_space -= (cnt); \
|
|
9 }
|
|
10
|
|
11 typedef struct {
|
|
12 uint32_t reserved00[4];
|
|
13 uint16_t fifo_free;
|
|
14 uint16_t nop[1];
|
|
15 uint32_t reserved01[0x03b];
|
|
16
|
|
17 uint32_t no_operation;
|
|
18 uint32_t notify;
|
|
19 uint32_t reserved02[0x01e];
|
|
20 uint32_t set_context_dma_notifies;
|
|
21 uint32_t set_context_dma_image;
|
|
22 uint32_t set_context_pattern;
|
|
23 uint32_t set_context_rop;
|
|
24 uint32_t set_context_beta1;
|
|
25 uint32_t set_context_surface;
|
|
26 uint32_t reserved03[0x05a];
|
|
27 uint32_t set_color_format;
|
|
28 uint32_t set_operation;
|
|
29 int16_t clip_x;
|
|
30 int16_t clip_y;
|
|
31 uint16_t clip_height;
|
|
32 uint16_t clip_width;
|
|
33 int16_t image_out_x;
|
|
34 int16_t image_out_y;
|
|
35 uint16_t image_out_height;
|
|
36 uint16_t image_out_width;
|
|
37 uint32_t du_dx;
|
|
38 uint32_t du_dy;
|
|
39 uint32_t reserved04[0x38];
|
|
40 uint16_t image_in_height;
|
|
41 uint16_t image_in_width;
|
|
42 uint32_t image_in_format;
|
|
43 uint32_t image_in_offset;
|
|
44 uint32_t image_in_point;
|
|
45 uint32_t reserved05[0x6fc];
|
|
46 } RivaScaledImage;
|
|
47
|
|
48 #define dump_scaledimage(x) { \
|
|
49 printf("clip: pos: %dx%d, size: %dx%d\n", \
|
|
50 x->clip_x, x->clip_y, x->clip_height, x->clip_width); \
|
|
51 printf("image_out: pos: %dx%d, size: %dx%d\n", \
|
|
52 x->image_out_x, x->image_out_y, x->image_out_height, x->image_out_width); \
|
|
53 printf("image_in: size: %dx%d format: %x offset: %x\n", \
|
|
54 x->image_in_height, x->image_in_width, x->image_in_format, x->image_in_offset); \
|
|
55 }
|