summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-09-25 17:01:18 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2013-09-25 17:01:18 +0200
commit45116f05edf67934bbdee4e61f003dae962bcfef (patch)
tree0a4d113182681b89f67770516328080d46de29d0
parentc0b009fff4bbc0116b0fee613ac242ba6a17ad0e (diff)
uapi: merge interface into single include file
-rw-r--r--native/include_v4_uapi/gc_abi.h7
-rw-r--r--native/include_v4_uapi/gc_hal.h1572
-rw-r--r--native/include_v4_uapi/gc_hal_base.h140
-rw-r--r--native/include_v4_uapi/gc_hal_driver.h835
-rw-r--r--native/include_v4_uapi/gc_hal_enum.h776
-rw-r--r--native/include_v4_uapi/gc_hal_kernel_buffer.h159
-rw-r--r--native/include_v4_uapi/gc_hal_options.h57
-rw-r--r--native/include_v4_uapi/gc_hal_profiler.h102
-rw-r--r--native/include_v4_uapi/gc_hal_types.h219
9 files changed, 1542 insertions, 2325 deletions
diff --git a/native/include_v4_uapi/gc_abi.h b/native/include_v4_uapi/gc_abi.h
index d04a79a..bfcf37a 100644
--- a/native/include_v4_uapi/gc_abi.h
+++ b/native/include_v4_uapi/gc_abi.h
@@ -21,8 +21,6 @@
* DEALINGS IN THE SOFTWARE.
*/
/** Kernel ABI definition file for Etna **/
-#ifndef H_GCABI
-#define H_GCABI
//#define GCABI_USER_SIGNAL_HAS_TYPE
//#define GCABI_CONTEXT_HAS_PHYSICAL
#define GCABI_HAS_MINOR_FEATURES_2
@@ -45,10 +43,5 @@ typedef struct
unsigned int out_buf_size;
} vivante_ioctl_data_t;
-#include "gc_hal_base.h"
#include "gc_hal.h"
-#include "gc_hal_driver.h"
-#include "gc_hal_kernel_buffer.h"
-#include "gc_hal_types.h"
-#endif
diff --git a/native/include_v4_uapi/gc_hal.h b/native/include_v4_uapi/gc_hal.h
index b9a8966..88e54d0 100644
--- a/native/include_v4_uapi/gc_hal.h
+++ b/native/include_v4_uapi/gc_hal.h
@@ -17,61 +17,887 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*****************************************************************************/
+#ifndef __gc_hal_h_
+#define __gc_hal_h_
+#include <linux/types.h>
+/* Mark dummy fields, this can be defined to empty to remove unnecessary
+ * fields, but that will lose compatibilty with the blob */
+#define VIV_DUMMY(type, name) type name##_dummy;
+/* Documentation-only defines */
+#define IN
+#define OUT
+#define OPTIONAL
+/******************************************************************************\
+*********************************** Options ***********************************
+\******************************************************************************/
-#ifndef __gc_hal_h_
-#define __gc_hal_h_
+/* The number of context buffers per user. */
+#define gcdCONTEXT_BUFFER_COUNT 2
+
+/* Length of profile file name */
+#define gcdMAX_PROFILE_FILE_NAME 128
+
+/*
+ VIVANTE_PROFILER
+
+ This define enables the profiler.
+*/
+#ifndef VIVANTE_PROFILER
+# define VIVANTE_PROFILER 0
+#endif
+
+/*
+ gcdSECURE_USER
+
+ Use logical addresses instead of physical addresses in user land. In
+ this case a hint table is created for both command buffers and context
+ buffers, and that hint table will be used to patch up those buffers in
+ the kernel when they are ready to submit.
+*/
+#ifndef gcdSECURE_USER
+# define gcdSECURE_USER 0
+#endif
+
+/******************************************************************************\
+****************************** Object Declarations *****************************
+\******************************************************************************/
+
+typedef union _gcuVIDMEM_NODE *gcuVIDMEM_NODE_PTR;
+typedef void *gctPHYS_ADDR;
+typedef void *gctHANDLE;
+typedef void *gctSIGNAL;
+typedef struct _gckCONTEXT *gckCONTEXT;
+typedef struct _gcoCMDBUF *gcoCMDBUF;
+
+/******************************************************************************\
+******************************* I/O Control Codes ******************************
+\******************************************************************************/
+
+#define IOCTL_GCHAL_INTERFACE 30000
+#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
+#define IOCTL_GCHAL_TERMINATE 30002
+
+/******************************************************************************\
+********************************* Command Codes ********************************
+\******************************************************************************/
+
+typedef enum _gceHAL_COMMAND_CODES
+{
+ /* Generic query. */
+ gcvHAL_QUERY_VIDEO_MEMORY,
+ gcvHAL_QUERY_CHIP_IDENTITY,
+
+ /* Contiguous memory. */
+ gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
+ gcvHAL_FREE_NON_PAGED_MEMORY,
+ gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
+ gcvHAL_FREE_CONTIGUOUS_MEMORY,
+
+ /* Video memory allocation. */
+ gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
+ gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
+ gcvHAL_FREE_VIDEO_MEMORY,
+
+ /* Physical-to-logical mapping. */
+ gcvHAL_MAP_MEMORY,
+ gcvHAL_UNMAP_MEMORY,
+
+ /* Logical-to-physical mapping. */
+ gcvHAL_MAP_USER_MEMORY,
+ gcvHAL_UNMAP_USER_MEMORY,
+
+ /* Surface lock/unlock. */
+ gcvHAL_LOCK_VIDEO_MEMORY,
+ gcvHAL_UNLOCK_VIDEO_MEMORY,
+
+ /* Event queue. */
+ gcvHAL_EVENT_COMMIT,
+
+ gcvHAL_USER_SIGNAL,
+ gcvHAL_SIGNAL,
+ gcvHAL_WRITE_DATA,
+
+ gcvHAL_COMMIT,
+ gcvHAL_STALL,
+
+ gcvHAL_READ_REGISTER,
+ gcvHAL_WRITE_REGISTER,
+
+ gcvHAL_GET_PROFILE_SETTING,
+ gcvHAL_SET_PROFILE_SETTING,
+
+ gcvHAL_READ_ALL_PROFILE_REGISTERS,
+ gcvHAL_PROFILE_REGISTERS_2D,
+
+ /* Power management. */
+ gcvHAL_SET_POWER_MANAGEMENT_STATE,
+ gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
+
+ gcvHAL_GET_BASE_ADDRESS,
+
+ gcvHAL_SET_IDLE, /* reserved */
+
+ /* Queries. */
+ gcvHAL_QUERY_KERNEL_SETTINGS,
+
+ /* Reset. */
+ gcvHAL_RESET,
+
+ /* Map physical address into handle. */
+ gcvHAL_MAP_PHYSICAL,
+
+ /* Debugger stuff. */
+ gcvHAL_DEBUG,
+
+ /* Cache stuff. */
+ gcvHAL_CACHE,
+
+ /* TimeStamp */
+ gcvHAL_TIMESTAMP,
+
+ /* Database. */
+ gcvHAL_DATABASE,
+
+ /* Version. */
+ gcvHAL_VERSION,
+
+ /* Chip info */
+ gcvHAL_CHIP_INFO,
+
+ /* Process attaching/detaching. */
+ gcvHAL_ATTACH,
+ gcvHAL_DETACH,
+
+ /* Composition. */
+ gcvHAL_COMPOSE,
+
+ /* Set timeOut value */
+ gcvHAL_SET_TIMEOUT,
+
+ /* Frame database. */
+ gcvHAL_GET_FRAME_INFO,
+
+ /* Shared info for each process */
+ gcvHAL_GET_SHARED_INFO,
+ gcvHAL_SET_SHARED_INFO,
+ gcvHAL_QUERY_COMMAND_BUFFER,
+
+ gcvHAL_COMMIT_DONE,
+
+ /* GPU and event dump */
+ gcvHAL_DUMP_GPU_STATE,
+ gcvHAL_DUMP_EVENT
+}
+gceHAL_COMMAND_CODES;
+
+
+/******************************************************************************\
+********************************* Enumerations *********************************
+\******************************************************************************/
+
+/* Status codes */
+typedef enum _gceSTATUS
+{
+ gcvSTATUS_OK = 0,
+ gcvSTATUS_FALSE = 0,
+ gcvSTATUS_TRUE = 1,
+ gcvSTATUS_NO_MORE_DATA = 2,
+ gcvSTATUS_CACHED = 3,
+ gcvSTATUS_MIPMAP_TOO_LARGE = 4,
+ gcvSTATUS_NAME_NOT_FOUND = 5,
+ gcvSTATUS_NOT_OUR_INTERRUPT = 6,
+ gcvSTATUS_MISMATCH = 7,
+ gcvSTATUS_MIPMAP_TOO_SMALL = 8,
+ gcvSTATUS_LARGER = 9,
+ gcvSTATUS_SMALLER = 10,
+ gcvSTATUS_CHIP_NOT_READY = 11,
+ gcvSTATUS_NEED_CONVERSION = 12,
+ gcvSTATUS_SKIP = 13,
+ gcvSTATUS_DATA_TOO_LARGE = 14,
+ gcvSTATUS_INVALID_CONFIG = 15,
+ gcvSTATUS_CHANGED = 16,
+ gcvSTATUS_NOT_SUPPORT_DITHER = 17,
+ gcvSTATUS_EXECUTED = 18,
+ gcvSTATUS_TERMINATE = 19,
+
+ gcvSTATUS_INVALID_ARGUMENT = -1,
+ gcvSTATUS_INVALID_OBJECT = -2,
+ gcvSTATUS_OUT_OF_MEMORY = -3,
+ gcvSTATUS_MEMORY_LOCKED = -4,
+ gcvSTATUS_MEMORY_UNLOCKED = -5,
+ gcvSTATUS_HEAP_CORRUPTED = -6,
+ gcvSTATUS_GENERIC_IO = -7,
+ gcvSTATUS_INVALID_ADDRESS = -8,
+ gcvSTATUS_CONTEXT_LOSSED = -9,
+ gcvSTATUS_TOO_COMPLEX = -10,
+ gcvSTATUS_BUFFER_TOO_SMALL = -11,
+ gcvSTATUS_INTERFACE_ERROR = -12,
+ gcvSTATUS_NOT_SUPPORTED = -13,
+ gcvSTATUS_MORE_DATA = -14,
+ gcvSTATUS_TIMEOUT = -15,
+ gcvSTATUS_OUT_OF_RESOURCES = -16,
+ gcvSTATUS_INVALID_DATA = -17,
+ gcvSTATUS_INVALID_MIPMAP = -18,
+ gcvSTATUS_NOT_FOUND = -19,
+ gcvSTATUS_NOT_ALIGNED = -20,
+ gcvSTATUS_INVALID_REQUEST = -21,
+ gcvSTATUS_GPU_NOT_RESPONDING = -22,
+ gcvSTATUS_TIMER_OVERFLOW = -23,
+ gcvSTATUS_VERSION_MISMATCH = -24,
+ gcvSTATUS_LOCKED = -25,
+ gcvSTATUS_INTERRUPTED = -26,
+ gcvSTATUS_DEVICE = -27,
+
+ /* Linker errors. */
+ gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
+ gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
+ gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
+ gcvSTATUS_TOO_MANY_VARYINGS = -1003,
+ gcvSTATUS_UNDECLARED_VARYING = -1004,
+ gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
+ gcvSTATUS_MISSING_MAIN = -1006,
+ gcvSTATUS_NAME_MISMATCH = -1007,
+ gcvSTATUS_INVALID_INDEX = -1008,
+ gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
+}
+gceSTATUS;
+
+/* Video memory pool type. */
+typedef enum _gcePOOL
+{
+ gcvPOOL_UNKNOWN = 0,
+ gcvPOOL_DEFAULT,
+ gcvPOOL_LOCAL,
+ gcvPOOL_LOCAL_INTERNAL,
+ gcvPOOL_LOCAL_EXTERNAL,
+ gcvPOOL_UNIFIED,
+ gcvPOOL_SYSTEM,
+ gcvPOOL_VIRTUAL,
+ gcvPOOL_USER,
+ gcvPOOL_CONTIGUOUS,
+
+ gcvPOOL_NUMBER_OF_POOLS
+}
+gcePOOL;
+
+/* Chip models. */
+typedef enum _gceCHIPMODEL
+{
+ gcv300 = 0x0300,
+ gcv320 = 0x0320,
+ gcv350 = 0x0350,
+ gcv355 = 0x0355,
+ gcv400 = 0x0400,
+ gcv410 = 0x0410,
+ gcv420 = 0x0420,
+ gcv450 = 0x0450,
+ gcv500 = 0x0500,
+ gcv530 = 0x0530,
+ gcv600 = 0x0600,
+ gcv700 = 0x0700,
+ gcv800 = 0x0800,
+ gcv860 = 0x0860,
+ gcv880 = 0x0880,
+ gcv1000 = 0x1000,
+ gcv2000 = 0x2000,
+ gcv2100 = 0x2100,
+ gcv4000 = 0x4000,
+}
+gceCHIPMODEL;
+
+/* Chip Power Status. */
+typedef enum _gceCHIPPOWERSTATE
+{
+ gcvPOWER_ON = 0,
+ gcvPOWER_OFF,
+ gcvPOWER_IDLE,
+ gcvPOWER_SUSPEND,
+ gcvPOWER_SUSPEND_ATPOWERON,
+ gcvPOWER_OFF_ATPOWERON,
+ gcvPOWER_IDLE_BROADCAST,
+ gcvPOWER_SUSPEND_BROADCAST,
+ gcvPOWER_OFF_BROADCAST,
+ gcvPOWER_OFF_RECOVERY,
+ gcvPOWER_OFF_TIMEOUT,
+ gcvPOWER_ON_AUTO
+}
+gceCHIPPOWERSTATE;
+
+/* CPU cache operations */
+typedef enum _gceCACHEOPERATION
+{
+ gcvCACHE_CLEAN = 0x01,
+ gcvCACHE_INVALIDATE = 0x02,
+ gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
+ gcvCACHE_MEMORY_BARRIER = 0x04
+}
+gceCACHEOPERATION;
+
+typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
+{
+ gcvVIDMEM_INFO_GENERIC,
+ gcvVIDMEM_INFO_DIRTY_RECTANGLE
+}
+gceVIDMEM_NODE_SHARED_INFO_TYPE;
+
+/* Surface types. */
+typedef enum _gceSURF_TYPE
+{
+ gcvSURF_TYPE_UNKNOWN = 0,
+ gcvSURF_INDEX,
+ gcvSURF_VERTEX,
+ gcvSURF_TEXTURE,
+ gcvSURF_RENDER_TARGET,
+ gcvSURF_DEPTH,
+ gcvSURF_BITMAP,
+ gcvSURF_TILE_STATUS,
+ gcvSURF_IMAGE,
+ gcvSURF_MASK,
+ gcvSURF_SCISSOR,
+ gcvSURF_HIERARCHICAL_DEPTH,
+ gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
+
+ /* Combinations. */
+ gcvSURF_NO_TILE_STATUS = 0x100,
+ gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
+ In Android, vidmem node is allocated by another process. */
+ gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
+
+ gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
+ | gcvSURF_NO_TILE_STATUS,
+
+ gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
+ | gcvSURF_NO_TILE_STATUS,
+
+ /* Supported surface types with no vidmem node. */
+ gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
+ | gcvSURF_NO_VIDMEM,
+
+ gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
+ | gcvSURF_NO_VIDMEM,
+
+ /* Cacheable surface types with no vidmem node. */
+ gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
+ | gcvSURF_CACHEABLE,
+
+ gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
+ | gcvSURF_CACHEABLE,
+}
+gceSURF_TYPE;
+
+/* Surface formats. */
+typedef enum _gceSURF_FORMAT
+{
+ /* Unknown format. */
+ gcvSURF_UNKNOWN = 0,
-#include "gc_hal_types.h"
+ /* Palettized formats. */
+ gcvSURF_INDEX1 = 100,
+ gcvSURF_INDEX4,
+ gcvSURF_INDEX8,
+ /* RGB formats. */
+ gcvSURF_A2R2G2B2 = 200,
+ gcvSURF_R3G3B2,
+ gcvSURF_A8R3G3B2,
+ gcvSURF_X4R4G4B4,
+ gcvSURF_A4R4G4B4,
+ gcvSURF_R4G4B4A4,
+ gcvSURF_X1R5G5B5,
+ gcvSURF_A1R5G5B5,
+ gcvSURF_R5G5B5A1,
+ gcvSURF_R5G6B5,
+ gcvSURF_R8G8B8,
+ gcvSURF_X8R8G8B8,
+ gcvSURF_A8R8G8B8,
+ gcvSURF_R8G8B8A8,
+ gcvSURF_G8R8G8B8,
+ gcvSURF_R8G8B8G8,
+ gcvSURF_X2R10G10B10,
+ gcvSURF_A2R10G10B10,
+ gcvSURF_X12R12G12B12,
+ gcvSURF_A12R12G12B12,
+ gcvSURF_X16R16G16B16,
+ gcvSURF_A16R16G16B16,
+ gcvSURF_A32R32G32B32,
+ gcvSURF_R8G8B8X8,
+ gcvSURF_R5G5B5X1,
+ gcvSURF_R4G4B4X4,
+
+ /* BGR formats. */
+ gcvSURF_A4B4G4R4 = 300,
+ gcvSURF_A1B5G5R5,
+ gcvSURF_B5G6R5,
+ gcvSURF_B8G8R8,
+ gcvSURF_B16G16R16,
+ gcvSURF_X8B8G8R8,
+ gcvSURF_A8B8G8R8,
+ gcvSURF_A2B10G10R10,
+ gcvSURF_X16B16G16R16,
+ gcvSURF_A16B16G16R16,
+ gcvSURF_B32G32R32,
+ gcvSURF_X32B32G32R32,
+ gcvSURF_A32B32G32R32,
+ gcvSURF_B4G4R4A4,
+ gcvSURF_B5G5R5A1,
+ gcvSURF_B8G8R8X8,
+ gcvSURF_B8G8R8A8,
+ gcvSURF_X4B4G4R4,
+ gcvSURF_X1B5G5R5,
+ gcvSURF_B4G4R4X4,
+ gcvSURF_B5G5R5X1,
+ gcvSURF_X2B10G10R10,
+
+ /* Compressed formats. */
+ gcvSURF_DXT1 = 400,
+ gcvSURF_DXT2,
+ gcvSURF_DXT3,
+ gcvSURF_DXT4,
+ gcvSURF_DXT5,
+ gcvSURF_CXV8U8,
+ gcvSURF_ETC1,
+
+ /* YUV formats. */
+ gcvSURF_YUY2 = 500,
+ gcvSURF_UYVY,
+ gcvSURF_YV12,
+ gcvSURF_I420,
+ gcvSURF_NV12,
+ gcvSURF_NV21,
+ gcvSURF_NV16,
+ gcvSURF_NV61,
+ gcvSURF_YVYU,
+ gcvSURF_VYUY,
+
+ /* Depth formats. */
+ gcvSURF_D16 = 600,
+ gcvSURF_D24S8,
+ gcvSURF_D32,
+ gcvSURF_D24X8,
+
+ /* Alpha formats. */
+ gcvSURF_A4 = 700,
+ gcvSURF_A8,
+ gcvSURF_A12,
+ gcvSURF_A16,
+ gcvSURF_A32,
+ gcvSURF_A1,
+
+ /* Luminance formats. */
+ gcvSURF_L4 = 800,
+ gcvSURF_L8,
+ gcvSURF_L12,
+ gcvSURF_L16,
+ gcvSURF_L32,
+ gcvSURF_L1,
+
+ /* Alpha/Luminance formats. */
+ gcvSURF_A4L4 = 900,
+ gcvSURF_A2L6,
+ gcvSURF_A8L8,
+ gcvSURF_A4L12,
+ gcvSURF_A12L12,
+ gcvSURF_A16L16,
+
+ /* Bump formats. */
+ gcvSURF_L6V5U5 = 1000,
+ gcvSURF_V8U8,
+ gcvSURF_X8L8V8U8,
+ gcvSURF_Q8W8V8U8,
+ gcvSURF_A2W10V10U10,
+ gcvSURF_V16U16,
+ gcvSURF_Q16W16V16U16,
+
+ /* R/RG/RA formats. */
+ gcvSURF_R8 = 1100,
+ gcvSURF_X8R8,
+ gcvSURF_G8R8,
+ gcvSURF_X8G8R8,
+ gcvSURF_A8R8,
+ gcvSURF_R16,
+ gcvSURF_X16R16,
+ gcvSURF_G16R16,
+ gcvSURF_X16G16R16,
+ gcvSURF_A16R16,
+ gcvSURF_R32,
+ gcvSURF_X32R32,
+ gcvSURF_G32R32,
+ gcvSURF_X32G32R32,
+ gcvSURF_A32R32,
+ gcvSURF_RG16,
+
+ /* Floating point formats. */
+ gcvSURF_R16F = 1200,
+ gcvSURF_X16R16F,
+ gcvSURF_G16R16F,
+ gcvSURF_X16G16R16F,
+ gcvSURF_B16G16R16F,
+ gcvSURF_X16B16G16R16F,
+ gcvSURF_A16B16G16R16F,
+ gcvSURF_R32F,
+ gcvSURF_X32R32F,
+ gcvSURF_G32R32F,
+ gcvSURF_X32G32R32F,
+ gcvSURF_B32G32R32F,
+ gcvSURF_X32B32G32R32F,
+ gcvSURF_A32B32G32R32F,
+ gcvSURF_A16F,
+ gcvSURF_L16F,
+ gcvSURF_A16L16F,
+ gcvSURF_A16R16F,
+ gcvSURF_A32F,
+ gcvSURF_L32F,
+ gcvSURF_A32L32F,
+ gcvSURF_A32R32F,
+
+}
+gceSURF_FORMAT;
+
+/* Pipes. */
+typedef enum _gcePIPE_SELECT
+{
+ gcvPIPE_INVALID = ~0,
+ gcvPIPE_3D = 0,
+ gcvPIPE_2D
+}
+gcePIPE_SELECT;
+
+/* Hardware type. */
+typedef enum _gceHARDWARE_TYPE
+{
+ gcvHARDWARE_INVALID = 0x00,
+ gcvHARDWARE_3D = 0x01,
+ gcvHARDWARE_2D = 0x02,
+ gcvHARDWARE_VG = 0x04,
+
+ gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
+}
+gceHARDWARE_TYPE;
+
+#define gcdCHIP_COUNT 3
+
+/* User signal command codes. */
+typedef enum _gceUSER_SIGNAL_COMMAND_CODES
+{
+ gcvUSER_SIGNAL_CREATE,
+ gcvUSER_SIGNAL_DESTROY,
+ gcvUSER_SIGNAL_SIGNAL,
+ gcvUSER_SIGNAL_WAIT,
+ gcvUSER_SIGNAL_MAP,
+ gcvUSER_SIGNAL_UNMAP,
+}
+gceUSER_SIGNAL_COMMAND_CODES;
+
+/* Event locations. */
+typedef enum _gceKERNEL_WHERE
+{
+ gcvKERNEL_COMMAND,
+ gcvKERNEL_VERTEX,
+ gcvKERNEL_TRIANGLE,
+ gcvKERNEL_TEXTURE,
+ gcvKERNEL_PIXEL,
+}
+gceKERNEL_WHERE;
+
+/* gcdDUMP message type. */
+typedef enum _gceDEBUG_MESSAGE_TYPE
+{
+ gcvMESSAGE_TEXT,
+ gcvMESSAGE_DUMP
+}
+gceDEBUG_MESSAGE_TYPE;
+
+/* Macro to combine four characters into a Character Code. */
+#define gcmCC(c1, c2, c3, c4) \
+( \
+ (char) (c1) \
+ | \
+ ((char) (c2) << 8) \
+ | \
+ ((char) (c3) << 16) \
+ | \
+ ((char) (c4) << 24) \
+)
/* Type of objects. */
typedef enum _gceOBJECT_TYPE
{
gcvOBJ_UNKNOWN = 0,
- gcvOBJ_2D = gcmCC('2','D',' ',' '),
- gcvOBJ_3D = gcmCC('3','D',' ',' '),
- gcvOBJ_ATTRIBUTE = gcmCC('A','T','T','R'),
- gcvOBJ_BRUSHCACHE = gcmCC('B','R','U','$'),
- gcvOBJ_BRUSHNODE = gcmCC('B','R','U','n'),
- gcvOBJ_BRUSH = gcmCC('B','R','U','o'),
gcvOBJ_BUFFER = gcmCC('B','U','F','R'),
gcvOBJ_COMMAND = gcmCC('C','M','D',' '),
gcvOBJ_COMMANDBUFFER = gcmCC('C','M','D','B'),
gcvOBJ_CONTEXT = gcmCC('C','T','X','T'),
gcvOBJ_DEVICE = gcmCC('D','E','V',' '),
- gcvOBJ_DUMP = gcmCC('D','U','M','P'),
gcvOBJ_EVENT = gcmCC('E','V','N','T'),
- gcvOBJ_FUNCTION = gcmCC('F','U','N','C'),
- gcvOBJ_HAL = gcmCC('H','A','L',' '),
gcvOBJ_HARDWARE = gcmCC('H','A','R','D'),
- gcvOBJ_HEAP = gcmCC('H','E','A','P'),
- gcvOBJ_INDEX = gcmCC('I','N','D','X'),
- gcvOBJ_INTERRUPT = gcmCC('I','N','T','R'),
gcvOBJ_KERNEL = gcmCC('K','E','R','N'),
- gcvOBJ_KERNEL_FUNCTION = gcmCC('K','F','C','N'),
- gcvOBJ_MEMORYBUFFER = gcmCC('M','E','M','B'),
gcvOBJ_MMU = gcmCC('M','M','U',' '),
gcvOBJ_OS = gcmCC('O','S',' ',' '),
- gcvOBJ_OUTPUT = gcmCC('O','U','T','P'),
- gcvOBJ_PAINT = gcmCC('P','N','T',' '),
- gcvOBJ_PATH = gcmCC('P','A','T','H'),
- gcvOBJ_QUEUE = gcmCC('Q','U','E',' '),
- gcvOBJ_SAMPLER = gcmCC('S','A','M','P'),
- gcvOBJ_SHADER = gcmCC('S','H','D','R'),
- gcvOBJ_STREAM = gcmCC('S','T','R','M'),
- gcvOBJ_SURF = gcmCC('S','U','R','F'),
- gcvOBJ_TEXTURE = gcmCC('T','X','T','R'),
- gcvOBJ_UNIFORM = gcmCC('U','N','I','F'),
- gcvOBJ_VARIABLE = gcmCC('V','A','R','I'),
- gcvOBJ_VERTEX = gcmCC('V','R','T','X'),
gcvOBJ_VIDMEM = gcmCC('V','M','E','M'),
- gcvOBJ_VG = gcmCC('V','G',' ',' '),
}
gceOBJECT_TYPE;
+/******************************************************************************\
+****************************** Interface Structure *****************************
+\******************************************************************************/
+
+/* Kernel settings. */
+typedef struct _gcsKERNEL_SETTINGS
+{
+ /* Used RealTime signal between kernel and user. */
+ int signal;
+}
+gcsKERNEL_SETTINGS;
+
+
+/* gcvHAL_QUERY_CHIP_IDENTITY */
+typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
+{
+
+ /* Chip model. */
+ gceCHIPMODEL chipModel;
+
+ /* Revision value.*/
+ __u32 chipRevision;
+
+ /* Supported feature fields. */
+ __u32 chipFeatures;
+
+ /* Supported minor feature fields. */
+ __u32 chipMinorFeatures;
+
+ /* Supported minor feature 1 fields. */
+ __u32 chipMinorFeatures1;
+
+ /* Supported minor feature 2 fields. */
+ __u32 chipMinorFeatures2;
+
+ /* Supported minor feature 3 fields. */
+ __u32 chipMinorFeatures3;
+
+ /* Number of streams supported. */
+ __u32 streamCount;
+
+ /* Total number of temporary registers per thread. */
+ __u32 registerMax;
+
+ /* Maximum number of threads. */
+ __u32 threadCount;
+
+ /* Number of shader cores. */
+ __u32 shaderCoreCount;
+
+ /* Size of the vertex cache. */
+ __u32 vertexCacheSize;
+
+ /* Number of entries in the vertex output buffer. */
+ __u32 vertexOutputBufferSize;
+
+ /* Number of pixel pipes. */
+ __u32 pixelPipes;
+
+ /* Number of instructions. */
+ __u32 instructionCount;
+
+ /* Number of constants. */
+ __u32 numConstants;
+
+ /* Buffer size */
+ __u32 bufferSize;
+
+}
+gcsHAL_QUERY_CHIP_IDENTITY;
+
+/* gcvHAL_COMPOSE. */
+typedef struct _gcsHAL_COMPOSE
+{
+ /* Composition state buffer. */
+ gctPHYS_ADDR physical;
+ void * logical;
+ size_t offset;
+ size_t size;
+
+ /* Composition end signal. */
+ gctHANDLE process;
+ gctSIGNAL signal;
+
+ /* User signals. */
+ gctHANDLE userProcess;
+ gctSIGNAL userSignal1;
+ gctSIGNAL userSignal2;
+}
+gcsHAL_COMPOSE;
+
+/* HW profile information. */
+typedef struct _gcsPROFILER_COUNTERS
+{
+ /* HW static counters. */
+ VIV_DUMMY(__u32, gpuClock);
+ VIV_DUMMY(__u32, axiClock);
+ VIV_DUMMY(__u32, shaderClock);
+
+ /* HW vairable counters. */
+ VIV_DUMMY(__u32, gpuClockStart);
+ VIV_DUMMY(__u32, gpuClockEnd);
+
+ /* HW vairable counters. */
+ __u32 gpuCyclesCounter;
+ __u32 gpuTotalRead64BytesPerFrame;
+ __u32 gpuTotalWrite64BytesPerFrame;
+
+ /* PE */
+ __u32 pe_pixel_count_killed_by_color_pipe;
+ __u32 pe_pixel_count_killed_by_depth_pipe;
+ __u32 pe_pixel_count_drawn_by_color_pipe;
+ __u32 pe_pixel_count_drawn_by_depth_pipe;
+
+ /* SH */
+ __u32 ps_inst_counter;
+ __u32 rendered_pixel_counter;
+ __u32 vs_inst_counter;
+ __u32 rendered_vertice_counter;
+ __u32 vtx_branch_inst_counter;
+ __u32 vtx_texld_inst_counter;
+ __u32 pxl_branch_inst_counter;
+ __u32 pxl_texld_inst_counter;
+
+ /* PA */
+ __u32 pa_input_vtx_counter;
+ __u32 pa_input_prim_counter;
+ __u32 pa_output_prim_counter;
+ __u32 pa_depth_clipped_counter;
+ __u32 pa_trivial_rejected_counter;
+ __u32 pa_culled_counter;
+
+ /* SE */
+ __u32 se_culled_triangle_count;
+ __u32 se_culled_lines_count;
+
+ /* RA */
+ __u32 ra_valid_pixel_count;
+ __u32 ra_total_quad_count;
+ __u32 ra_valid_quad_count_after_early_z;
+ __u32 ra_total_primitive_count;
+ __u32 ra_pipe_cache_miss_counter;
+ __u32 ra_prefetch_cache_miss_counter;
+ __u32 ra_eez_culled_counter;
+
+ /* TX */
+ __u32 tx_total_bilinear_requests;
+ __u32 tx_total_trilinear_requests;
+ __u32 tx_total_discarded_texture_requests;
+ __u32 tx_total_texture_requests;
+ __u32 tx_mem_read_count;
+ __u32 tx_mem_read_in_8B_count;
+ __u32 tx_cache_miss_count;
+ __u32 tx_cache_hit_texel_count;
+ __u32 tx_cache_miss_texel_count;
+
+ /* MC */
+ __u32 mc_total_read_req_8B_from_pipeline;
+ __u32 mc_total_read_req_8B_from_IP;
+ __u32 mc_total_write_req_8B_from_pipeline;
+
+ /* HI */
+ __u32 hi_axi_cycles_read_request_stalled;
+ __u32 hi_axi_cycles_write_request_stalled;
+ __u32 hi_axi_cycles_write_data_stalled;
+}
+gcsPROFILER_COUNTERS;
+
+/* 2D Engine profile. */
+typedef struct _gcs2D_PROFILE
+{
+ /* Cycle count.
+ 32bit counter incremented every 2D clock cycle.
+ Wraps back to 0 when the counter overflows.
+ */
+ __u32 cycleCount;
+
+ /* Pixels rendered by the 2D engine.
+ Resets to 0 every time it is read. */
+ __u32 pixelsRendered;
+}
+gcs2D_PROFILE;
+
+typedef struct _gcsDATABASE_COUNTERS
+{
+ /* Number of currently allocated bytes. */
+ size_t bytes;
+
+ /* Maximum number of bytes allocated (memory footprint). */
+ size_t maxBytes;
+
+ /* Total number of bytes allocated. */
+ size_t totalBytes;
+}
+gcsDATABASE_COUNTERS;
+
+typedef struct _gcuDATABASE_INFO
+{
+ /* Counters. */
+ gcsDATABASE_COUNTERS counters;
+
+ /* Time value. */
+ __u64 time;
+}
+gcuDATABASE_INFO;
+
+/* gcsHAL_FRAME_INFO */
+typedef struct _gcsHAL_FRAME_INFO
+{
+ /* Current timer tick. */
+ OUT __u64 ticks;
+
+ /* Bandwidth counters. */
+ OUT unsigned int readBytes8[8];
+ OUT unsigned int writeBytes8[8];
+
+ /* Counters. */
+ OUT unsigned int cycles[8];
+ OUT unsigned int idleCycles[8];
+ OUT unsigned int mcCycles[8];
+ OUT unsigned int readRequests[8];
+ OUT unsigned int writeRequests[8];
+
+ /* 3D counters. */
+ OUT unsigned int vertexCount;
+ OUT unsigned int primitiveCount;
+ OUT unsigned int rejectedPrimitives;
+ OUT unsigned int culledPrimitives;
+ OUT unsigned int clippedPrimitives;
+ OUT unsigned int outPrimitives;
+ OUT unsigned int inPrimitives;
+ OUT unsigned int culledQuadCount;
+ OUT unsigned int totalQuadCount;
+ OUT unsigned int quadCount;
+ OUT unsigned int totalPixelCount;
+
+ /* PE counters. */
+ OUT unsigned int colorKilled[8];
+ OUT unsigned int colorDrawn[8];
+ OUT unsigned int depthKilled[8];
+ OUT unsigned int depthDrawn[8];
+
+ /* Shader counters. */
+ OUT unsigned int shaderCycles;
+ OUT unsigned int vsInstructionCount;
+ OUT unsigned int vsTextureCount;
+ OUT unsigned int psInstructionCount;
+ OUT unsigned int psTextureCount;
+
+ /* Texture counters. */
+ OUT unsigned int bilinearRequests;
+ OUT unsigned int trilinearRequests;
+ OUT unsigned int txBytes8;
+ OUT unsigned int txHitCount;
+ OUT unsigned int txMissCount;
+}
+gcsHAL_FRAME_INFO;
+
/* gcsOBJECT object defintinon. */
typedef struct _gcsOBJECT
{
@@ -80,4 +906,690 @@ typedef struct _gcsOBJECT
}
gcsOBJECT;
+/* State delta record. */
+typedef struct _gcsSTATE_DELTA_RECORD
+{
+ /* State address. */
+ unsigned int address;
+
+ /* State mask. */
+ __u32 mask;
+
+ /* State data. */
+ __u32 data;
+}
+gcsSTATE_DELTA_RECORD;
+
+/* State delta. */
+typedef struct _gcsSTATE_DELTA
+{
+ /* Main state delta ID. Every time state delta structure gets reinitialized,
+ main ID is incremented. If main state ID overflows, all map entry IDs get
+ reinitialized to make sure there is no potential erroneous match after
+ the overflow.*/
+ unsigned int id;
+
+ /* The number of contexts pending modification by the delta. */
+ int refCount;
+
+ /* Vertex element count for the delta buffer. */
+ unsigned int elementCount;
+
+ /* Number of states currently stored in the record array. */
+ unsigned int recordCount;
+
+ /* Record array; holds all modified states. */
+ struct _gcsSTATE_DELTA_RECORD *recordArray;
+
+ VIV_DUMMY(unsigned int *, mapEntryID);
+ VIV_DUMMY(unsigned int , mapEntryIDSize);
+ VIV_DUMMY(unsigned int *, mapEntryIndex);
+
+ /* Previous and next state deltas. */
+ struct _gcsSTATE_DELTA * prev;
+ struct _gcsSTATE_DELTA * next;
+}
+gcsSTATE_DELTA;
+
+/* Command buffer object. */
+struct _gcoCMDBUF
+{
+ /* The object. */
+ gcsOBJECT object;
+
+ /* Command buffer entry and exit pipes. */
+ gcePIPE_SELECT entryPipe;
+ gcePIPE_SELECT exitPipe;
+
+ /* Feature usage flags. */
+ int using2D;
+ int using3D;
+ VIV_DUMMY(int, usingFilterBlit);
+ VIV_DUMMY(int, usingPalette);
+
+ /* Physical address of command buffer. */
+ VIV_DUMMY(gctPHYS_ADDR, physical);
+
+ /* Logical address of command buffer. */
+ void * logical;
+
+ /* Number of bytes in command buffer. */
+ size_t bytes_dummy;
+
+ /* Start offset into the command buffer. */
+ __u32 startOffset;
+
+ /* Current offset into the command buffer. */
+ __u32 offset;
+
+ /* Number of free bytes in command buffer. */
+ VIV_DUMMY(size_t, free);
+ VIV_DUMMY(void *, lastReserve);
+ VIV_DUMMY(unsigned int, lastOffset);
+
+#if gcdSECURE_USER
+ /* Hint array for the current command buffer. */
+ unsigned int hintArraySize;
+ __u32 * hintArray;
+ __u32 * hintArrayTail;
+#endif
+};
+
+/******************************************************************************\
+*************************** Interface structure *******************************
+\******************************************************************************/
+
+typedef struct _gcsHAL_INTERFACE
+{
+ /* Command code. */
+ gceHAL_COMMAND_CODES command;
+
+ /* Hardware type. */
+ gceHARDWARE_TYPE hardwareType;
+
+ /* Status value. */
+ gceSTATUS status;
+
+ VIV_DUMMY(gctHANDLE, handle);
+ VIV_DUMMY(__u32, pid);
+
+ /* Union of command structures. */
+ union _u
+ {
+ /* gcvHAL_GET_BASE_ADDRESS */
+ struct _gcsHAL_GET_BASE_ADDRESS
+ {
+ /* Physical memory address of internal memory. */
+ OUT __u32 baseAddress;
+ }
+ GetBaseAddress;
+
+ /* gcvHAL_QUERY_VIDEO_MEMORY */
+ struct _gcsHAL_QUERY_VIDEO_MEMORY
+ {
+ /* Physical memory address of internal memory. */
+ OUT gctPHYS_ADDR internalPhysical;
+
+ /* Size in bytes of internal memory.*/
+ OUT size_t internalSize;
+
+ /* Physical memory address of external memory. */
+ OUT gctPHYS_ADDR externalPhysical;
+
+ /* Size in bytes of external memory.*/
+ OUT size_t externalSize;
+
+ /* Physical memory address of contiguous memory. */
+ OUT gctPHYS_ADDR contiguousPhysical;
+
+ /* Size in bytes of contiguous memory.*/
+ OUT size_t contiguousSize;
+ }
+ QueryVideoMemory;
+
+ /* gcvHAL_QUERY_CHIP_IDENTITY */
+ gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
+
+ /* gcvHAL_MAP_MEMORY */
+ struct _gcsHAL_MAP_MEMORY
+ {
+ /* Physical memory address to map. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to map. */
+ IN size_t bytes;
+
+ /* Address of mapped memory. */
+ OUT void * logical;
+ }
+ MapMemory;
+
+ /* gcvHAL_UNMAP_MEMORY */
+ struct _gcsHAL_UNMAP_MEMORY
+ {
+ /* Physical memory address to unmap. */
+ IN gctPHYS_ADDR physical;
+
+ /* Number of bytes in physical memory to unmap. */
+ IN size_t bytes;
+
+ /* Address of mapped memory to unmap. */
+ IN void * logical;
+ }
+ UnmapMemory;
+
+ /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
+ struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT unsigned int bytes;
+
+ /* Buffer alignment. */
+ IN unsigned int alignment;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }
+ AllocateLinearVideoMemory;
+
+ /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
+ VIV_DUMMY(struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
+ {
+ /* Width of rectangle to allocate. */
+ IN OUT unsigned int width;
+
+ /* Height of rectangle to allocate. */
+ IN OUT unsigned int height;
+
+ /* Depth of rectangle to allocate. */
+ IN unsigned int depth;
+
+ /* Format rectangle to allocate in gceSURF_FORMAT. */
+ IN gceSURF_FORMAT format;
+
+ /* Type of allocation. */
+ IN gceSURF_TYPE type;
+
+ /* Memory pool to allocate from. */
+ IN OUT gcePOOL pool;
+
+ /* Allocated video memory. */
+ OUT gcuVIDMEM_NODE_PTR node;
+ }, AllocateVideoMemory);
+
+ /* gcvHAL_FREE_VIDEO_MEMORY */
+ struct _gcsHAL_FREE_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ FreeVideoMemory;
+
+ /* gcvHAL_LOCK_VIDEO_MEMORY */
+ struct _gcsHAL_LOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Cache configuration. */
+ /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
+ ** can be configured */
+ IN int cacheable;
+
+ /* Hardware specific address. */
+ OUT __u32 address;
+
+ /* Mapped logical address. */
+ OUT void * memory;
+ }
+ LockVideoMemory;
+
+ /* gcvHAL_UNLOCK_VIDEO_MEMORY */
+ struct _gcsHAL_UNLOCK_VIDEO_MEMORY
+ {
+ /* Allocated video memory. */
+ IN gcuVIDMEM_NODE_PTR node;
+
+ /* Type of surface. */
+ IN gceSURF_TYPE type;
+
+ /* Flag to unlock surface asynchroneously. */
+ IN OUT int asynchroneous;
+ }
+ UnlockVideoMemory;
+
+ /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
+ struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT size_t bytes;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT void * logical;
+ }
+ AllocateNonPagedMemory;
+
+ /* gcvHAL_FREE_NON_PAGED_MEMORY */
+ struct _gcsHAL_FREE_NON_PAGED_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN size_t bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN void * logical;
+ }
+ FreeNonPagedMemory;
+
+ /* gcvHAL_EVENT_COMMIT. */
+ struct _gcsHAL_EVENT_COMMIT
+ {
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Event;
+
+ /* gcvHAL_COMMIT */
+ struct _gcsHAL_COMMIT
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+
+ /* Command buffer. */
+ IN gcoCMDBUF commandBuffer;
+
+ /* State delta buffer. */
+ struct _gcsSTATE_DELTA * delta;
+
+ /* Event queue. */
+ IN struct _gcsQUEUE * queue;
+ }
+ Commit;
+
+ /* gcvHAL_MAP_USER_MEMORY */
+ struct _gcsHAL_MAP_USER_MEMORY
+ {
+ /* Base address of user memory to map. */
+ IN void * memory;
+
+ /* Size of user memory in bytes to map. */
+ IN size_t size;
+
+ /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
+ OUT void * info;
+
+ /* Physical address of mapped memory. */
+ OUT __u32 address;
+ }
+ MapUserMemory;
+
+ /* gcvHAL_UNMAP_USER_MEMORY */
+ struct _gcsHAL_UNMAP_USER_MEMORY
+ {
+ /* Base address of user memory to unmap. */
+ IN void * memory;
+
+ /* Size of user memory in bytes to unmap. */
+ IN size_t size;
+
+ /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
+ IN void * info;
+
+ /* Physical address of mapped memory as returned by
+ gcvHAL_MAP_USER_MEMORY. */
+ IN __u32 address;
+ }
+ UnmapUserMemory;
+
+ /* gcsHAL_USER_SIGNAL */
+ struct _gcsHAL_USER_SIGNAL
+ {
+ /* Command. */
+ gceUSER_SIGNAL_COMMAND_CODES command;
+
+ /* Signal ID. */
+ IN OUT int id;
+
+ /* Reset mode. */
+ IN int manualReset;
+
+ /* Wait timedout. */
+ IN __u32 wait;
+
+ /* State. */
+ IN int state;
+ }
+ UserSignal;
+
+ /* gcvHAL_SIGNAL. */
+ struct _gcsHAL_SIGNAL
+ {
+ /* Signal handle to signal. */
+ IN gctSIGNAL signal;
+
+ /* Reserved. */
+ IN gctSIGNAL auxSignal;
+
+ /* Process owning the signal. */
+ IN gctHANDLE process;
+
+ /* Event generated from where of pipeline */
+ IN gceKERNEL_WHERE fromWhere;
+ }
+ Signal;
+
+ /* gcvHAL_WRITE_DATA. */
+ struct _gcsHAL_WRITE_DATA
+ {
+ /* Address to write data to. */
+ IN __u32 address;
+
+ /* Data to write. */
+ IN __u32 data;
+ }
+ WriteData;
+
+ /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes to allocate. */
+ IN OUT size_t bytes;
+
+ /* Hardware address of allocation. */
+ OUT __u32 address;
+
+ /* Physical address of allocation. */
+ OUT gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ OUT void * logical;
+ }
+ AllocateContiguousMemory;
+
+ /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
+ struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
+ {
+ /* Number of bytes allocated. */
+ IN size_t bytes;
+
+ /* Physical address of allocation. */
+ IN gctPHYS_ADDR physical;
+
+ /* Logical address of allocation. */
+ IN void * logical;
+ }
+ FreeContiguousMemory;
+
+ /* gcvHAL_READ_REGISTER */
+ struct _gcsHAL_READ_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN __u32 address;
+
+ /* Data read. */
+ OUT __u32 data;
+ }
+ ReadRegisterData;
+
+ /* gcvHAL_WRITE_REGISTER */
+ struct _gcsHAL_WRITE_REGISTER
+ {
+ /* Logical address of memory to write data to. */
+ IN __u32 address;
+
+ /* Data read. */
+ IN __u32 data;
+ }
+ WriteRegisterData;
+
+#if VIVANTE_PROFILER
+ /* gcvHAL_GET_PROFILE_SETTING */
+ VIV_DUMMY(struct _gcsHAL_GET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ OUT int enable;
+
+ /* The profile file name */
+ OUT char fileName[gcdMAX_PROFILE_FILE_NAME];
+ }, GetProfileSetting);
+
+ /* gcvHAL_SET_PROFILE_SETTING */
+ VIV_DUMMY(struct _gcsHAL_SET_PROFILE_SETTING
+ {
+ /* Enable profiling */
+ IN int enable;
+
+ /* The profile file name */
+ IN char fileName[gcdMAX_PROFILE_FILE_NAME];
+ }, SetProfileSetting);
+
+ /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
+ struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
+ {
+ /* Data read. */
+ OUT gcsPROFILER_COUNTERS counters;
+ }
+ RegisterProfileData;
+
+ /* gcvHAL_PROFILE_REGISTERS_2D */
+ struct _gcsHAL_PROFILE_REGISTERS_2D
+ {
+ /* Data read. */
+ OUT struct _gcs2D_PROFILE * hwProfile2D;
+ }
+ RegisterProfileData2D;
+#endif
+ /* Power management. */
+ /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_SET_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ IN gceCHIPPOWERSTATE state;
+ }
+ SetPowerManagement;
+
+ /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
+ struct _gcsHAL_QUERY_POWER_MANAGEMENT
+ {
+ /* Data read. */
+ OUT gceCHIPPOWERSTATE state;
+
+ /* Idle query. */
+ OUT int isIdle;
+ }
+ QueryPowerManagement;
+
+ /* gcvHAL_QUERY_KERNEL_SETTINGS */
+ struct _gcsHAL_QUERY_KERNEL_SETTINGS
+ {
+ /* Settings.*/
+ OUT gcsKERNEL_SETTINGS settings;
+ }
+ QueryKernelSettings;
+
+ /* gcvHAL_MAP_PHYSICAL */
+ VIV_DUMMY(struct _gcsHAL_MAP_PHYSICAL
+ {
+ /* gcvTRUE to map, gcvFALSE to unmap. */
+ IN int map;
+
+ /* Physical address. */
+ IN OUT gctPHYS_ADDR physical;
+ }, MapPhysical);
+
+ /* gcvHAL_DEBUG */
+ struct _gcsHAL_DEBUG
+ {
+ /* If gcvTRUE, set the debug information. */
+ IN int set;
+ IN __u32 level;
+ IN __u32 zones;
+ IN int enable;
+
+ IN gceDEBUG_MESSAGE_TYPE type;
+ IN __u32 messageSize;
+
+ /* Message to print if not empty. */
+ IN char message[80];
+ }
+ Debug;
+
+ /* gcvHAL_CACHE */
+ struct _gcsHAL_CACHE
+ {
+ IN gceCACHEOPERATION operation;
+ IN gctHANDLE process;
+ IN void * logical;
+ IN size_t bytes;
+ IN gcuVIDMEM_NODE_PTR node;
+ }
+ Cache;
+
+ /* gcvHAL_TIMESTAMP */
+ struct _gcsHAL_TIMESTAMP
+ {
+ /* Timer select. */
+ IN __u32 timer;
+
+ /* Timer request type (0-stop, 1-start, 2-send delta). */
+ IN __u32 request;
+
+ /* Result of delta time in microseconds. */
+ OUT __s32 timeDelta;
+ }
+ TimeStamp;
+
+ /* gcvHAL_DATABASE */
+ struct _gcsHAL_DATABASE
+ {
+ /* Set to gcvTRUE if you want to query a particular process ID.
+ ** Set to gcvFALSE to query the last detached process. */
+ IN int validProcessID;
+
+ /* Process ID to query. */
+ IN __u32 processID;
+
+ /* Information. */
+ OUT gcuDATABASE_INFO vidMem;
+ OUT gcuDATABASE_INFO nonPaged;
+ OUT gcuDATABASE_INFO contiguous;
+ OUT gcuDATABASE_INFO gpuIdle;
+ }
+ Database;
+
+ /* gcvHAL_VERSION */
+ struct _gcsHAL_VERSION
+ {
+ /* Major version: N.n.n. */
+ OUT __s32 major;
+
+ /* Minor version: n.N.n. */
+ OUT __s32 minor;
+
+ /* Patch version: n.n.N. */
+ OUT __s32 patch;
+
+ /* Build version. */
+ OUT __u32 build;
+ }
+ Version;
+
+ /* gcvHAL_CHIP_INFO */
+ struct _gcsHAL_CHIP_INFO
+ {
+ /* Chip count. */
+ OUT __s32 count;
+
+ /* Chip types. */
+ OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
+ }
+ ChipInfo;
+
+ /* gcvHAL_ATTACH */
+ struct _gcsHAL_ATTACH
+ {
+ /* Context buffer object. */
+ OUT gckCONTEXT context;
+
+ /* Number of states in the buffer. */
+ OUT size_t stateCount;
+ }
+ Attach;
+
+ /* gcvHAL_DETACH */
+ struct _gcsHAL_DETACH
+ {
+ /* Context buffer object. */
+ IN gckCONTEXT context;
+ }
+ Detach;
+
+ /* gcvHAL_COMPOSE. */
+ gcsHAL_COMPOSE Compose;
+
+ /* gcvHAL_GET_FRAME_INFO. */
+ struct _gcsHAL_GET_FRAME_INFO
+ {
+ OUT gcsHAL_FRAME_INFO * frameInfo;
+ }
+ GetFrameInfo;
+
+ /* gcvHAL_SET_TIME_OUT. */
+ struct _gcsHAL_SET_TIMEOUT
+ {
+ __u32 timeOut;
+ }
+ SetTimeOut;
+
+ struct _gcsHAL_GET_SHARED_INFO
+ {
+ IN __u32 pid;
+ IN __u32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ OUT __u8 * data;
+ /* fix size */
+ OUT __u8 * nodeData;
+ size_t size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ GetSharedInfo;
+
+ struct _gcsHAL_SET_SHARED_INFO
+ {
+ IN __u32 dataId;
+ IN gcuVIDMEM_NODE_PTR node;
+ IN __u8 * data;
+ IN __u8 * nodeData;
+ IN size_t size;
+ IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
+ }
+ SetSharedInfo;
+ }
+ u;
+}
+gcsHAL_INTERFACE;
+
+typedef struct _gcsQUEUE
+{
+ /* Pointer to next gcsQUEUE structure. */
+ struct _gcsQUEUE * next;
+
+ /* Event information. */
+ gcsHAL_INTERFACE iface;
+}
+gcsQUEUE;
+
+#undef VIV_DUMMY
+
#endif /* __gc_hal_h_ */
diff --git a/native/include_v4_uapi/gc_hal_base.h b/native/include_v4_uapi/gc_hal_base.h
deleted file mode 100644
index fdcb76e..0000000
--- a/native/include_v4_uapi/gc_hal_base.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-
-
-#ifndef __gc_hal_base_h_
-#define __gc_hal_base_h_
-
-#include "gc_hal_options.h"
-
-
-/******************************************************************************\
-****************************** Object Declarations *****************************
-\******************************************************************************/
-
-typedef union _gcuVIDMEM_NODE * gcuVIDMEM_NODE_PTR;
-
-/******************************************************************************\
-********************************* Enumerations *********************************
-\******************************************************************************/
-
-typedef enum _gcePLS_VALUE
-{
- gcePLS_VALUE_EGL_DISPLAY_INFO,
- gcePLS_VALUE_EGL_SURFACE_INFO
-}
-gcePLS_VALUE;
-
-/* Video memory pool type. */
-typedef enum _gcePOOL
-{
- gcvPOOL_UNKNOWN = 0,
- gcvPOOL_DEFAULT,
- gcvPOOL_LOCAL,
- gcvPOOL_LOCAL_INTERNAL,
- gcvPOOL_LOCAL_EXTERNAL,
- gcvPOOL_UNIFIED,
- gcvPOOL_SYSTEM,
- gcvPOOL_VIRTUAL,
- gcvPOOL_USER,
- gcvPOOL_CONTIGUOUS,
-
- gcvPOOL_NUMBER_OF_POOLS
-}
-gcePOOL;
-
-#if !VIVANTE_NO_3D
-/* Blending functions. */
-typedef enum _gceBLEND_FUNCTION
-{
- gcvBLEND_ZERO,
- gcvBLEND_ONE,
- gcvBLEND_SOURCE_COLOR,
- gcvBLEND_INV_SOURCE_COLOR,
- gcvBLEND_SOURCE_ALPHA,
- gcvBLEND_INV_SOURCE_ALPHA,
- gcvBLEND_TARGET_COLOR,
- gcvBLEND_INV_TARGET_COLOR,
- gcvBLEND_TARGET_ALPHA,
- gcvBLEND_INV_TARGET_ALPHA,
- gcvBLEND_SOURCE_ALPHA_SATURATE,
- gcvBLEND_CONST_COLOR,
- gcvBLEND_INV_CONST_COLOR,
- gcvBLEND_CONST_ALPHA,
- gcvBLEND_INV_CONST_ALPHA,
-}
-gceBLEND_FUNCTION;
-
-/* Blending modes. */
-typedef enum _gceBLEND_MODE
-{
- gcvBLEND_ADD,
- gcvBLEND_SUBTRACT,
- gcvBLEND_REVERSE_SUBTRACT,
- gcvBLEND_MIN,
- gcvBLEND_MAX,
-}
-gceBLEND_MODE;
-
-/* API flags. */
-typedef enum _gceAPI
-{
- gcvAPI_D3D = 0x1,
- gcvAPI_OPENGL = 0x2,
- gcvAPI_OPENVG = 0x3,
- gcvAPI_OPENCL = 0x4,
-}
-gceAPI;
-
-/* Depth modes. */
-typedef enum _gceDEPTH_MODE
-{
- gcvDEPTH_NONE,
- gcvDEPTH_Z,
- gcvDEPTH_W,
-}
-gceDEPTH_MODE;
-#endif /* VIVANTE_NO_3D */
-
-typedef enum _gceWHERE
-{
- gcvWHERE_COMMAND,
- gcvWHERE_RASTER,
- gcvWHERE_PIXEL,
-}
-gceWHERE;
-
-typedef enum _gceHOW
-{
- gcvHOW_SEMAPHORE = 0x1,
- gcvHOW_STALL = 0x2,
- gcvHOW_SEMAPHORE_STALL = 0x3,
-}
-gceHOW;
-
-typedef enum _gceSignalHandlerType
-{
- gcvHANDLE_SIGFPE_WHEN_SIGNAL_CODE_IS_0 = 0x1,
-}
-gceSignalHandlerType;
-
-#endif /* __gc_hal_base_h_ */
diff --git a/native/include_v4_uapi/gc_hal_driver.h b/native/include_v4_uapi/gc_hal_driver.h
deleted file mode 100644
index fcfc92a..0000000
--- a/native/include_v4_uapi/gc_hal_driver.h
+++ /dev/null
@@ -1,835 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-
-
-#ifndef __gc_hal_driver_h_
-#define __gc_hal_driver_h_
-
-#include "gc_hal_enum.h"
-#include "gc_hal_types.h"
-#include "gc_hal_profiler.h"
-
-/******************************************************************************\
-******************************* I/O Control Codes ******************************
-\******************************************************************************/
-
-#define IOCTL_GCHAL_INTERFACE 30000
-#define IOCTL_GCHAL_KERNEL_INTERFACE 30001
-#define IOCTL_GCHAL_TERMINATE 30002
-
-/******************************************************************************\
-********************************* Command Codes ********************************
-\******************************************************************************/
-
-typedef enum _gceHAL_COMMAND_CODES
-{
- /* Generic query. */
- gcvHAL_QUERY_VIDEO_MEMORY,
- gcvHAL_QUERY_CHIP_IDENTITY,
-
- /* Contiguous memory. */
- gcvHAL_ALLOCATE_NON_PAGED_MEMORY,
- gcvHAL_FREE_NON_PAGED_MEMORY,
- gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY,
- gcvHAL_FREE_CONTIGUOUS_MEMORY,
-
- /* Video memory allocation. */
- gcvHAL_ALLOCATE_VIDEO_MEMORY, /* Enforced alignment. */
- gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY, /* No alignment. */
- gcvHAL_FREE_VIDEO_MEMORY,
-
- /* Physical-to-logical mapping. */
- gcvHAL_MAP_MEMORY,
- gcvHAL_UNMAP_MEMORY,
-
- /* Logical-to-physical mapping. */
- gcvHAL_MAP_USER_MEMORY,
- gcvHAL_UNMAP_USER_MEMORY,
-
- /* Surface lock/unlock. */
- gcvHAL_LOCK_VIDEO_MEMORY,
- gcvHAL_UNLOCK_VIDEO_MEMORY,
-
- /* Event queue. */
- gcvHAL_EVENT_COMMIT,
-
- gcvHAL_USER_SIGNAL,
- gcvHAL_SIGNAL,
- gcvHAL_WRITE_DATA,
-
- gcvHAL_COMMIT,
- gcvHAL_STALL,
-
- gcvHAL_READ_REGISTER,
- gcvHAL_WRITE_REGISTER,
-
- gcvHAL_GET_PROFILE_SETTING,
- gcvHAL_SET_PROFILE_SETTING,
-
- gcvHAL_READ_ALL_PROFILE_REGISTERS,
- gcvHAL_PROFILE_REGISTERS_2D,
-
- /* Power management. */
- gcvHAL_SET_POWER_MANAGEMENT_STATE,
- gcvHAL_QUERY_POWER_MANAGEMENT_STATE,
-
- gcvHAL_GET_BASE_ADDRESS,
-
- gcvHAL_SET_IDLE, /* reserved */
-
- /* Queries. */
- gcvHAL_QUERY_KERNEL_SETTINGS,
-
- /* Reset. */
- gcvHAL_RESET,
-
- /* Map physical address into handle. */
- gcvHAL_MAP_PHYSICAL,
-
- /* Debugger stuff. */
- gcvHAL_DEBUG,
-
- /* Cache stuff. */
- gcvHAL_CACHE,
-
- /* TimeStamp */
- gcvHAL_TIMESTAMP,
-
- /* Database. */
- gcvHAL_DATABASE,
-
- /* Version. */
- gcvHAL_VERSION,
-
- /* Chip info */
- gcvHAL_CHIP_INFO,
-
- /* Process attaching/detaching. */
- gcvHAL_ATTACH,
- gcvHAL_DETACH,
-
- /* Composition. */
- gcvHAL_COMPOSE,
-
- /* Set timeOut value */
- gcvHAL_SET_TIMEOUT,
-
- /* Frame database. */
- gcvHAL_GET_FRAME_INFO,
-
- /* Shared info for each process */
- gcvHAL_GET_SHARED_INFO,
- gcvHAL_SET_SHARED_INFO,
- gcvHAL_QUERY_COMMAND_BUFFER,
-
- gcvHAL_COMMIT_DONE,
-
- /* GPU and event dump */
- gcvHAL_DUMP_GPU_STATE,
- gcvHAL_DUMP_EVENT
-}
-gceHAL_COMMAND_CODES;
-
-/******************************************************************************\
-****************************** Interface Structure *****************************
-\******************************************************************************/
-
-#define gcdMAX_PROFILE_FILE_NAME 128
-
-/* Kernel settings. */
-typedef struct _gcsKERNEL_SETTINGS
-{
- /* Used RealTime signal between kernel and user. */
- int signal;
-}
-gcsKERNEL_SETTINGS;
-
-
-/* gcvHAL_QUERY_CHIP_IDENTITY */
-typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
-typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
-{
-
- /* Chip model. */
- gceCHIPMODEL chipModel;
-
- /* Revision value.*/
- __u32 chipRevision;
-
- /* Supported feature fields. */
- __u32 chipFeatures;
-
- /* Supported minor feature fields. */
- __u32 chipMinorFeatures;
-
- /* Supported minor feature 1 fields. */
- __u32 chipMinorFeatures1;
-
- /* Supported minor feature 2 fields. */
- __u32 chipMinorFeatures2;
-
- /* Supported minor feature 3 fields. */
- __u32 chipMinorFeatures3;
-
- /* Number of streams supported. */
- __u32 streamCount;
-
- /* Total number of temporary registers per thread. */
- __u32 registerMax;
-
- /* Maximum number of threads. */
- __u32 threadCount;
-
- /* Number of shader cores. */
- __u32 shaderCoreCount;
-
- /* Size of the vertex cache. */
- __u32 vertexCacheSize;
-
- /* Number of entries in the vertex output buffer. */
- __u32 vertexOutputBufferSize;
-
- /* Number of pixel pipes. */
- __u32 pixelPipes;
-
- /* Number of instructions. */
- __u32 instructionCount;
-
- /* Number of constants. */
- __u32 numConstants;
-
- /* Buffer size */
- __u32 bufferSize;
-
-}
-gcsHAL_QUERY_CHIP_IDENTITY;
-
-/* gcvHAL_COMPOSE. */
-typedef struct _gcsHAL_COMPOSE * gcsHAL_COMPOSE_PTR;
-typedef struct _gcsHAL_COMPOSE
-{
- /* Composition state buffer. */
- gctPHYS_ADDR physical;
- void * logical;
- size_t offset;
- size_t size;
-
- /* Composition end signal. */
- gctHANDLE process;
- gctSIGNAL signal;
-
- /* User signals. */
- gctHANDLE userProcess;
- gctSIGNAL userSignal1;
- gctSIGNAL userSignal2;
-}
-gcsHAL_COMPOSE;
-
-typedef struct _gcsHAL_INTERFACE
-{
- /* Command code. */
- gceHAL_COMMAND_CODES command;
-
- /* Hardware type. */
- gceHARDWARE_TYPE hardwareType;
-
- /* Status value. */
- gceSTATUS status;
-
- /* Handle to this interface channel. */
- gctHANDLE handle;
-
- /* Pid of the client. */
- __u32 pid;
-
- /* Union of command structures. */
- union _u
- {
- /* gcvHAL_GET_BASE_ADDRESS */
- struct _gcsHAL_GET_BASE_ADDRESS
- {
- /* Physical memory address of internal memory. */
- OUT __u32 baseAddress;
- }
- GetBaseAddress;
-
- /* gcvHAL_QUERY_VIDEO_MEMORY */
- struct _gcsHAL_QUERY_VIDEO_MEMORY
- {
- /* Physical memory address of internal memory. */
- OUT gctPHYS_ADDR internalPhysical;
-
- /* Size in bytes of internal memory.*/
- OUT size_t internalSize;
-
- /* Physical memory address of external memory. */
- OUT gctPHYS_ADDR externalPhysical;
-
- /* Size in bytes of external memory.*/
- OUT size_t externalSize;
-
- /* Physical memory address of contiguous memory. */
- OUT gctPHYS_ADDR contiguousPhysical;
-
- /* Size in bytes of contiguous memory.*/
- OUT size_t contiguousSize;
- }
- QueryVideoMemory;
-
- /* gcvHAL_QUERY_CHIP_IDENTITY */
- gcsHAL_QUERY_CHIP_IDENTITY QueryChipIdentity;
-
- /* gcvHAL_MAP_MEMORY */
- struct _gcsHAL_MAP_MEMORY
- {
- /* Physical memory address to map. */
- IN gctPHYS_ADDR physical;
-
- /* Number of bytes in physical memory to map. */
- IN size_t bytes;
-
- /* Address of mapped memory. */
- OUT void * logical;
- }
- MapMemory;
-
- /* gcvHAL_UNMAP_MEMORY */
- struct _gcsHAL_UNMAP_MEMORY
- {
- /* Physical memory address to unmap. */
- IN gctPHYS_ADDR physical;
-
- /* Number of bytes in physical memory to unmap. */
- IN size_t bytes;
-
- /* Address of mapped memory to unmap. */
- IN void * logical;
- }
- UnmapMemory;
-
- /* gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY */
- struct _gcsHAL_ALLOCATE_LINEAR_VIDEO_MEMORY
- {
- /* Number of bytes to allocate. */
- IN OUT unsigned int bytes;
-
- /* Buffer alignment. */
- IN unsigned int alignment;
-
- /* Type of allocation. */
- IN gceSURF_TYPE type;
-
- /* Memory pool to allocate from. */
- IN OUT gcePOOL pool;
-
- /* Allocated video memory. */
- OUT gcuVIDMEM_NODE_PTR node;
- }
- AllocateLinearVideoMemory;
-
- /* gcvHAL_ALLOCATE_VIDEO_MEMORY */
- struct _gcsHAL_ALLOCATE_VIDEO_MEMORY
- {
- /* Width of rectangle to allocate. */
- IN OUT unsigned int width;
-
- /* Height of rectangle to allocate. */
- IN OUT unsigned int height;
-
- /* Depth of rectangle to allocate. */
- IN unsigned int depth;
-
- /* Format rectangle to allocate in gceSURF_FORMAT. */
- IN gceSURF_FORMAT format;
-
- /* Type of allocation. */
- IN gceSURF_TYPE type;
-
- /* Memory pool to allocate from. */
- IN OUT gcePOOL pool;
-
- /* Allocated video memory. */
- OUT gcuVIDMEM_NODE_PTR node;
- }
- AllocateVideoMemory;
-
- /* gcvHAL_FREE_VIDEO_MEMORY */
- struct _gcsHAL_FREE_VIDEO_MEMORY
- {
- /* Allocated video memory. */
- IN gcuVIDMEM_NODE_PTR node;
- }
- FreeVideoMemory;
-
- /* gcvHAL_LOCK_VIDEO_MEMORY */
- struct _gcsHAL_LOCK_VIDEO_MEMORY
- {
- /* Allocated video memory. */
- IN gcuVIDMEM_NODE_PTR node;
-
- /* Cache configuration. */
- /* Only gcvPOOL_CONTIGUOUS and gcvPOOL_VIRUTAL
- ** can be configured */
- IN int cacheable;
-
- /* Hardware specific address. */
- OUT __u32 address;
-
- /* Mapped logical address. */
- OUT void * memory;
- }
- LockVideoMemory;
-
- /* gcvHAL_UNLOCK_VIDEO_MEMORY */
- struct _gcsHAL_UNLOCK_VIDEO_MEMORY
- {
- /* Allocated video memory. */
- IN gcuVIDMEM_NODE_PTR node;
-
- /* Type of surface. */
- IN gceSURF_TYPE type;
-
- /* Flag to unlock surface asynchroneously. */
- IN OUT int asynchroneous;
- }
- UnlockVideoMemory;
-
- /* gcvHAL_ALLOCATE_NON_PAGED_MEMORY */
- struct _gcsHAL_ALLOCATE_NON_PAGED_MEMORY
- {
- /* Number of bytes to allocate. */
- IN OUT size_t bytes;
-
- /* Physical address of allocation. */
- OUT gctPHYS_ADDR physical;
-
- /* Logical address of allocation. */
- OUT void * logical;
- }
- AllocateNonPagedMemory;
-
- /* gcvHAL_FREE_NON_PAGED_MEMORY */
- struct _gcsHAL_FREE_NON_PAGED_MEMORY
- {
- /* Number of bytes allocated. */
- IN size_t bytes;
-
- /* Physical address of allocation. */
- IN gctPHYS_ADDR physical;
-
- /* Logical address of allocation. */
- IN void * logical;
- }
- FreeNonPagedMemory;
-
- /* gcvHAL_EVENT_COMMIT. */
- struct _gcsHAL_EVENT_COMMIT
- {
- /* Event queue. */
- IN gcsQUEUE_PTR queue;
- }
- Event;
-
- /* gcvHAL_COMMIT */
- struct _gcsHAL_COMMIT
- {
- /* Context buffer object. */
- IN gckCONTEXT context;
-
- /* Command buffer. */
- IN gcoCMDBUF commandBuffer;
-
- /* State delta buffer. */
- gcsSTATE_DELTA_PTR delta;
-
- /* Event queue. */
- IN gcsQUEUE_PTR queue;
- }
- Commit;
-
- /* gcvHAL_MAP_USER_MEMORY */
- struct _gcsHAL_MAP_USER_MEMORY
- {
- /* Base address of user memory to map. */
- IN void * memory;
-
- /* Size of user memory in bytes to map. */
- IN size_t size;
-
- /* Info record required by gcvHAL_UNMAP_USER_MEMORY. */
- OUT void * info;
-
- /* Physical address of mapped memory. */
- OUT __u32 address;
- }
- MapUserMemory;
-
- /* gcvHAL_UNMAP_USER_MEMORY */
- struct _gcsHAL_UNMAP_USER_MEMORY
- {
- /* Base address of user memory to unmap. */
- IN void * memory;
-
- /* Size of user memory in bytes to unmap. */
- IN size_t size;
-
- /* Info record returned by gcvHAL_MAP_USER_MEMORY. */
- IN void * info;
-
- /* Physical address of mapped memory as returned by
- gcvHAL_MAP_USER_MEMORY. */
- IN __u32 address;
- }
- UnmapUserMemory;
-
- /* gcsHAL_USER_SIGNAL */
- struct _gcsHAL_USER_SIGNAL
- {
- /* Command. */
- gceUSER_SIGNAL_COMMAND_CODES command;
-
- /* Signal ID. */
- IN OUT int id;
-
- /* Reset mode. */
- IN int manualReset;
-
- /* Wait timedout. */
- IN __u32 wait;
-
- /* State. */
- IN int state;
- }
- UserSignal;
-
- /* gcvHAL_SIGNAL. */
- struct _gcsHAL_SIGNAL
- {
- /* Signal handle to signal. */
- IN gctSIGNAL signal;
-
- /* Reserved. */
- IN gctSIGNAL auxSignal;
-
- /* Process owning the signal. */
- IN gctHANDLE process;
-
- /* Event generated from where of pipeline */
- IN gceKERNEL_WHERE fromWhere;
- }
- Signal;
-
- /* gcvHAL_WRITE_DATA. */
- struct _gcsHAL_WRITE_DATA
- {
- /* Address to write data to. */
- IN __u32 address;
-
- /* Data to write. */
- IN __u32 data;
- }
- WriteData;
-
- /* gcvHAL_ALLOCATE_CONTIGUOUS_MEMORY */
- struct _gcsHAL_ALLOCATE_CONTIGUOUS_MEMORY
- {
- /* Number of bytes to allocate. */
- IN OUT size_t bytes;
-
- /* Hardware address of allocation. */
- OUT __u32 address;
-
- /* Physical address of allocation. */
- OUT gctPHYS_ADDR physical;
-
- /* Logical address of allocation. */
- OUT void * logical;
- }
- AllocateContiguousMemory;
-
- /* gcvHAL_FREE_CONTIGUOUS_MEMORY */
- struct _gcsHAL_FREE_CONTIGUOUS_MEMORY
- {
- /* Number of bytes allocated. */
- IN size_t bytes;
-
- /* Physical address of allocation. */
- IN gctPHYS_ADDR physical;
-
- /* Logical address of allocation. */
- IN void * logical;
- }
- FreeContiguousMemory;
-
- /* gcvHAL_READ_REGISTER */
- struct _gcsHAL_READ_REGISTER
- {
- /* Logical address of memory to write data to. */
- IN __u32 address;
-
- /* Data read. */
- OUT __u32 data;
- }
- ReadRegisterData;
-
- /* gcvHAL_WRITE_REGISTER */
- struct _gcsHAL_WRITE_REGISTER
- {
- /* Logical address of memory to write data to. */
- IN __u32 address;
-
- /* Data read. */
- IN __u32 data;
- }
- WriteRegisterData;
-
-#if VIVANTE_PROFILER
- /* gcvHAL_GET_PROFILE_SETTING */
- struct _gcsHAL_GET_PROFILE_SETTING
- {
- /* Enable profiling */
- OUT int enable;
-
- /* The profile file name */
- OUT char fileName[gcdMAX_PROFILE_FILE_NAME];
- }
- GetProfileSetting;
-
- /* gcvHAL_SET_PROFILE_SETTING */
- struct _gcsHAL_SET_PROFILE_SETTING
- {
- /* Enable profiling */
- IN int enable;
-
- /* The profile file name */
- IN char fileName[gcdMAX_PROFILE_FILE_NAME];
- }
- SetProfileSetting;
-
- /* gcvHAL_READ_ALL_PROFILE_REGISTERS */
- struct _gcsHAL_READ_ALL_PROFILE_REGISTERS
- {
- /* Data read. */
- OUT gcsPROFILER_COUNTERS counters;
- }
- RegisterProfileData;
-
- /* gcvHAL_PROFILE_REGISTERS_2D */
- struct _gcsHAL_PROFILE_REGISTERS_2D
- {
- /* Data read. */
- OUT gcs2D_PROFILE_PTR hwProfile2D;
- }
- RegisterProfileData2D;
-#endif
- /* Power management. */
- /* gcvHAL_SET_POWER_MANAGEMENT_STATE */
- struct _gcsHAL_SET_POWER_MANAGEMENT
- {
- /* Data read. */
- IN gceCHIPPOWERSTATE state;
- }
- SetPowerManagement;
-
- /* gcvHAL_QUERY_POWER_MANAGEMENT_STATE */
- struct _gcsHAL_QUERY_POWER_MANAGEMENT
- {
- /* Data read. */
- OUT gceCHIPPOWERSTATE state;
-
- /* Idle query. */
- OUT int isIdle;
- }
- QueryPowerManagement;
-
- /* gcvHAL_QUERY_KERNEL_SETTINGS */
- struct _gcsHAL_QUERY_KERNEL_SETTINGS
- {
- /* Settings.*/
- OUT gcsKERNEL_SETTINGS settings;
- }
- QueryKernelSettings;
-
- /* gcvHAL_MAP_PHYSICAL */
- struct _gcsHAL_MAP_PHYSICAL
- {
- /* gcvTRUE to map, gcvFALSE to unmap. */
- IN int map;
-
- /* Physical address. */
- IN OUT gctPHYS_ADDR physical;
- }
- MapPhysical;
-
- /* gcvHAL_DEBUG */
- struct _gcsHAL_DEBUG
- {
- /* If gcvTRUE, set the debug information. */
- IN int set;
- IN __u32 level;
- IN __u32 zones;
- IN int enable;
-
- IN gceDEBUG_MESSAGE_TYPE type;
- IN __u32 messageSize;
-
- /* Message to print if not empty. */
- IN char message[80];
- }
- Debug;
-
- /* gcvHAL_CACHE */
- struct _gcsHAL_CACHE
- {
- IN gceCACHEOPERATION operation;
- IN gctHANDLE process;
- IN void * logical;
- IN size_t bytes;
- IN gcuVIDMEM_NODE_PTR node;
- }
- Cache;
-
- /* gcvHAL_TIMESTAMP */
- struct _gcsHAL_TIMESTAMP
- {
- /* Timer select. */
- IN __u32 timer;
-
- /* Timer request type (0-stop, 1-start, 2-send delta). */
- IN __u32 request;
-
- /* Result of delta time in microseconds. */
- OUT __s32 timeDelta;
- }
- TimeStamp;
-
- /* gcvHAL_DATABASE */
- struct _gcsHAL_DATABASE
- {
- /* Set to gcvTRUE if you want to query a particular process ID.
- ** Set to gcvFALSE to query the last detached process. */
- IN int validProcessID;
-
- /* Process ID to query. */
- IN __u32 processID;
-
- /* Information. */
- OUT gcuDATABASE_INFO vidMem;
- OUT gcuDATABASE_INFO nonPaged;
- OUT gcuDATABASE_INFO contiguous;
- OUT gcuDATABASE_INFO gpuIdle;
- }
- Database;
-
- /* gcvHAL_VERSION */
- struct _gcsHAL_VERSION
- {
- /* Major version: N.n.n. */
- OUT __s32 major;
-
- /* Minor version: n.N.n. */
- OUT __s32 minor;
-
- /* Patch version: n.n.N. */
- OUT __s32 patch;
-
- /* Build version. */
- OUT __u32 build;
- }
- Version;
-
- /* gcvHAL_CHIP_INFO */
- struct _gcsHAL_CHIP_INFO
- {
- /* Chip count. */
- OUT __s32 count;
-
- /* Chip types. */
- OUT gceHARDWARE_TYPE types[gcdCHIP_COUNT];
- }
- ChipInfo;
-
- /* gcvHAL_ATTACH */
- struct _gcsHAL_ATTACH
- {
- /* Context buffer object. */
- OUT gckCONTEXT context;
-
- /* Number of states in the buffer. */
- OUT size_t stateCount;
- }
- Attach;
-
- /* gcvHAL_DETACH */
- struct _gcsHAL_DETACH
- {
- /* Context buffer object. */
- IN gckCONTEXT context;
- }
- Detach;
-
- /* gcvHAL_COMPOSE. */
- gcsHAL_COMPOSE Compose;
-
- /* gcvHAL_GET_FRAME_INFO. */
- struct _gcsHAL_GET_FRAME_INFO
- {
- OUT gcsHAL_FRAME_INFO * frameInfo;
- }
- GetFrameInfo;
-
- /* gcvHAL_SET_TIME_OUT. */
- struct _gcsHAL_SET_TIMEOUT
- {
- __u32 timeOut;
- }
- SetTimeOut;
-
- struct _gcsHAL_GET_SHARED_INFO
- {
- IN __u32 pid;
- IN __u32 dataId;
- IN gcuVIDMEM_NODE_PTR node;
- OUT __u8 * data;
- /* fix size */
- OUT __u8 * nodeData;
- size_t size;
- IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
- }
- GetSharedInfo;
-
- struct _gcsHAL_SET_SHARED_INFO
- {
- IN __u32 dataId;
- IN gcuVIDMEM_NODE_PTR node;
- IN __u8 * data;
- IN __u8 * nodeData;
- IN size_t size;
- IN gceVIDMEM_NODE_SHARED_INFO_TYPE infoType;
- }
- SetSharedInfo;
- }
- u;
-}
-gcsHAL_INTERFACE;
-
-#endif /* __gc_hal_driver_h_ */
diff --git a/native/include_v4_uapi/gc_hal_enum.h b/native/include_v4_uapi/gc_hal_enum.h
deleted file mode 100644
index 226e0b3..0000000
--- a/native/include_v4_uapi/gc_hal_enum.h
+++ /dev/null
@@ -1,776 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-
-
-#ifndef __gc_hal_enum_h_
-#define __gc_hal_enum_h_
-
-#include "gc_hal_options.h"
-
-
-/* Chip models. */
-typedef enum _gceCHIPMODEL
-{
- gcv300 = 0x0300,
- gcv320 = 0x0320,
- gcv350 = 0x0350,
- gcv355 = 0x0355,
- gcv400 = 0x0400,
- gcv410 = 0x0410,
- gcv420 = 0x0420,
- gcv450 = 0x0450,
- gcv500 = 0x0500,
- gcv530 = 0x0530,
- gcv600 = 0x0600,
- gcv700 = 0x0700,
- gcv800 = 0x0800,
- gcv860 = 0x0860,
- gcv880 = 0x0880,
- gcv1000 = 0x1000,
- gcv2000 = 0x2000,
- gcv2100 = 0x2100,
- gcv4000 = 0x4000,
-}
-gceCHIPMODEL;
-
-/* Chip features. */
-typedef enum _gceFEATURE
-{
- gcvFEATURE_PIPE_2D = 0,
- gcvFEATURE_PIPE_3D,
- gcvFEATURE_PIPE_VG,
- gcvFEATURE_DC,
- gcvFEATURE_HIGH_DYNAMIC_RANGE,
- gcvFEATURE_MODULE_CG,
- gcvFEATURE_MIN_AREA,
- gcvFEATURE_BUFFER_INTERLEAVING,
- gcvFEATURE_BYTE_WRITE_2D,
- gcvFEATURE_ENDIANNESS_CONFIG,
- gcvFEATURE_DUAL_RETURN_BUS,
- gcvFEATURE_DEBUG_MODE,
- gcvFEATURE_YUY2_RENDER_TARGET,
- gcvFEATURE_FRAGMENT_PROCESSOR,
- gcvFEATURE_2DPE20,
- gcvFEATURE_FAST_CLEAR,
- gcvFEATURE_YUV420_TILER,
- gcvFEATURE_YUY2_AVERAGING,
- gcvFEATURE_FLIP_Y,
- gcvFEATURE_EARLY_Z,
- gcvFEATURE_Z_COMPRESSION,
- gcvFEATURE_MSAA,
- gcvFEATURE_SPECIAL_ANTI_ALIASING,
- gcvFEATURE_SPECIAL_MSAA_LOD,
- gcvFEATURE_422_TEXTURE_COMPRESSION,
- gcvFEATURE_DXT_TEXTURE_COMPRESSION,
- gcvFEATURE_ETC1_TEXTURE_COMPRESSION,
- gcvFEATURE_CORRECT_TEXTURE_CONVERTER,
- gcvFEATURE_TEXTURE_8K,
- gcvFEATURE_SCALER,
- gcvFEATURE_YUV420_SCALER,
- gcvFEATURE_SHADER_HAS_W,
- gcvFEATURE_SHADER_HAS_SIGN,
- gcvFEATURE_SHADER_HAS_FLOOR,
- gcvFEATURE_SHADER_HAS_CEIL,
- gcvFEATURE_SHADER_HAS_SQRT,
- gcvFEATURE_SHADER_HAS_TRIG,
- gcvFEATURE_VAA,
- gcvFEATURE_HZ,
- gcvFEATURE_CORRECT_STENCIL,
- gcvFEATURE_VG20,
- gcvFEATURE_VG_FILTER,
- gcvFEATURE_VG21,
- gcvFEATURE_VG_DOUBLE_BUFFER,
- gcvFEATURE_MC20,
- gcvFEATURE_SUPER_TILED,
- gcvFEATURE_2D_FILTERBLIT_PLUS_ALPHABLEND,
- gcvFEATURE_2D_DITHER,
- gcvFEATURE_2D_A8_TARGET,
- gcvFEATURE_2D_FILTERBLIT_FULLROTATION,
- gcvFEATURE_2D_BITBLIT_FULLROTATION,
- gcvFEATURE_WIDE_LINE,
- gcvFEATURE_FC_FLUSH_STALL,
- gcvFEATURE_FULL_DIRECTFB,
- gcvFEATURE_HALF_FLOAT_PIPE,
- gcvFEATURE_LINE_LOOP,
- gcvFEATURE_2D_YUV_BLIT,
- gcvFEATURE_2D_TILING,
- gcvFEATURE_NON_POWER_OF_TWO,
- gcvFEATURE_3D_TEXTURE,
- gcvFEATURE_TEXTURE_ARRAY,
- gcvFEATURE_TILE_FILLER,
- gcvFEATURE_LOGIC_OP,
- gcvFEATURE_COMPOSITION,
- gcvFEATURE_MIXED_STREAMS,
- gcvFEATURE_2D_MULTI_SOURCE_BLT,
- gcvFEATURE_END_EVENT,
- gcvFEATURE_VERTEX_10_10_10_2,
- gcvFEATURE_TEXTURE_10_10_10_2,
- gcvFEATURE_TEXTURE_ANISOTROPIC_FILTERING,
- gcvFEATURE_TEXTURE_FLOAT_HALF_FLOAT,
- gcvFEATURE_2D_ROTATION_STALL_FIX,
- gcvFEATURE_2D_MULTI_SOURCE_BLT_EX,
- gcvFEATURE_BUG_FIXES10,
- gcvFEATURE_2D_MINOR_TILING,
- /* Supertiled compressed textures are supported. */
- gcvFEATURE_TEX_COMPRRESSION_SUPERTILED,
- gcvFEATURE_FAST_MSAA,
- gcvFEATURE_BUG_FIXED_INDEXED_TRIANGLE_STRIP,
- gcvFEATURE_TEXTURE_TILED_READ,
- gcvFEATURE_DEPTH_BIAS_FIX,
- gcvFEATURE_RECT_PRIMITIVE,
- gcvFEATURE_BUG_FIXES11,
- gcvFEATURE_SUPERTILED_TEXTURE,
- gcvFEATURE_2D_NO_COLORBRUSH_INDEX8
-}
-gceFEATURE;
-
-/* Chip Power Status. */
-typedef enum _gceCHIPPOWERSTATE
-{
- gcvPOWER_ON = 0,
- gcvPOWER_OFF,
- gcvPOWER_IDLE,
- gcvPOWER_SUSPEND,
- gcvPOWER_SUSPEND_ATPOWERON,
- gcvPOWER_OFF_ATPOWERON,
- gcvPOWER_IDLE_BROADCAST,
- gcvPOWER_SUSPEND_BROADCAST,
- gcvPOWER_OFF_BROADCAST,
- gcvPOWER_OFF_RECOVERY,
- gcvPOWER_OFF_TIMEOUT,
- gcvPOWER_ON_AUTO
-}
-gceCHIPPOWERSTATE;
-
-/* CPU cache operations */
-typedef enum _gceCACHEOPERATION
-{
- gcvCACHE_CLEAN = 0x01,
- gcvCACHE_INVALIDATE = 0x02,
- gcvCACHE_FLUSH = gcvCACHE_CLEAN | gcvCACHE_INVALIDATE,
- gcvCACHE_MEMORY_BARRIER = 0x04
-}
-gceCACHEOPERATION;
-
-typedef enum _gceVIDMEM_NODE_SHARED_INFO_TYPE
-{
- gcvVIDMEM_INFO_GENERIC,
- gcvVIDMEM_INFO_DIRTY_RECTANGLE
-}
-gceVIDMEM_NODE_SHARED_INFO_TYPE;
-
-/* Surface types. */
-typedef enum _gceSURF_TYPE
-{
- gcvSURF_TYPE_UNKNOWN = 0,
- gcvSURF_INDEX,
- gcvSURF_VERTEX,
- gcvSURF_TEXTURE,
- gcvSURF_RENDER_TARGET,
- gcvSURF_DEPTH,
- gcvSURF_BITMAP,
- gcvSURF_TILE_STATUS,
- gcvSURF_IMAGE,
- gcvSURF_MASK,
- gcvSURF_SCISSOR,
- gcvSURF_HIERARCHICAL_DEPTH,
- gcvSURF_NUM_TYPES, /* Make sure this is the last one! */
-
- /* Combinations. */
- gcvSURF_NO_TILE_STATUS = 0x100,
- gcvSURF_NO_VIDMEM = 0x200, /* Used to allocate surfaces with no underlying vidmem node.
- In Android, vidmem node is allocated by another process. */
- gcvSURF_CACHEABLE = 0x400, /* Used to allocate a cacheable surface */
-
- gcvSURF_RENDER_TARGET_NO_TILE_STATUS = gcvSURF_RENDER_TARGET
- | gcvSURF_NO_TILE_STATUS,
-
- gcvSURF_DEPTH_NO_TILE_STATUS = gcvSURF_DEPTH
- | gcvSURF_NO_TILE_STATUS,
-
- /* Supported surface types with no vidmem node. */
- gcvSURF_BITMAP_NO_VIDMEM = gcvSURF_BITMAP
- | gcvSURF_NO_VIDMEM,
-
- gcvSURF_TEXTURE_NO_VIDMEM = gcvSURF_TEXTURE
- | gcvSURF_NO_VIDMEM,
-
- /* Cacheable surface types with no vidmem node. */
- gcvSURF_CACHEABLE_BITMAP_NO_VIDMEM = gcvSURF_BITMAP_NO_VIDMEM
- | gcvSURF_CACHEABLE,
-
- gcvSURF_CACHEABLE_BITMAP = gcvSURF_BITMAP
- | gcvSURF_CACHEABLE,
-}
-gceSURF_TYPE;
-
-typedef enum _gceSURF_USAGE
-{
- gcvSURF_USAGE_UNKNOWN,
- gcvSURF_USAGE_RESOLVE_AFTER_CPU,
- gcvSURF_USAGE_RESOLVE_AFTER_3D
-}
-gceSURF_USAGE;
-
-typedef enum _gceSURF_COLOR_TYPE
-{
- gcvSURF_COLOR_UNKNOWN = 0,
- gcvSURF_COLOR_LINEAR = 0x01,
- gcvSURF_COLOR_ALPHA_PRE = 0x02,
-}
-gceSURF_COLOR_TYPE;
-
-/* Rotation. */
-typedef enum _gceSURF_ROTATION
-{
- gcvSURF_0_DEGREE = 0,
- gcvSURF_90_DEGREE,
- gcvSURF_180_DEGREE,
- gcvSURF_270_DEGREE,
- gcvSURF_FLIP_X,
- gcvSURF_FLIP_Y,
-}
-gceSURF_ROTATION;
-
-/* Surface formats. */
-typedef enum _gceSURF_FORMAT
-{
- /* Unknown format. */
- gcvSURF_UNKNOWN = 0,
-
- /* Palettized formats. */
- gcvSURF_INDEX1 = 100,
- gcvSURF_INDEX4,
- gcvSURF_INDEX8,
-
- /* RGB formats. */
- gcvSURF_A2R2G2B2 = 200,
- gcvSURF_R3G3B2,
- gcvSURF_A8R3G3B2,
- gcvSURF_X4R4G4B4,
- gcvSURF_A4R4G4B4,
- gcvSURF_R4G4B4A4,
- gcvSURF_X1R5G5B5,
- gcvSURF_A1R5G5B5,
- gcvSURF_R5G5B5A1,
- gcvSURF_R5G6B5,
- gcvSURF_R8G8B8,
- gcvSURF_X8R8G8B8,
- gcvSURF_A8R8G8B8,
- gcvSURF_R8G8B8A8,
- gcvSURF_G8R8G8B8,
- gcvSURF_R8G8B8G8,
- gcvSURF_X2R10G10B10,
- gcvSURF_A2R10G10B10,
- gcvSURF_X12R12G12B12,
- gcvSURF_A12R12G12B12,
- gcvSURF_X16R16G16B16,
- gcvSURF_A16R16G16B16,
- gcvSURF_A32R32G32B32,
- gcvSURF_R8G8B8X8,
- gcvSURF_R5G5B5X1,
- gcvSURF_R4G4B4X4,
-
- /* BGR formats. */
- gcvSURF_A4B4G4R4 = 300,
- gcvSURF_A1B5G5R5,
- gcvSURF_B5G6R5,
- gcvSURF_B8G8R8,
- gcvSURF_B16G16R16,
- gcvSURF_X8B8G8R8,
- gcvSURF_A8B8G8R8,
- gcvSURF_A2B10G10R10,
- gcvSURF_X16B16G16R16,
- gcvSURF_A16B16G16R16,
- gcvSURF_B32G32R32,
- gcvSURF_X32B32G32R32,
- gcvSURF_A32B32G32R32,
- gcvSURF_B4G4R4A4,
- gcvSURF_B5G5R5A1,
- gcvSURF_B8G8R8X8,
- gcvSURF_B8G8R8A8,
- gcvSURF_X4B4G4R4,
- gcvSURF_X1B5G5R5,
- gcvSURF_B4G4R4X4,
- gcvSURF_B5G5R5X1,
- gcvSURF_X2B10G10R10,
-
- /* Compressed formats. */
- gcvSURF_DXT1 = 400,
- gcvSURF_DXT2,
- gcvSURF_DXT3,
- gcvSURF_DXT4,
- gcvSURF_DXT5,
- gcvSURF_CXV8U8,
- gcvSURF_ETC1,
-
- /* YUV formats. */
- gcvSURF_YUY2 = 500,
- gcvSURF_UYVY,
- gcvSURF_YV12,
- gcvSURF_I420,
- gcvSURF_NV12,
- gcvSURF_NV21,
- gcvSURF_NV16,
- gcvSURF_NV61,
- gcvSURF_YVYU,
- gcvSURF_VYUY,
-
- /* Depth formats. */
- gcvSURF_D16 = 600,
- gcvSURF_D24S8,
- gcvSURF_D32,
- gcvSURF_D24X8,
-
- /* Alpha formats. */
- gcvSURF_A4 = 700,
- gcvSURF_A8,
- gcvSURF_A12,
- gcvSURF_A16,
- gcvSURF_A32,
- gcvSURF_A1,
-
- /* Luminance formats. */
- gcvSURF_L4 = 800,
- gcvSURF_L8,
- gcvSURF_L12,
- gcvSURF_L16,
- gcvSURF_L32,
- gcvSURF_L1,
-
- /* Alpha/Luminance formats. */
- gcvSURF_A4L4 = 900,
- gcvSURF_A2L6,
- gcvSURF_A8L8,
- gcvSURF_A4L12,
- gcvSURF_A12L12,
- gcvSURF_A16L16,
-
- /* Bump formats. */
- gcvSURF_L6V5U5 = 1000,
- gcvSURF_V8U8,
- gcvSURF_X8L8V8U8,
- gcvSURF_Q8W8V8U8,
- gcvSURF_A2W10V10U10,
- gcvSURF_V16U16,
- gcvSURF_Q16W16V16U16,
-
- /* R/RG/RA formats. */
- gcvSURF_R8 = 1100,
- gcvSURF_X8R8,
- gcvSURF_G8R8,
- gcvSURF_X8G8R8,
- gcvSURF_A8R8,
- gcvSURF_R16,
- gcvSURF_X16R16,
- gcvSURF_G16R16,
- gcvSURF_X16G16R16,
- gcvSURF_A16R16,
- gcvSURF_R32,
- gcvSURF_X32R32,
- gcvSURF_G32R32,
- gcvSURF_X32G32R32,
- gcvSURF_A32R32,
- gcvSURF_RG16,
-
- /* Floating point formats. */
- gcvSURF_R16F = 1200,
- gcvSURF_X16R16F,
- gcvSURF_G16R16F,
- gcvSURF_X16G16R16F,
- gcvSURF_B16G16R16F,
- gcvSURF_X16B16G16R16F,
- gcvSURF_A16B16G16R16F,
- gcvSURF_R32F,
- gcvSURF_X32R32F,
- gcvSURF_G32R32F,
- gcvSURF_X32G32R32F,
- gcvSURF_B32G32R32F,
- gcvSURF_X32B32G32R32F,
- gcvSURF_A32B32G32R32F,
- gcvSURF_A16F,
- gcvSURF_L16F,
- gcvSURF_A16L16F,
- gcvSURF_A16R16F,
- gcvSURF_A32F,
- gcvSURF_L32F,
- gcvSURF_A32L32F,
- gcvSURF_A32R32F,
-
-}
-gceSURF_FORMAT;
-
-/* Pixel swizzle modes. */
-typedef enum _gceSURF_SWIZZLE
-{
- gcvSURF_NOSWIZZLE = 0,
- gcvSURF_ARGB,
- gcvSURF_ABGR,
- gcvSURF_RGBA,
- gcvSURF_BGRA
-}
-gceSURF_SWIZZLE;
-
-/* Transparency modes. */
-typedef enum _gceSURF_TRANSPARENCY
-{
- /* Valid only for PE 1.0 */
- gcvSURF_OPAQUE = 0,
- gcvSURF_SOURCE_MATCH,
- gcvSURF_SOURCE_MASK,
- gcvSURF_PATTERN_MASK,
-}
-gceSURF_TRANSPARENCY;
-
-/* Surface Alignment. */
-typedef enum _gceSURF_ALIGNMENT
-{
- gcvSURF_FOUR = 0,
- gcvSURF_SIXTEEN,
- gcvSURF_SUPER_TILED,
- gcvSURF_SPLIT_TILED,
- gcvSURF_SPLIT_SUPER_TILED,
-}
-gceSURF_ALIGNMENT;
-
-/* Transparency modes. */
-typedef enum _gce2D_TRANSPARENCY
-{
- /* Valid only for PE 2.0 */
- gcv2D_OPAQUE = 0,
- gcv2D_KEYED,
- gcv2D_MASKED
-}
-gce2D_TRANSPARENCY;
-
-/* Mono packing modes. */
-typedef enum _gceSURF_MONOPACK
-{
- gcvSURF_PACKED8 = 0,
- gcvSURF_PACKED16,
- gcvSURF_PACKED32,
- gcvSURF_UNPACKED,
-}
-gceSURF_MONOPACK;
-
-/* Blending modes. */
-typedef enum _gceSURF_BLEND_MODE
-{
- /* Porter-Duff blending modes. */
- /* Fsrc Fdst */
- gcvBLEND_CLEAR = 0, /* 0 0 */
- gcvBLEND_SRC, /* 1 0 */
- gcvBLEND_DST, /* 0 1 */
- gcvBLEND_SRC_OVER_DST, /* 1 1 - Asrc */
- gcvBLEND_DST_OVER_SRC, /* 1 - Adst 1 */
- gcvBLEND_SRC_IN_DST, /* Adst 0 */
- gcvBLEND_DST_IN_SRC, /* 0 Asrc */
- gcvBLEND_SRC_OUT_DST, /* 1 - Adst 0 */
- gcvBLEND_DST_OUT_SRC, /* 0 1 - Asrc */
- gcvBLEND_SRC_ATOP_DST, /* Adst 1 - Asrc */
- gcvBLEND_DST_ATOP_SRC, /* 1 - Adst Asrc */
- gcvBLEND_SRC_XOR_DST, /* 1 - Adst 1 - Asrc */
-
- /* Special blending modes. */
- gcvBLEND_SET, /* DST = 1 */
- gcvBLEND_SUB /* DST = DST * (1 - SRC) */
-}
-gceSURF_BLEND_MODE;
-
-/* Per-pixel alpha modes. */
-typedef enum _gceSURF_PIXEL_ALPHA_MODE
-{
- gcvSURF_PIXEL_ALPHA_STRAIGHT = 0,
- gcvSURF_PIXEL_ALPHA_INVERSED
-}
-gceSURF_PIXEL_ALPHA_MODE;
-
-/* Global alpha modes. */
-typedef enum _gceSURF_GLOBAL_ALPHA_MODE
-{
- gcvSURF_GLOBAL_ALPHA_OFF = 0,
- gcvSURF_GLOBAL_ALPHA_ON,
- gcvSURF_GLOBAL_ALPHA_SCALE
-}
-gceSURF_GLOBAL_ALPHA_MODE;
-
-/* Color component modes for alpha blending. */
-typedef enum _gceSURF_PIXEL_COLOR_MODE
-{
- gcvSURF_COLOR_STRAIGHT = 0,
- gcvSURF_COLOR_MULTIPLY
-}
-gceSURF_PIXEL_COLOR_MODE;
-
-/* Color component modes for alpha blending. */
-typedef enum _gce2D_PIXEL_COLOR_MULTIPLY_MODE
-{
- gcv2D_COLOR_MULTIPLY_DISABLE = 0,
- gcv2D_COLOR_MULTIPLY_ENABLE
-}
-gce2D_PIXEL_COLOR_MULTIPLY_MODE;
-
-/* Color component modes for alpha blending. */
-typedef enum _gce2D_GLOBAL_COLOR_MULTIPLY_MODE
-{
- gcv2D_GLOBAL_COLOR_MULTIPLY_DISABLE = 0,
- gcv2D_GLOBAL_COLOR_MULTIPLY_ALPHA,
- gcv2D_GLOBAL_COLOR_MULTIPLY_COLOR
-}
-gce2D_GLOBAL_COLOR_MULTIPLY_MODE;
-
-/* Alpha blending factor modes. */
-typedef enum _gceSURF_BLEND_FACTOR_MODE
-{
- gcvSURF_BLEND_ZERO = 0,
- gcvSURF_BLEND_ONE,
- gcvSURF_BLEND_STRAIGHT,
- gcvSURF_BLEND_INVERSED,
- gcvSURF_BLEND_COLOR,
- gcvSURF_BLEND_COLOR_INVERSED,
- gcvSURF_BLEND_SRC_ALPHA_SATURATED,
- gcvSURF_BLEND_STRAIGHT_NO_CROSS,
- gcvSURF_BLEND_INVERSED_NO_CROSS,
- gcvSURF_BLEND_COLOR_NO_CROSS,
- gcvSURF_BLEND_COLOR_INVERSED_NO_CROSS,
- gcvSURF_BLEND_SRC_ALPHA_SATURATED_CROSS
-}
-gceSURF_BLEND_FACTOR_MODE;
-
-/* Alpha blending porter duff rules. */
-typedef enum _gce2D_PORTER_DUFF_RULE
-{
- gcvPD_CLEAR = 0,
- gcvPD_SRC,
- gcvPD_SRC_OVER,
- gcvPD_DST_OVER,
- gcvPD_SRC_IN,
- gcvPD_DST_IN,
- gcvPD_SRC_OUT,
- gcvPD_DST_OUT,
- gcvPD_SRC_ATOP,
- gcvPD_DST_ATOP,
- gcvPD_ADD,
- gcvPD_XOR,
- gcvPD_DST
-}
-gce2D_PORTER_DUFF_RULE;
-
-/* Alpha blending factor modes. */
-typedef enum _gce2D_YUV_COLOR_MODE
-{
- gcv2D_YUV_601= 0,
- gcv2D_YUV_709
-}
-gce2D_YUV_COLOR_MODE;
-
-/* 2D Rotation and flipping. */
-typedef enum _gce2D_ORIENTATION
-{
- gcv2D_0_DEGREE = 0,
- gcv2D_90_DEGREE,
- gcv2D_180_DEGREE,
- gcv2D_270_DEGREE,
- gcv2D_X_FLIP,
- gcv2D_Y_FLIP
-}
-gce2D_ORIENTATION;
-
-typedef enum _gce2D_COMMAND
-{
- gcv2D_CLEAR = 0,
- gcv2D_LINE,
- gcv2D_BLT,
- gcv2D_STRETCH,
- gcv2D_HOR_FILTER,
- gcv2D_VER_FILTER,
- gcv2D_MULTI_SOURCE_BLT,
-}
-gce2D_COMMAND;
-
-#if !VIVANTE_NO_3D
-/* Texture functions. */
-typedef enum _gceTEXTURE_FUNCTION
-{
- gcvTEXTURE_DUMMY = 0,
- gcvTEXTURE_REPLACE = 0,
- gcvTEXTURE_MODULATE,
- gcvTEXTURE_ADD,
- gcvTEXTURE_ADD_SIGNED,
- gcvTEXTURE_INTERPOLATE,
- gcvTEXTURE_SUBTRACT,
- gcvTEXTURE_DOT3
-}
-gceTEXTURE_FUNCTION;
-
-/* Texture sources. */
-typedef enum _gceTEXTURE_SOURCE
-{
- gcvCOLOR_FROM_TEXTURE = 0,
- gcvCOLOR_FROM_CONSTANT_COLOR,
- gcvCOLOR_FROM_PRIMARY_COLOR,
- gcvCOLOR_FROM_PREVIOUS_COLOR
-}
-gceTEXTURE_SOURCE;
-
-/* Texture source channels. */
-typedef enum _gceTEXTURE_CHANNEL
-{
- gcvFROM_COLOR = 0,
- gcvFROM_ONE_MINUS_COLOR,
- gcvFROM_ALPHA,
- gcvFROM_ONE_MINUS_ALPHA
-}
-gceTEXTURE_CHANNEL;
-#endif /* VIVANTE_NO_3D */
-
-/* Filter types. */
-typedef enum _gceFILTER_TYPE
-{
- gcvFILTER_SYNC = 0,
- gcvFILTER_BLUR,
- gcvFILTER_USER
-}
-gceFILTER_TYPE;
-
-/* Filter pass types. */
-typedef enum _gceFILTER_PASS_TYPE
-{
- gcvFILTER_HOR_PASS = 0,
- gcvFILTER_VER_PASS
-}
-gceFILTER_PASS_TYPE;
-
-/* Endian hints. */
-typedef enum _gceENDIAN_HINT
-{
- gcvENDIAN_NO_SWAP = 0,
- gcvENDIAN_SWAP_WORD,
- gcvENDIAN_SWAP_DWORD
-}
-gceENDIAN_HINT;
-
-/* Tiling modes. */
-typedef enum _gceTILING
-{
- gcvLINEAR = 0,
- gcvTILED,
- gcvSUPERTILED,
- gcvMULTI_TILED,
- gcvMULTI_SUPERTILED,
- gcvMINORTILED,
-}
-gceTILING;
-
-/* 2D pattern type. */
-typedef enum _gce2D_PATTERN
-{
- gcv2D_PATTERN_SOLID = 0,
- gcv2D_PATTERN_MONO,
- gcv2D_PATTERN_COLOR,
- gcv2D_PATTERN_INVALID
-}
-gce2D_PATTERN;
-
-/* 2D source type. */
-typedef enum _gce2D_SOURCE
-{
- gcv2D_SOURCE_MASKED = 0,
- gcv2D_SOURCE_MONO,
- gcv2D_SOURCE_COLOR,
- gcv2D_SOURCE_INVALID
-}
-gce2D_SOURCE;
-
-/* Pipes. */
-typedef enum _gcePIPE_SELECT
-{
- gcvPIPE_INVALID = ~0,
- gcvPIPE_3D = 0,
- gcvPIPE_2D
-}
-gcePIPE_SELECT;
-
-/* Hardware type. */
-typedef enum _gceHARDWARE_TYPE
-{
- gcvHARDWARE_INVALID = 0x00,
- gcvHARDWARE_3D = 0x01,
- gcvHARDWARE_2D = 0x02,
- gcvHARDWARE_VG = 0x04,
-
- gcvHARDWARE_3D2D = gcvHARDWARE_3D | gcvHARDWARE_2D
-}
-gceHARDWARE_TYPE;
-
-#define gcdCHIP_COUNT 3
-
-typedef enum _gceMMU_MODE
-{
- gcvMMU_MODE_1K,
- gcvMMU_MODE_4K,
-} gceMMU_MODE;
-
-/* User signal command codes. */
-typedef enum _gceUSER_SIGNAL_COMMAND_CODES
-{
- gcvUSER_SIGNAL_CREATE,
- gcvUSER_SIGNAL_DESTROY,
- gcvUSER_SIGNAL_SIGNAL,
- gcvUSER_SIGNAL_WAIT,
- gcvUSER_SIGNAL_MAP,
- gcvUSER_SIGNAL_UNMAP,
-}
-gceUSER_SIGNAL_COMMAND_CODES;
-
-/* Event locations. */
-typedef enum _gceKERNEL_WHERE
-{
- gcvKERNEL_COMMAND,
- gcvKERNEL_VERTEX,
- gcvKERNEL_TRIANGLE,
- gcvKERNEL_TEXTURE,
- gcvKERNEL_PIXEL,
-}
-gceKERNEL_WHERE;
-
-/* gcdDUMP message type. */
-typedef enum _gceDEBUG_MESSAGE_TYPE
-{
- gcvMESSAGE_TEXT,
- gcvMESSAGE_DUMP
-}
-gceDEBUG_MESSAGE_TYPE;
-
-/******************************************************************************\
-****************************** Object Declarations *****************************
-\******************************************************************************/
-
-typedef struct _gckCONTEXT * gckCONTEXT;
-typedef struct _gcoCMDBUF * gcoCMDBUF;
-typedef struct _gcsSTATE_DELTA * gcsSTATE_DELTA_PTR;
-typedef struct _gcsQUEUE * gcsQUEUE_PTR;
-typedef struct _gcoQUEUE * gcoQUEUE;
-typedef struct _gcsHAL_INTERFACE * gcsHAL_INTERFACE_PTR;
-typedef struct _gcs2D_PROFILE * gcs2D_PROFILE_PTR;
-
-#endif /* __gc_hal_enum_h_ */
diff --git a/native/include_v4_uapi/gc_hal_kernel_buffer.h b/native/include_v4_uapi/gc_hal_kernel_buffer.h
deleted file mode 100644
index 1a4f389..0000000
--- a/native/include_v4_uapi/gc_hal_kernel_buffer.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-
-
-#ifndef __gc_hal_kernel_buffer_h_
-#define __gc_hal_kernel_buffer_h_
-
-/******************************************************************************\
-************************ Command Buffer and Event Objects **********************
-\******************************************************************************/
-
-/* The number of context buffers per user. */
-#define gcdCONTEXT_BUFFER_COUNT 2
-
-/* State delta record. */
-typedef struct _gcsSTATE_DELTA_RECORD * gcsSTATE_DELTA_RECORD_PTR;
-typedef struct _gcsSTATE_DELTA_RECORD
-{
- /* State address. */
- unsigned int address;
-
- /* State mask. */
- __u32 mask;
-
- /* State data. */
- __u32 data;
-}
-gcsSTATE_DELTA_RECORD;
-
-/* State delta. */
-typedef struct _gcsSTATE_DELTA
-{
- /* Main state delta ID. Every time state delta structure gets reinitialized,
- main ID is incremented. If main state ID overflows, all map entry IDs get
- reinitialized to make sure there is no potential erroneous match after
- the overflow.*/
- unsigned int id;
-
- /* The number of contexts pending modification by the delta. */
- int refCount;
-
- /* Vertex element count for the delta buffer. */
- unsigned int elementCount;
-
- /* Number of states currently stored in the record array. */
- unsigned int recordCount;
-
- /* Record array; holds all modified states. */
- gcsSTATE_DELTA_RECORD_PTR recordArray;
-
- /* Map entry ID is used for map entry validation. If map entry ID does not
- match the main state delta ID, the entry and the corresponding state are
- considered not in use. */
- unsigned int * mapEntryID;
- unsigned int mapEntryIDSize;
-
- /* If the map entry ID matches the main state delta ID, index points to
- the state record in the record array. */
- unsigned int * mapEntryIndex;
-
- /* Previous and next state deltas. */
- gcsSTATE_DELTA_PTR prev;
- gcsSTATE_DELTA_PTR next;
-}
-gcsSTATE_DELTA;
-
-/* Command buffer object. */
-struct _gcoCMDBUF
-{
- /* The object. */
- gcsOBJECT object;
-
- /* Command buffer entry and exit pipes. */
- gcePIPE_SELECT entryPipe;
- gcePIPE_SELECT exitPipe;
-
- /* Feature usage flags. */
- int using2D;
- int using3D;
- int usingFilterBlit;
- int usingPalette;
-
- /* Physical address of command buffer. */
- gctPHYS_ADDR physical;
-
- /* Logical address of command buffer. */
- void * logical;
-
- /* Number of bytes in command buffer. */
- size_t bytes;
-
- /* Start offset into the command buffer. */
- __u32 startOffset;
-
- /* Current offset into the command buffer. */
- __u32 offset;
-
- /* Number of free bytes in command buffer. */
- size_t free;
-
- /* Location of the last reserved area. */
- void * lastReserve;
- unsigned int lastOffset;
-
-#if gcdSECURE_USER
- /* Hint array for the current command buffer. */
- unsigned int hintArraySize;
- __u32 * hintArray;
- __u32 * hintArrayTail;
-#endif
-};
-
-typedef struct _gcsQUEUE
-{
- /* Pointer to next gcsQUEUE structure. */
- gcsQUEUE_PTR next;
-
- /* Event information. */
- gcsHAL_INTERFACE iface;
-}
-gcsQUEUE;
-
-/* Event queue. */
-struct _gcoQUEUE
-{
- /* The object. */
- gcsOBJECT object;
-
- /* Pointer to current event queue. */
- gcsQUEUE_PTR head;
- gcsQUEUE_PTR tail;
-
- /* List of free records. */
- gcsQUEUE_PTR freeList;
- #define gcdIN_QUEUE_RECORD_LIMIT 16
- /* Number of records currently in queue */
- __u32 recordCount;
-};
-
-#endif /* __gc_hal_kernel_buffer_h_ */
diff --git a/native/include_v4_uapi/gc_hal_options.h b/native/include_v4_uapi/gc_hal_options.h
deleted file mode 100644
index c87f332..0000000
--- a/native/include_v4_uapi/gc_hal_options.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-
-
-#ifndef __gc_hal_options_h_
-#define __gc_hal_options_h_
-
-/*
- VIVANTE_NO_3D
-
- This define disables support for 3D rendering.
-*/
-#ifndef VIVANTE_NO_3D
-# define VIVANTE_NO_3D 0
-#endif
-
-/*
- VIVANTE_PROFILER
-
- This define enables the profiler.
-*/
-#ifndef VIVANTE_PROFILER
-# define VIVANTE_PROFILER 0
-#endif
-
-/*
- gcdSECURE_USER
-
- Use logical addresses instead of physical addresses in user land. In
- this case a hint table is created for both command buffers and context
- buffers, and that hint table will be used to patch up those buffers in
- the kernel when they are ready to submit.
-*/
-#ifndef gcdSECURE_USER
-# define gcdSECURE_USER 0
-#endif
-
-#endif /* __gc_hal_options_h_ */
diff --git a/native/include_v4_uapi/gc_hal_profiler.h b/native/include_v4_uapi/gc_hal_profiler.h
deleted file mode 100644
index 7caa559..0000000
--- a/native/include_v4_uapi/gc_hal_profiler.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-#ifndef __gc_hal_profiler_h_
-#define __gc_hal_profiler_h_
-
-/* HW profile information. */
-typedef struct _gcsPROFILER_COUNTERS
-{
- /* HW static counters. */
- __u32 gpuClock;
- __u32 axiClock;
- __u32 shaderClock;
-
- /* HW vairable counters. */
- __u32 gpuClockStart;
- __u32 gpuClockEnd;
-
- /* HW vairable counters. */
- __u32 gpuCyclesCounter;
- __u32 gpuTotalRead64BytesPerFrame;
- __u32 gpuTotalWrite64BytesPerFrame;
-
- /* PE */
- __u32 pe_pixel_count_killed_by_color_pipe;
- __u32 pe_pixel_count_killed_by_depth_pipe;
- __u32 pe_pixel_count_drawn_by_color_pipe;
- __u32 pe_pixel_count_drawn_by_depth_pipe;
-
- /* SH */
- __u32 ps_inst_counter;
- __u32 rendered_pixel_counter;
- __u32 vs_inst_counter;
- __u32 rendered_vertice_counter;
- __u32 vtx_branch_inst_counter;
- __u32 vtx_texld_inst_counter;
- __u32 pxl_branch_inst_counter;
- __u32 pxl_texld_inst_counter;
-
- /* PA */
- __u32 pa_input_vtx_counter;
- __u32 pa_input_prim_counter;
- __u32 pa_output_prim_counter;
- __u32 pa_depth_clipped_counter;
- __u32 pa_trivial_rejected_counter;
- __u32 pa_culled_counter;
-
- /* SE */
- __u32 se_culled_triangle_count;
- __u32 se_culled_lines_count;
-
- /* RA */
- __u32 ra_valid_pixel_count;
- __u32 ra_total_quad_count;
- __u32 ra_valid_quad_count_after_early_z;
- __u32 ra_total_primitive_count;
- __u32 ra_pipe_cache_miss_counter;
- __u32 ra_prefetch_cache_miss_counter;
- __u32 ra_eez_culled_counter;
-
- /* TX */
- __u32 tx_total_bilinear_requests;
- __u32 tx_total_trilinear_requests;
- __u32 tx_total_discarded_texture_requests;
- __u32 tx_total_texture_requests;
- __u32 tx_mem_read_count;
- __u32 tx_mem_read_in_8B_count;
- __u32 tx_cache_miss_count;
- __u32 tx_cache_hit_texel_count;
- __u32 tx_cache_miss_texel_count;
-
- /* MC */
- __u32 mc_total_read_req_8B_from_pipeline;
- __u32 mc_total_read_req_8B_from_IP;
- __u32 mc_total_write_req_8B_from_pipeline;
-
- /* HI */
- __u32 hi_axi_cycles_read_request_stalled;
- __u32 hi_axi_cycles_write_request_stalled;
- __u32 hi_axi_cycles_write_data_stalled;
-}
-gcsPROFILER_COUNTERS;
-
-#endif /* __gc_hal_profiler_h_ */
diff --git a/native/include_v4_uapi/gc_hal_types.h b/native/include_v4_uapi/gc_hal_types.h
deleted file mode 100644
index 730ca2d..0000000
--- a/native/include_v4_uapi/gc_hal_types.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/****************************************************************************
-*
-* Copyright (C) 2005 - 2012 by Vivante Corp.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the license, or
-* (at your option) any later version.
-*
-* 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.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not write to the Free Software
-* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*
-*****************************************************************************/
-
-
-
-
-#ifndef __gc_hal_types_h_
-#define __gc_hal_types_h_
-
-#include <linux/types.h>
-
-typedef void * gctPHYS_ADDR;
-typedef void * gctHANDLE;
-typedef void * gctSIGNAL;
-
-/* 2D Engine profile. */
-typedef struct _gcs2D_PROFILE
-{
- /* Cycle count.
- 32bit counter incremented every 2D clock cycle.
- Wraps back to 0 when the counter overflows.
- */
- __u32 cycleCount;
-
- /* Pixels rendered by the 2D engine.
- Resets to 0 every time it is read. */
- __u32 pixelsRendered;
-}
-gcs2D_PROFILE;
-
-/* Macro to combine four characters into a Charcater Code. */
-#define gcmCC(c1, c2, c3, c4) \
-( \
- (char) (c1) \
- | \
- ((char) (c2) << 8) \
- | \
- ((char) (c3) << 16) \
- | \
- ((char) (c4) << 24) \
-)
-
-/******************************************************************************\
-****************************** Function Parameters *****************************
-\******************************************************************************/
-
-#define IN
-#define OUT
-#define OPTIONAL
-
-/******************************************************************************\
-********************************* Status Codes *********************************
-\******************************************************************************/
-
-typedef enum _gceSTATUS
-{
- gcvSTATUS_OK = 0,
- gcvSTATUS_FALSE = 0,
- gcvSTATUS_TRUE = 1,
- gcvSTATUS_NO_MORE_DATA = 2,
- gcvSTATUS_CACHED = 3,
- gcvSTATUS_MIPMAP_TOO_LARGE = 4,
- gcvSTATUS_NAME_NOT_FOUND = 5,
- gcvSTATUS_NOT_OUR_INTERRUPT = 6,
- gcvSTATUS_MISMATCH = 7,
- gcvSTATUS_MIPMAP_TOO_SMALL = 8,
- gcvSTATUS_LARGER = 9,
- gcvSTATUS_SMALLER = 10,
- gcvSTATUS_CHIP_NOT_READY = 11,
- gcvSTATUS_NEED_CONVERSION = 12,
- gcvSTATUS_SKIP = 13,
- gcvSTATUS_DATA_TOO_LARGE = 14,
- gcvSTATUS_INVALID_CONFIG = 15,
- gcvSTATUS_CHANGED = 16,
- gcvSTATUS_NOT_SUPPORT_DITHER = 17,
- gcvSTATUS_EXECUTED = 18,
- gcvSTATUS_TERMINATE = 19,
-
- gcvSTATUS_INVALID_ARGUMENT = -1,
- gcvSTATUS_INVALID_OBJECT = -2,
- gcvSTATUS_OUT_OF_MEMORY = -3,
- gcvSTATUS_MEMORY_LOCKED = -4,
- gcvSTATUS_MEMORY_UNLOCKED = -5,
- gcvSTATUS_HEAP_CORRUPTED = -6,
- gcvSTATUS_GENERIC_IO = -7,
- gcvSTATUS_INVALID_ADDRESS = -8,
- gcvSTATUS_CONTEXT_LOSSED = -9,
- gcvSTATUS_TOO_COMPLEX = -10,
- gcvSTATUS_BUFFER_TOO_SMALL = -11,
- gcvSTATUS_INTERFACE_ERROR = -12,
- gcvSTATUS_NOT_SUPPORTED = -13,
- gcvSTATUS_MORE_DATA = -14,
- gcvSTATUS_TIMEOUT = -15,
- gcvSTATUS_OUT_OF_RESOURCES = -16,
- gcvSTATUS_INVALID_DATA = -17,
- gcvSTATUS_INVALID_MIPMAP = -18,
- gcvSTATUS_NOT_FOUND = -19,
- gcvSTATUS_NOT_ALIGNED = -20,
- gcvSTATUS_INVALID_REQUEST = -21,
- gcvSTATUS_GPU_NOT_RESPONDING = -22,
- gcvSTATUS_TIMER_OVERFLOW = -23,
- gcvSTATUS_VERSION_MISMATCH = -24,
- gcvSTATUS_LOCKED = -25,
- gcvSTATUS_INTERRUPTED = -26,
- gcvSTATUS_DEVICE = -27,
-
- /* Linker errors. */
- gcvSTATUS_GLOBAL_TYPE_MISMATCH = -1000,
- gcvSTATUS_TOO_MANY_ATTRIBUTES = -1001,
- gcvSTATUS_TOO_MANY_UNIFORMS = -1002,
- gcvSTATUS_TOO_MANY_VARYINGS = -1003,
- gcvSTATUS_UNDECLARED_VARYING = -1004,
- gcvSTATUS_VARYING_TYPE_MISMATCH = -1005,
- gcvSTATUS_MISSING_MAIN = -1006,
- gcvSTATUS_NAME_MISMATCH = -1007,
- gcvSTATUS_INVALID_INDEX = -1008,
- gcvSTATUS_UNIFORM_TYPE_MISMATCH = -1009,
-}
-gceSTATUS;
-
-/*******************************************************************************
-***** Database ****************************************************************/
-
-typedef struct _gcsDATABASE_COUNTERS
-{
- /* Number of currently allocated bytes. */
- size_t bytes;
-
- /* Maximum number of bytes allocated (memory footprint). */
- size_t maxBytes;
-
- /* Total number of bytes allocated. */
- size_t totalBytes;
-}
-gcsDATABASE_COUNTERS;
-
-typedef struct _gcuDATABASE_INFO
-{
- /* Counters. */
- gcsDATABASE_COUNTERS counters;
-
- /* Time value. */
- __u64 time;
-}
-gcuDATABASE_INFO;
-
-/*******************************************************************************
-***** Frame database **********************************************************/
-
-/* gcsHAL_FRAME_INFO */
-typedef struct _gcsHAL_FRAME_INFO
-{
- /* Current timer tick. */
- OUT __u64 ticks;
-
- /* Bandwidth counters. */
- OUT unsigned int readBytes8[8];
- OUT unsigned int writeBytes8[8];
-
- /* Counters. */
- OUT unsigned int cycles[8];
- OUT unsigned int idleCycles[8];
- OUT unsigned int mcCycles[8];
- OUT unsigned int readRequests[8];
- OUT unsigned int writeRequests[8];
-
- /* 3D counters. */
- OUT unsigned int vertexCount;
- OUT unsigned int primitiveCount;
- OUT unsigned int rejectedPrimitives;
- OUT unsigned int culledPrimitives;
- OUT unsigned int clippedPrimitives;
- OUT unsigned int outPrimitives;
- OUT unsigned int inPrimitives;
- OUT unsigned int culledQuadCount;
- OUT unsigned int totalQuadCount;
- OUT unsigned int quadCount;
- OUT unsigned int totalPixelCount;
-
- /* PE counters. */
- OUT unsigned int colorKilled[8];
- OUT unsigned int colorDrawn[8];
- OUT unsigned int depthKilled[8];
- OUT unsigned int depthDrawn[8];
-
- /* Shader counters. */
- OUT unsigned int shaderCycles;
- OUT unsigned int vsInstructionCount;
- OUT unsigned int vsTextureCount;
- OUT unsigned int psInstructionCount;
- OUT unsigned int psTextureCount;
-
- /* Texture counters. */
- OUT unsigned int bilinearRequests;
- OUT unsigned int trilinearRequests;
- OUT unsigned int txBytes8;
- OUT unsigned int txHitCount;
- OUT unsigned int txMissCount;
-}
-gcsHAL_FRAME_INFO;
-
-#endif /* __gc_hal_types_h_ */