summaryrefslogtreecommitdiff
path: root/include/video/sprd_fb.h
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /include/video/sprd_fb.h
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'include/video/sprd_fb.h')
-rw-r--r--include/video/sprd_fb.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/include/video/sprd_fb.h b/include/video/sprd_fb.h
new file mode 100644
index 00000000..8f823adf
--- /dev/null
+++ b/include/video/sprd_fb.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2012 Spreadtrum Communications Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+#ifndef _SPRD_FB_H_
+#define _SPRD_FB_H_
+
+#define SPRD_LAYERS_IMG (0x1) /*support YUV & RGB*/
+#define SPRD_LAYERS_OSD (0x2) /*support RGB only*/
+
+enum {
+ SPRD_DATA_FORMAT_YUV422 = 0,
+ SPRD_DATA_FORMAT_YUV420,
+ SPRD_DATA_FORMAT_YUV400,
+ SPRD_DATA_FORMAT_RGB888,
+ SPRD_DATA_FORMAT_RGB666,
+ SPRD_DATA_FORMAT_RGB565,
+ SPRD_DATA_FORMAT_RGB555,
+ SPRD_DATA_FORMAT_LIMIT
+};
+
+enum{
+ SPRD_DATA_ENDIAN_B0B1B2B3 = 0,
+ SPRD_DATA_ENDIAN_B3B2B1B0,
+ SPRD_DATA_ENDIAN_B2B3B0B1,
+ SPRD_DATA_ENDIAN_B1B0B3B2,
+ SPRD_DATA_ENDIAN_LIMIT
+};
+
+enum{
+ SPRD_DISPLAY_OVERLAY_ASYNC = 0,
+ SPRD_DISPLAY_OVERLAY_SYNC,
+ SPRD_DISPLAY_OVERLAY_LIMIT
+};
+
+enum{
+ SPRD_FB_POWER_OFF = 0,
+ SPRD_FB_POWER_DOZE,
+ SPRD_FB_POWER_NORMAL,
+ SPRD_FB_POWER_SUSPEND,
+ SPRD_FB_POWER_LIMIT
+};
+
+typedef struct overlay_setting_rect {
+ uint16_t x; //start point - x
+ uint16_t y; //start point - y
+ uint16_t w; //width
+ uint16_t h; //height
+}overlay_setting_rect;
+
+typedef struct overlay_setting{
+ int layer_index;
+ int data_type;
+ int y_endian;
+ int uv_endian;
+ bool rb_switch;
+ overlay_setting_rect rect;
+ unsigned char *buffer;
+}overlay_setting;
+
+typedef struct overlay_display_setting{
+ int layer_index;
+ overlay_setting_rect rect;
+ int display_mode;
+}overlay_display_setting;
+
+/*
+int sprdfb_IOinit(void);
+int sprdfb_IOdeinit(void);
+*/
+
+
+#define SPRD_FB_IOCTL_MAGIC 'm'
+#define SPRD_FB_SET_OVERLAY _IOW(SPRD_FB_IOCTL_MAGIC, 1, unsigned int)
+#define SPRD_FB_DISPLAY_OVERLAY _IOW(SPRD_FB_IOCTL_MAGIC, 2, unsigned int)
+#define SPRD_FB_CHANGE_FPS _IOW(SPRD_FB_IOCTL_MAGIC, 3, unsigned int)
+#define SPRD_FB_IS_REFRESH_DONE _IOW(SPRD_FB_IOCTL_MAGIC, 4, unsigned int)
+#define SPRD_FB_SET_POWER_MODE _IOW(SPRD_FB_IOCTL_MAGIC, 5, unsigned int)
+#endif