2 Copyright © 2013, The AROS Development Team. All rights reserved.
9 #define VCMB_BASE (ARM_PERIIOBASE + 0x00B880)
11 #define VCMB_CHAN_MAX 8
12 #define VCMB_CHAN_MASK 0xF
14 /* Mailbox register offsets */
17 #define VCMB_SENDER 20
18 #define VCMB_STATUS 24
19 #define VCMB_CONFIG 28
22 /* Flags for VCMB_STATUS */
23 #define VCMB_STATUS_READREADY (1 << 30)
24 #define VCMB_STATUS_WRITEREADY (1 << 31)
26 /* Tags used to commmunicate with VideoCore */
27 #define VCTAG_REQ 0x00000000
28 #define VCTAG_RESP 0x80000000
30 #define VCTAG_GETFWREV 0x00000001
31 #define VCTAG_GETBOARD 0x00010001
32 #define VCTAG_GETBOARDREV 0x00010002
33 #define VCTAG_GETBOARDMAC 0x00010003
34 #define VCTAG_GETBOARDSERIAL 0x00010004
35 #define VCTAG_GETARMRAM 0x00010005
36 #define VCTAG_GETVCRAM 0x00010006
37 #define VCTAG_GETCLOCKS 0x00010007
39 #define VCTAG_GETPOWER 0x00020001
40 #define VCTAG_GETTIMING 0x00020002
41 #define VCTAG_SETPOWER 0x00028001
43 #define VCTAG_GETCLKSTATE 0x00030001
44 #define VCTAG_GETCLKRATE 0x00030002
45 #define VCTAG_GETVOLTAGE 0x00030003
46 #define VCTAG_GETCLKMAX 0x00030004
47 #define VCTAG_GETVOLTMAX 0x00030005
48 #define VCTAG_GETTEMP 0x00030006
49 #define VCTAG_GETCLKMIN 0x00030007
50 #define VCTAG_GETVOLTMIN 0x00030008
51 #define VCTAG_GETTURBO 0x00030009
52 #define VCTAG_GETTEMPMAX 0x0003000A
54 #define VCTAG_ALLOCMEM 0x0003000C
55 #define VCTAG_LOCKMEM 0x0003000D
56 #define VCTAG_UNLOCKMEM 0x0003000E
57 #define VCTAG_FREEMEM 0x0003000F
59 #define VCTAG_EXECUTE 0x00030010
61 #define VCTAG_GETEDID 0x00030020
63 #define VCTAG_SETCLKSTATE 0x00038001
64 #define VCTAG_SETCLKRATE 0x00038002
65 #define VCTAG_SETVOLTAGE 0x00038003
66 #define VCTAG_SETTURBO 0x00038009
68 #define VCTAG_FBALLOC 0x00040001
69 #define VCTAG_SCRBLANK 0x00040002
70 #define VCTAG_GETRES 0x00040003
71 #define VCTAG_GETVRES 0x00040004
72 #define VCTAG_GETDEPTH 0x00040005
73 #define VCTAG_GETPIXFMT 0x00040006
74 #define VCTAG_GETALPHAMODE 0x00040007
75 #define VCTAG_GETPITCH 0x00040008
76 #define VCTAG_GETVOFFSET 0x00040009
77 #define VCTAG_GETOVERSCAN 0x0004000A
78 #define VCTAG_GETPALETTE 0x0004000B
80 #define VCTAG_TESTRES 0x00044003
81 #define VCTAG_TESTVRES 0x00044004
82 #define VCTAG_TESTDEPTH 0x00044005
83 #define VCTAG_TESTPIXFMT 0x00044006
84 #define VCTAG_TESTALPHAMODE 0x00044007
85 #define VCTAG_TESTVOFFSET 0x00044009
86 #define VCTAG_TESTOVERSCAN 0x0004400A
87 #define VCTAG_TESTPALETTE 0x0004400B
89 #define VCTAG_FBFREE 0x00048001
90 #define VCTAG_SETRES 0x00048003
91 #define VCTAG_SETVRES 0x00048004
92 #define VCTAG_SETDEPTH 0x00048005
93 #define VCTAG_SETPIXFMT 0x00048006
94 #define VCTAG_SETALPHAMODE 0x00048007
95 #define VCTAG_SETVOFFSET 0x00048009
96 #define VCTAG_SETOVERSCAN 0x0004800A
97 #define VCTAG_SETPALETTE 0x0004800B
99 #define VCTAG_GETCMDLINE 0x00050001
101 #define VCTAG_GETDMACHAN 0x00060001
103 /* GPU Memory allocation flags */
104 #define VCMEM_DISCARDABLE (1 << 0) // can be released at any time
105 #define VCMEM_NORMAL (0 << 2) // normal allocating alias. Don't use from ARM
106 #define VCMEM_DIRECT (1 << 2) // 0xC alias. Uncached
107 #define VCMEM_COHERENT (2 << 2) // 0x8 alias. Non-allocating in L2 but coherent
108 #define VCMEM_L1NONALLOCATING (VCMEM_DIRECT | VCMEM_COHERENT) // Allocating in L2
109 #define VCMEM_ZERO (1 << 4) // zero buffer
110 #define VCMEM_NOINIT (1 << 5) // don't initialise (default initialises to all ones)
111 #define VCMEM_LAZYLOCK (1 << 6) // can be locked for extended periods
113 #define VCPXFMT_BGR 0x0
114 #define VCPXFMT_RGB 0x1
116 #define VCALPHA_ON 0x0
117 #define VCALPHA_REVERSE 0x1
118 #define VCALPHA_IGNORE 0x2
120 #endif /* VCMBOX_H */