author | Pengcheng Chen <pengcheng.chen@amlogic.com> | 2016-12-05 07:44:16 (GMT) |
---|---|---|
committer | Pengcheng Chen <pengcheng.chen@amlogic.com> | 2016-12-13 09:22:18 (GMT) |
commit | d846b15e01a881a9d92a4dcaee1fea167d64cea7 (patch) | |
tree | 21030cf89ce4015d8c1ea1b4def652996bc7324b | |
parent | b757fbda74b53dd77e9f2f2c4c1402ba0f0f1218 (diff) | |
download | camera-d846b15e01a881a9d92a4dcaee1fea167d64cea7.zip camera-d846b15e01a881a9d92a4dcaee1fea167d64cea7.tar.gz camera-d846b15e01a881a9d92a4dcaee1fea167d64cea7.tar.bz2 |
PD#135351: camera: add ge2d ioctl for compact with 32/64 bit
add ge2d ioctl for compact with 32/64 bit system
Change-Id: I325959814968ebd2bee6a088d64407de07138f36
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
-rw-r--r--[-rwxr-xr-x] | v3/fake-pipeline2/ge2d_main.h | 68 | ||||
-rwxr-xr-x | v3/fake-pipeline2/ge2d_stream.cpp | 3 | ||||
-rwxr-xr-x | v3/fake-pipeline2/ge2d_wq.h | 3 |
3 files changed, 39 insertions, 35 deletions
diff --git a/v3/fake-pipeline2/ge2d_main.h b/v3/fake-pipeline2/ge2d_main.h index bd0e4bb..d2270bd 100755..100644 --- a/v3/fake-pipeline2/ge2d_main.h +++ b/v3/fake-pipeline2/ge2d_main.h @@ -14,48 +14,54 @@ #include <linux/kthread.h> #include <linux/ion.h> #endif - +#include "ge2d_wq.h" /************************************************************** -** ** -** macro define ** -** ** +** ** +** macro define ** +** ** ***************************************************************/ -#define GE2D_CLASS_NAME "ge2d" +#define GE2D_CLASS_NAME "ge2d" + +#define GE2D_STRETCHBLIT_NOALPHA_NOBLOCK 0x4708 +#define GE2D_BLIT_NOALPHA_NOBLOCK 0x4707 +#define GE2D_BLEND_NOBLOCK 0x4706 +#define GE2D_BLIT_NOBLOCK 0x4705 +#define GE2D_STRETCHBLIT_NOBLOCK 0x4704 +#define GE2D_FILLRECTANGLE_NOBLOCK 0x4703 + -#define GE2D_STRETCHBLIT_NOALPHA_NOBLOCK 0x4708 -#define GE2D_BLIT_NOALPHA_NOBLOCK 0x4707 -#define GE2D_BLEND_NOBLOCK 0x4706 -#define GE2D_BLIT_NOBLOCK 0x4705 -#define GE2D_STRETCHBLIT_NOBLOCK 0x4704 -#define GE2D_FILLRECTANGLE_NOBLOCK 0x4703 +#define GE2D_STRETCHBLIT_NOALPHA 0x4702 +#define GE2D_BLIT_NOALPHA 0x4701 +#define GE2D_BLEND 0x4700 +#define GE2D_BLIT 0x46ff +#define GE2D_STRETCHBLIT 0x46fe +#define GE2D_FILLRECTANGLE 0x46fd +/* #define GE2D_SRCCOLORKEY 0x46fc */ +#define GE2D_SET_COEF 0x46fb +/* #define GE2D_CONFIG_EX 0x46fa */ +/* #define GE2D_CONFIG 0x46f9 */ +#define GE2D_ANTIFLICKER_ENABLE 0x46f8 +#define GE2D_IOC_MAGIC 'G' -#define GE2D_STRETCHBLIT_NOALPHA 0x4702 -#define GE2D_BLIT_NOALPHA 0x4701 -#define GE2D_BLEND 0x4700 -#define GE2D_BLIT 0x46ff -#define GE2D_STRETCHBLIT 0x46fe -#define GE2D_FILLRECTANGLE 0x46fd -#define GE2D_SRCCOLORKEY 0x46fc -#define GE2D_SET_COEF 0x46fb -#define GE2D_CONFIG_EX 0x46fa -#define GE2D_CONFIG 0x46f9 -#define GE2D_ANTIFLICKER_ENABLE 0x46f8 +#define GE2D_CONFIG _IOW(GE2D_IOC_MAGIC, 0x00, config_para_t) +#define GE2D_CONFIG_EX _IOW(GE2D_IOC_MAGIC, 0x01, config_para_ex_t) +#define GE2D_SRCCOLORKEY _IOW(GE2D_IOC_MAGIC, 0x02, config_para_t) /************************************************************** -** ** -** type define ** -** ** +** ** +** type define ** +** ** ***************************************************************/ #ifdef __KERNEL__ typedef struct { - char name[20]; - unsigned int open_count; - int major; - unsigned int dbg_enable; - struct class *cla; - struct device *dev; + char name[20]; + unsigned int open_count; + int major; + unsigned int dbg_enable; + struct class *cla; + struct device *dev; struct ion_client *ion_client; }ge2d_device_t; #endif diff --git a/v3/fake-pipeline2/ge2d_stream.cpp b/v3/fake-pipeline2/ge2d_stream.cpp index 7ff0432..dd8f41b 100755 --- a/v3/fake-pipeline2/ge2d_stream.cpp +++ b/v3/fake-pipeline2/ge2d_stream.cpp @@ -178,8 +178,7 @@ int fillStream(struct VideoInfo *src, uintptr_t physAddr, const android::StreamB cfg.dst_para.left = 0; cfg.dst_para.width = dst.width; cfg.dst_para.height = dst.height; - cfg.src_addr_type = GE2D_ADDR_TYPE_PHY_ADDR; - cfg.dst_addr_type = GE2D_ADDR_TYPE_SHARE_FD; + ioctl(ge2d_fd, GE2D_CONFIG_EX, &cfg); diff --git a/v3/fake-pipeline2/ge2d_wq.h b/v3/fake-pipeline2/ge2d_wq.h index 9bcfba3..6e8fafe 100755 --- a/v3/fake-pipeline2/ge2d_wq.h +++ b/v3/fake-pipeline2/ge2d_wq.h @@ -279,8 +279,7 @@ typedef struct { config_planes_t src2_planes[4]; config_planes_t dst_planes[4]; - enum ge2d_addr_type_e src_addr_type; - enum ge2d_addr_type_e dst_addr_type; + }config_para_ex_t; #ifdef __KERNEL__ extern int ge2d_setup(void); |