feat: update gpu to Linux_SDK_V1.2.1

This version update involves a lot of content, so the previous version
has been deleted and the new version has been re-merged into the kernel.

The configuration file for the GPU driver originates from a previous
version.

Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn>
This commit is contained in:
Mingzheng Xing
2023-08-30 21:19:50 +08:00
committed by Han Gao
parent 807db9d981
commit f72e7cd077
250 changed files with 10635 additions and 7697 deletions

View File

@@ -112,6 +112,12 @@ typedef struct DFS_FILE
/* ----- native callbacks interface ----------------------------------------- */
static void _WriteData(void *pvNativeHandle, const void *pvData,
IMG_UINT32 uiSize)
{
seq_write(pvNativeHandle, pvData, uiSize);
}
static void _VPrintf(void *pvNativeHandle, const IMG_CHAR *pszFmt,
va_list pArgs)
{
@@ -141,6 +147,7 @@ static IMG_BOOL _HasOverflowed(void *pvNativeHandle)
}
static OSDI_IMPL_ENTRY_CB _g_sEntryCallbacks = {
.pfnWrite = _WriteData,
.pfnVPrintf = _VPrintf,
.pfnPuts = _Puts,
.pfnHasOverflowed = _HasOverflowed,
@@ -403,22 +410,29 @@ static ssize_t _Write(struct file *psFile, const char __user *pszBuffer,
DFS_FILE *psDFSFile = psINode->i_private;
DI_ITERATOR_CB *psIter = &psDFSFile->sEntry.sIterCb;
IMG_CHAR *pcLocalBuffer;
IMG_UINT64 ui64Count = uiCount + 1, ui64Pos = *puiPos;
IMG_UINT64 ui64Count;
IMG_INT64 i64Res = -EIO;
IMG_UINT64 ui64Pos = *puiPos;
PVR_LOG_RETURN_IF_FALSE(psDFSFile != NULL, "psDFSFile is NULL",
-EIO);
PVR_LOG_RETURN_IF_FALSE(psIter->pfnWrite != NULL, "pfnWrite is NULL",
-EIO);
/* Make sure we allocate the smallest amount of needed memory*/
ui64Count = psIter->ui32WriteLenMax;
PVR_LOG_GOTO_IF_FALSE(uiCount <= ui64Count, "uiCount too long", return_);
ui64Count = MIN(uiCount + 1, ui64Count);
_DRIVER_THREAD_ENTER();
/* allocate buffer with one additional byte fore NUL character */
/* allocate buffer with one additional byte for NUL character */
pcLocalBuffer = OSAllocMem(ui64Count);
PVR_LOG_GOTO_IF_FALSE(pcLocalBuffer != NULL, "OSAllocMem() failed",
return_);
i64Res = pvr_copy_from_user(pcLocalBuffer, pszBuffer, uiCount);
i64Res = pvr_copy_from_user(pcLocalBuffer, pszBuffer, ui64Count);
PVR_LOG_GOTO_IF_FALSE(i64Res == 0, "pvr_copy_from_user() failed",
free_local_buffer_);