xref: /openbmc/linux/drivers/video/fbdev/pxa3xx-gcu.h (revision e15a5365)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PXA3XX_GCU_H__
3 #define __PXA3XX_GCU_H__
4 
5 #include <linux/types.h>
6 
7 /* Number of 32bit words in display list (ring buffer). */
8 #define PXA3XX_GCU_BUFFER_WORDS  ((256 * 1024 - 256) / 4)
9 
10 /* To be increased when breaking the ABI */
11 #define PXA3XX_GCU_SHARED_MAGIC  0x30000001
12 
13 #define PXA3XX_GCU_BATCH_WORDS   8192
14 
15 struct pxa3xx_gcu_shared {
16 	u32            buffer[PXA3XX_GCU_BUFFER_WORDS];
17 
18 	bool           hw_running;
19 
20 	unsigned long  buffer_phys;
21 
22 	unsigned int   num_words;
23 	unsigned int   num_writes;
24 	unsigned int   num_done;
25 	unsigned int   num_interrupts;
26 	unsigned int   num_wait_idle;
27 	unsigned int   num_wait_free;
28 	unsigned int   num_idle;
29 
30 	u32            magic;
31 };
32 
33 /* Initialization and synchronization.
34  * Hardware is started upon write(). */
35 #define PXA3XX_GCU_IOCTL_RESET		_IO('G', 0)
36 #define PXA3XX_GCU_IOCTL_WAIT_IDLE	_IO('G', 2)
37 
38 #endif /* __PXA3XX_GCU_H__ */
39 
40