From d846b15e01a881a9d92a4dcaee1fea167d64cea7 Mon Sep 17 00:00:00 2001 From: Pengcheng Chen Date: Mon, 05 Dec 2016 07:44:16 +0000 Subject: 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 --- 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 #include #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); -- cgit