Support for this was added in the previous patch.
We're considering only the TA/3D and 2D blit commands to be part of a
command burst. The rest of the commands are power management related and
we can ignore them when detecting repeated burst patterns.
Fixes: NB#195379 - SGX sleep causes performance penalty
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Reviewed-by: Luc Verhaegen <Luc.Verhaegen@basyskom.de>
}
#endif
+ /* to aid in determining the next power down delay */
+ sgx_mark_new_command(psDeviceNode);
+
eError = SGXScheduleCCBCommandKM(hDevHandle, psCCBKick->eCommand,
&psCCBKick->sCommand, KERNEL_ID, 0);
if (eError == PVRSRV_ERROR_RETRY) {
sSGXTimingInfo.ui32uKernelFreq;
sgx_set_pwrdown_delay(psDeviceNode, sSGXTimingInfo.ui32uKernelFreq,
- sSGXTimingInfo.ui32ActivePowManLatencyms);
+ sgx_calc_power_down_delay(psDeviceNode));
}
void SGXStartTimer(struct PVRSRV_SGXDEV_INFO *psDevInfo, IMG_BOOL bStartOSTimer)
sCommand.ui32Data[0] = PVRSRV_CCBFLAGS_TRANSFERCMD;
sCommand.ui32Data[1] = psKick->sHWTransferContextDevVAddr.uiAddr;
+ /* To aid in determining the next power down delay */
+ sgx_mark_new_command(hDevHandle);
+
eError = SGXScheduleCCBCommandKM(hDevHandle, SGXMKIF_COMMAND_EDM_KICK,
&sCommand, KERNEL_ID,
psKick->ui32PDumpFlags);
psDevInfo->psSGXHostCtl;
u32 l;
+ /* To aid in calculating the next power down delay */
+ sgx_mark_power_down(psDeviceNode);
+
l = readl(&psSGXHostCtl->ui32NumActivePowerEvents);
l++;
writel(l, &psSGXHostCtl->ui32NumActivePowerEvents);