summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/kernel/common/linux/msm_kgsl.h35
-rw-r--r--libc/kernel/common/linux/ss_vdec.h8
-rw-r--r--libc/kernel/common/media/msm_gemini.h106
3 files changed, 147 insertions, 2 deletions
diff --git a/libc/kernel/common/linux/msm_kgsl.h b/libc/kernel/common/linux/msm_kgsl.h
index d1752a9..312e5b3 100644
--- a/libc/kernel/common/linux/msm_kgsl.h
+++ b/libc/kernel/common/linux/msm_kgsl.h
@@ -74,9 +74,18 @@ struct kgsl_shadowprop {
unsigned int flags;
};
+struct kgsl_platform_data {
+ unsigned int max_axi_freq;
+ unsigned int max_grp2d_freq;
+ int (*set_grp2d_async)(void);
+ unsigned int max_grp3d_freq;
+ int (*set_grp3d_async)(void);
+};
+
#define KGSL_IOC_TYPE 0x09
struct kgsl_device_getproperty {
+ unsigned int device_id;
unsigned int type;
void *value;
unsigned int sizebytes;
@@ -85,6 +94,7 @@ struct kgsl_device_getproperty {
#define IOCTL_KGSL_DEVICE_GETPROPERTY _IOWR(KGSL_IOC_TYPE, 0x2, struct kgsl_device_getproperty)
struct kgsl_device_regread {
+ unsigned int device_id;
unsigned int offsetwords;
unsigned int value;
};
@@ -92,6 +102,7 @@ struct kgsl_device_regread {
#define IOCTL_KGSL_DEVICE_REGREAD _IOWR(KGSL_IOC_TYPE, 0x3, struct kgsl_device_regread)
struct kgsl_device_waittimestamp {
+ unsigned int device_id;
unsigned int timestamp;
unsigned int timeout;
};
@@ -99,6 +110,7 @@ struct kgsl_device_waittimestamp {
#define IOCTL_KGSL_DEVICE_WAITTIMESTAMP _IOW(KGSL_IOC_TYPE, 0x6, struct kgsl_device_waittimestamp)
struct kgsl_ringbuffer_issueibcmds {
+ unsigned int device_id;
unsigned int drawctxt_id;
unsigned int ibaddr;
unsigned int sizedwords;
@@ -109,6 +121,7 @@ struct kgsl_ringbuffer_issueibcmds {
#define IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS _IOWR(KGSL_IOC_TYPE, 0x10, struct kgsl_ringbuffer_issueibcmds)
struct kgsl_cmdstream_readtimestamp {
+ unsigned int device_id;
unsigned int type;
unsigned int timestamp;
};
@@ -116,6 +129,7 @@ struct kgsl_cmdstream_readtimestamp {
#define IOCTL_KGSL_CMDSTREAM_READTIMESTAMP _IOR(KGSL_IOC_TYPE, 0x11, struct kgsl_cmdstream_readtimestamp)
struct kgsl_cmdstream_freememontimestamp {
+ unsigned int device_id;
unsigned int gpuaddr;
unsigned int type;
unsigned int timestamp;
@@ -124,6 +138,7 @@ struct kgsl_cmdstream_freememontimestamp {
#define IOCTL_KGSL_CMDSTREAM_FREEMEMONTIMESTAMP _IOR(KGSL_IOC_TYPE, 0x12, struct kgsl_cmdstream_freememontimestamp)
struct kgsl_drawctxt_create {
+ unsigned int device_id;
unsigned int flags;
unsigned int drawctxt_id;
};
@@ -131,6 +146,7 @@ struct kgsl_drawctxt_create {
#define IOCTL_KGSL_DRAWCTXT_CREATE _IOWR(KGSL_IOC_TYPE, 0x13, struct kgsl_drawctxt_create)
struct kgsl_drawctxt_destroy {
+ unsigned int device_id;
unsigned int drawctxt_id;
};
@@ -191,10 +207,29 @@ struct kgsl_sharedmem_from_vmalloc {
#define IOCTL_KGSL_SHAREDMEM_FLUSH_CACHE _IOW(KGSL_IOC_TYPE, 0x24, struct kgsl_sharedmem_free)
struct kgsl_drawctxt_set_bin_base_offset {
+ unsigned int device_id;
unsigned int drawctxt_id;
unsigned int offset;
};
#define IOCTL_KGSL_DRAWCTXT_SET_BIN_BASE_OFFSET _IOW(KGSL_IOC_TYPE, 0x25, struct kgsl_drawctxt_set_bin_base_offset)
+enum kgsl_cmdwindow_type {
+ KGSL_CMDWINDOW_MIN = 0x00000000,
+ KGSL_CMDWINDOW_2D = 0x00000000,
+ KGSL_CMDWINDOW_3D = 0x00000001,
+ KGSL_CMDWINDOW_MMU = 0x00000002,
+ KGSL_CMDWINDOW_ARBITER = 0x000000FF,
+ KGSL_CMDWINDOW_MAX = 0x000000FF,
+};
+
+struct kgsl_cmdwindow_write {
+ unsigned int device_id;
+ enum kgsl_cmdwindow_type target;
+ unsigned int addr;
+ unsigned int data;
+};
+
+#define IOCTL_KGSL_CMDWINDOW_WRITE _IOW(KGSL_IOC_TYPE, 0x2e, struct kgsl_cmdwindow_write)
+
#endif
diff --git a/libc/kernel/common/linux/ss_vdec.h b/libc/kernel/common/linux/ss_vdec.h
index bbcc535..140f900 100644
--- a/libc/kernel/common/linux/ss_vdec.h
+++ b/libc/kernel/common/linux/ss_vdec.h
@@ -395,6 +395,8 @@ enum vdec_output_fromat {
struct vdec_picsize {
uint32_t frame_width;
uint32_t frame_height;
+ uint32_t stride;
+ uint32_t scan_lines;
};
struct vdec_seqheader {
@@ -422,8 +424,10 @@ struct vdec_input_frameinfo {
};
struct vdec_framesize {
- uint32_t width;
- uint32_t height;
+ uint32_t n_left;
+ uint32_t n_top;
+ uint32_t n_right;
+ uint32_t n_bottom;
};
struct vdec_output_frameinfo {
diff --git a/libc/kernel/common/media/msm_gemini.h b/libc/kernel/common/media/msm_gemini.h
new file mode 100644
index 0000000..f792f93
--- /dev/null
+++ b/libc/kernel/common/media/msm_gemini.h
@@ -0,0 +1,106 @@
+/****************************************************************************
+ ****************************************************************************
+ ***
+ *** This header was automatically generated from a Linux kernel header
+ *** of the same name, to make information necessary for userspace to
+ *** call into the kernel available to libc. It contains only constants,
+ *** structures, and macros generated from the original header, and thus,
+ *** contains no copyrightable information.
+ ***
+ ****************************************************************************
+ ****************************************************************************/
+#ifndef __LINUX_MSM_GEMINI_H
+#define __LINUX_MSM_GEMINI_H
+
+#include <linux/types.h>
+#include <asm/sizes.h>
+#include <linux/ioctl.h>
+
+#define MSM_GMN_IOCTL_MAGIC 'g'
+
+#define MSM_GMN_IOCTL_GET_HW_VERSION _IOW(MSM_GMN_IOCTL_MAGIC, 1, struct msm_gemini_hw_cmd *)
+
+#define MSM_GMN_IOCTL_RESET _IOW(MSM_GMN_IOCTL_MAGIC, 2, struct msm_gemini_ctrl_cmd *)
+
+#define MSM_GMN_IOCTL_STOP _IOW(MSM_GMN_IOCTL_MAGIC, 3, struct msm_gemini_hw_cmds *)
+
+#define MSM_GMN_IOCTL_START _IOW(MSM_GMN_IOCTL_MAGIC, 4, struct msm_gemini_hw_cmds *)
+
+#define MSM_GMN_IOCTL_INPUT_BUF_ENQUEUE _IOW(MSM_GMN_IOCTL_MAGIC, 5, struct msm_gemini_buf *)
+
+#define MSM_GMN_IOCTL_INPUT_GET _IOW(MSM_GMN_IOCTL_MAGIC, 6, struct msm_gemini_buf *)
+
+#define MSM_GMN_IOCTL_INPUT_GET_UNBLOCK _IOW(MSM_GMN_IOCTL_MAGIC, 7, int)
+
+#define MSM_GMN_IOCTL_OUTPUT_BUF_ENQUEUE _IOW(MSM_GMN_IOCTL_MAGIC, 8, struct msm_gemini_buf *)
+
+#define MSM_GMN_IOCTL_OUTPUT_GET _IOW(MSM_GMN_IOCTL_MAGIC, 9, struct msm_gemini_buf *)
+
+#define MSM_GMN_IOCTL_OUTPUT_GET_UNBLOCK _IOW(MSM_GMN_IOCTL_MAGIC, 10, int)
+
+#define MSM_GMN_IOCTL_EVT_GET _IOW(MSM_GMN_IOCTL_MAGIC, 11, struct msm_gemini_ctrl_cmd *)
+
+#define MSM_GMN_IOCTL_EVT_GET_UNBLOCK _IOW(MSM_GMN_IOCTL_MAGIC, 12, int)
+
+#define MSM_GMN_IOCTL_HW_CMD _IOW(MSM_GMN_IOCTL_MAGIC, 13, struct msm_gemini_hw_cmd *)
+
+#define MSM_GMN_IOCTL_HW_CMDS _IOW(MSM_GMN_IOCTL_MAGIC, 14, struct msm_gemini_hw_cmds *)
+
+#define MSM_GMN_IOCTL_TEST_DUMP_REGION _IOW(MSM_GMN_IOCTL_MAGIC, 15, unsigned long)
+
+#define MSM_GEMINI_MODE_REALTIME_ENCODE 0
+#define MSM_GEMINI_MODE_OFFLINE_ENCODE 1
+#define MSM_GEMINI_MODE_REALTIME_ROTATION 2
+#define MSM_GEMINI_MODE_OFFLINE_ROTATION 3
+struct msm_gemini_ctrl_cmd {
+ uint32_t type;
+ uint32_t len;
+ void *value;
+};
+
+#define MSM_GEMINI_EVT_RESET 0
+#define MSM_GEMINI_EVT_FRAMEDONE 1
+#define MSM_GEMINI_EVT_ERR 2
+
+struct msm_gemini_buf {
+ uint32_t type;
+ int fd;
+
+ void *vaddr;
+
+ uint32_t y_off;
+ uint32_t y_len;
+ uint32_t framedone_len;
+
+ uint32_t cbcr_off;
+ uint32_t cbcr_len;
+
+ uint32_t num_of_mcu_rows;
+};
+
+#define MSM_GEMINI_HW_CMD_TYPE_READ 0
+#define MSM_GEMINI_HW_CMD_TYPE_WRITE 1
+#define MSM_GEMINI_HW_CMD_TYPE_WRITE_OR 2
+#define MSM_GEMINI_HW_CMD_TYPE_UWAIT 3
+#define MSM_GEMINI_HW_CMD_TYPE_MWAIT 4
+#define MSM_GEMINI_HW_CMD_TYPE_MDELAY 5
+#define MSM_GEMINI_HW_CMD_TYPE_UDELAY 6
+struct msm_gemini_hw_cmd {
+
+ uint32_t type:4;
+
+ uint32_t n:12;
+ uint32_t offset:16;
+ uint32_t mask;
+ union {
+ uint32_t data;
+ uint32_t *pdata;
+ };
+};
+
+struct msm_gemini_hw_cmds {
+ uint32_t m;
+ struct msm_gemini_hw_cmd hw_cmd[1];
+};
+
+#endif