feat: update gpu sdk1.2.0

Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
This commit is contained in:
Han Gao
2023-07-30 06:05:33 +08:00
committed by Han Gao
parent 8eac2d9ff9
commit 827be31621
3 changed files with 16 additions and 8 deletions

View File

@@ -570,7 +570,9 @@ static PVRSRV_ERROR _NativeSyncInit(void)
static void _NativeSyncDeinit(void)
{
destroy_workqueue(gpFenceStatusWq);
if (gpFenceStatusWq) {
destroy_workqueue(gpFenceStatusWq);
}
}
struct workqueue_struct *NativeSyncGetFenceStatusWq(void)

View File

@@ -3287,8 +3287,9 @@ PVRSRV_ERROR PVRSRVCreateHWPerfHostThread(IMG_UINT32 ui32Timeout)
if (!ui32Timeout)
return PVRSRV_ERROR_INVALID_PARAMS;
OSLockAcquire(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
if (gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock) {
OSLockAcquire(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
}
/* Create only once */
if (gpsPVRSRVData->hHWPerfHostPeriodicThread == NULL)
@@ -3316,8 +3317,9 @@ PVRSRV_ERROR PVRSRVCreateHWPerfHostThread(IMG_UINT32 ui32Timeout)
eError = OSEventObjectSignal(gpsPVRSRVData->hHWPerfHostPeriodicEvObj);
PVR_LOG_IF_ERROR(eError, "OSEventObjectSignal");
}
OSLockRelease(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
if (gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock) {
OSLockRelease(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
}
return eError;
}
@@ -3325,7 +3327,9 @@ PVRSRV_ERROR PVRSRVDestroyHWPerfHostThread(void)
{
PVRSRV_ERROR eError = PVRSRV_OK;
OSLockAcquire(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
if (gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock) {
OSLockAcquire(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
}
/* Stop and cleanup the HWPerf periodic thread */
if (gpsPVRSRVData->hHWPerfHostPeriodicThread)
@@ -3356,7 +3360,9 @@ PVRSRV_ERROR PVRSRVDestroyHWPerfHostThread(void)
}
}
OSLockRelease(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
if (gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock) {
OSLockRelease(gpsPVRSRVData->hHWPerfHostPeriodicThread_Lock);
}
return eError;
}
#endif

View File

@@ -206,7 +206,7 @@ PVRSRV_DATA *PVRSRVGetPVRSRVData(void);
#define PVRSRV_KM_ERRORS (PVRSRVGetPVRSRVData()->ui32DPFErrorCount)
#define PVRSRV_ERROR_LIMIT_REACHED (PVRSRV_KM_ERRORS == IMG_UINT32_MAX)
#define PVRSRV_REPORT_ERROR() do { if (!(PVRSRV_ERROR_LIMIT_REACHED)) { PVRSRVGetPVRSRVData()->ui32DPFErrorCount++; } } while (0)
#define PVRSRV_REPORT_ERROR() do { if (PVRSRVGetPVRSRVData()) { if (!(PVRSRV_ERROR_LIMIT_REACHED)) { PVRSRVGetPVRSRVData()->ui32DPFErrorCount++; } } } while (0)
#define PVRSRV_VZ_MODE_IS(_expr) (DRIVER_MODE_##_expr == PVRSRVGetPVRSRVData()->eDriverMode)
#define PVRSRV_VZ_RETN_IF_MODE(_expr) do { if ( PVRSRV_VZ_MODE_IS(_expr)) { return; } } while (0)