summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
diff options
context:
space:
mode:
authorXianzhong <b07117@freescale.com>2015-06-29 13:00:23 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-09-17 09:23:46 -0500
commit3b9c15095c91001ca4314bbbe43de8af94e2f224 (patch)
treebf4f58779fcde1edfc01d87ea25ee1d8cb76cf25 /drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
parentd18ebfa66b770aa4c8a3a6e3f93b39f180bec7e6 (diff)
MGS-824 gpu 5.0.11.p7 kernel driver integration
Integrate 5.0.11.p7 gpu kernel driver for 3.14 kernel Source git: gpu-viv5.git Source branch: origin/fsl_5.0.11.p7 Source commit: 683cfd653fb350b6d6589adffd7b20a41283bc9c Signed-off-by: Xianzhong <b07117@freescale.com>
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h157
1 files changed, 146 insertions, 11 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
index 6940aa982c12..8a4be08b8404 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
+++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_driver.h
@@ -1,20 +1,54 @@
/****************************************************************************
*
-* Copyright (C) 2005 - 2015 by Vivante Corp.
+* The MIT License (MIT)
*
-* 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.
+* Copyright (c) 2014 Vivante Corporation
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*
+*****************************************************************************
+*
+* The GPL License (GPL)
+*
+* Copyright (C) 2014 Vivante Corporation
+*
+* 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
+* 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.
+* along with this program; if not, write to the Free Software Foundation,
+* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*
+*****************************************************************************
+*
+* Note: This software is released under dual MIT and GPL licenses. A
+* recipient may use this file under the terms of either the MIT license or
+* GPL License. If you wish to use only one license not the other, you can
+* indicate your decision by deleting one of the above license notices in your
+* version of this file.
*
*****************************************************************************/
@@ -178,6 +212,9 @@ typedef enum _gceHAL_COMMAND_CODES
/* Create native fence and return its fd. */
gcvHAL_CREATE_NATIVE_FENCE,
+ /* Wait native fence for GPU. */
+ gcvHAL_WAIT_NATIVE_FENCE,
+
/* Destory MMU. */
gcvHAL_DESTROY_MMU,
@@ -189,6 +226,16 @@ typedef enum _gceHAL_COMMAND_CODES
/* Connect a video node to an OS native fd. */
gcvHAL_GET_VIDEO_MEMORY_FD,
+
+ /* Wrap a user memory into a video memory node. */
+ gcvHAL_WRAP_USER_MEMORY,
+
+#if gcdENABLE_DEC_COMPRESSION && gcdDEC_ENABLE_AHB
+ gcvHAL_DEC300_READ,
+ gcvHAL_DEC300_WRITE,
+ gcvHAL_DEC300_FLUSH,
+ gcvHAL_DEC300_FLUSH_WAIT,
+#endif
}
gceHAL_COMMAND_CODES;
@@ -206,6 +253,21 @@ typedef struct _gcsKERNEL_SETTINGS
}
gcsKERNEL_SETTINGS;
+typedef struct _gcsUSER_MEMORY_DESC
+{
+ /* Import flag. */
+ gctUINT32 flag;
+
+ /* gcvALLOC_FLAG_DMABUF */
+ gctUINT32 handle;
+
+ /* gcvALLOC_FLAG_USERMEMORY */
+ gctUINT64 logical;
+ gctUINT32 physical;
+ gctUINT32 size;
+}
+gcsUSER_MEMORY_DESC;
+
/* gcvHAL_QUERY_CHIP_IDENTITY */
typedef struct _gcsHAL_QUERY_CHIP_IDENTITY * gcsHAL_QUERY_CHIP_IDENTITY_PTR;
@@ -239,6 +301,9 @@ typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
/* Supported minor feature 5 fields. */
gctUINT32 chipMinorFeatures5;
+ /* Supported minor feature 5 fields. */
+ gctUINT32 chipMinorFeatures6;
+
/* Number of streams supported. */
gctUINT32 streamCount;
@@ -286,8 +351,8 @@ typedef struct _gcsHAL_QUERY_CHIP_IDENTITY
/* Product ID */
gctUINT32 productID;
- /* Special ECO bits */
- gceECO_FLAG ecoFlags;
+ /* Special chip flag bits */
+ gceCHIP_FLAG chipFlags;
}
gcsHAL_QUERY_CHIP_IDENTITY;
@@ -961,8 +1026,11 @@ typedef struct _gcsHAL_INTERFACE
/* Handle of context buffer object. */
OUT gctUINT32 context;
+ /* Maximum state in the buffer. */
+ OUT gctUINT64 maxState;
+
/* Number of states in the buffer. */
- OUT gctUINT64 stateCount;
+ OUT gctUINT32 numStates;
/* Map context buffer to user or not. */
IN gctBOOL map;
@@ -1093,6 +1161,16 @@ typedef struct _gcsHAL_INTERFACE
}
CreateNativeFence;
+ struct _gcsHAL_WAIT_NATIVE_FENCE
+ {
+ /* Native fence file descriptor. */
+ IN gctINT fenceFD;
+
+ /* Wait timeout. */
+ IN gctUINT32 timeout;
+ }
+ WaitNativeFence;
+
struct _gcsHAL_DESTROY_MMU
{
/* Mmu object. */
@@ -1127,6 +1205,63 @@ typedef struct _gcsHAL_INTERFACE
OUT gctINT fd;
}
GetVideoMemoryFd;
+
+ struct _gcsHAL_WRAP_USER_MEMORY
+ {
+ /* Handle from other allocators. */
+ IN gctUINT32 handle;
+
+ /* Allocation flag to wrap user memory*/
+ IN gctUINT32 flag;
+
+ /* Video mmory node. */
+ OUT gctUINT32 node;
+
+ /* Description of user memory. */
+ IN gcsUSER_MEMORY_DESC desc;
+ }
+ WrapUserMemory;
+
+#if gcdENABLE_DEC_COMPRESSION && gcdDEC_ENABLE_AHB
+ struct _gcsHAL_DEC300_READ
+ {
+ gctUINT32 enable;
+ gctUINT32 readId;
+ gctUINT32 format;
+ gctUINT32 strides[3];
+ gctUINT32 is3D;
+ gctUINT32 isMSAA;
+ gctUINT32 clearValue;
+ gctUINT32 isTPC;
+ gctUINT32 isTPCCompressed;
+ gctUINT32 surfAddrs[3];
+ gctUINT32 tileAddrs[3];
+ }
+ DEC300Read;
+
+ struct _gcsHAL_DEC300_WRITE
+ {
+ gctUINT32 enable;
+ gctUINT32 readId;
+ gctUINT32 writeId;
+ gctUINT32 format;
+ gctUINT32 surfAddr;
+ gctUINT32 tileAddr;
+ }
+ DEC300Write;
+
+ struct _gcsHAL_DEC300_FLUSH
+ {
+ IN gctUINT8 useless;
+ }
+ DEC300Flush;
+
+ struct _gcsHAL_DEC300_FLUSH_WAIT
+ {
+ IN gctUINT32 done;
+ }
+ DEC300FlushWait;
+#endif
}
u;
}