blob: d2270bd8a31d127b2c559742a4f27c556ceaadd2
1 | #ifndef _GE2D_MAIN_H |
2 | #define _GE2D_MAIN_H |
3 | #ifdef __KERNEL__ |
4 | #include "ge2d.h" |
5 | #include <linux/interrupt.h> |
6 | #include <linux/compat.h> |
7 | #include <mach/am_regs.h> |
8 | #include <linux/amlogic/amports/canvas.h> |
9 | #include <linux/fb.h> |
10 | #include <linux/list.h> |
11 | #include <asm/uaccess.h> |
12 | #include <linux/sysfs.h> |
13 | #include <linux/spinlock.h> |
14 | #include <linux/kthread.h> |
15 | #include <linux/ion.h> |
16 | #endif |
17 | #include "ge2d_wq.h" |
18 | /************************************************************** |
19 | ** ** |
20 | ** macro define ** |
21 | ** ** |
22 | ***************************************************************/ |
23 | |
24 | #define GE2D_CLASS_NAME "ge2d" |
25 | |
26 | #define GE2D_STRETCHBLIT_NOALPHA_NOBLOCK 0x4708 |
27 | #define GE2D_BLIT_NOALPHA_NOBLOCK 0x4707 |
28 | #define GE2D_BLEND_NOBLOCK 0x4706 |
29 | #define GE2D_BLIT_NOBLOCK 0x4705 |
30 | #define GE2D_STRETCHBLIT_NOBLOCK 0x4704 |
31 | #define GE2D_FILLRECTANGLE_NOBLOCK 0x4703 |
32 | |
33 | |
34 | #define GE2D_STRETCHBLIT_NOALPHA 0x4702 |
35 | #define GE2D_BLIT_NOALPHA 0x4701 |
36 | #define GE2D_BLEND 0x4700 |
37 | #define GE2D_BLIT 0x46ff |
38 | #define GE2D_STRETCHBLIT 0x46fe |
39 | #define GE2D_FILLRECTANGLE 0x46fd |
40 | /* #define GE2D_SRCCOLORKEY 0x46fc */ |
41 | #define GE2D_SET_COEF 0x46fb |
42 | /* #define GE2D_CONFIG_EX 0x46fa */ |
43 | /* #define GE2D_CONFIG 0x46f9 */ |
44 | #define GE2D_ANTIFLICKER_ENABLE 0x46f8 |
45 | |
46 | #define GE2D_IOC_MAGIC 'G' |
47 | |
48 | |
49 | #define GE2D_CONFIG _IOW(GE2D_IOC_MAGIC, 0x00, config_para_t) |
50 | #define GE2D_CONFIG_EX _IOW(GE2D_IOC_MAGIC, 0x01, config_para_ex_t) |
51 | #define GE2D_SRCCOLORKEY _IOW(GE2D_IOC_MAGIC, 0x02, config_para_t) |
52 | /************************************************************** |
53 | ** ** |
54 | ** type define ** |
55 | ** ** |
56 | ***************************************************************/ |
57 | #ifdef __KERNEL__ |
58 | typedef struct { |
59 | char name[20]; |
60 | unsigned int open_count; |
61 | int major; |
62 | unsigned int dbg_enable; |
63 | struct class *cla; |
64 | struct device *dev; |
65 | struct ion_client *ion_client; |
66 | }ge2d_device_t; |
67 | #endif |
68 | #endif |
69 |