本文整理汇总了C++中PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr方法的典型用法代码示例。如果您正苦于以下问题:C++ PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr方法的具体用法?C++ PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr怎么用?C++ PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PVRSRV_DEVICE_NODE
的用法示例。
在下文中一共展示了PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PDumpFreePages
PVRSRV_ERROR PDumpFreePages(BM_HEAP * psBMHeap,
IMG_DEV_VIRTADDR sDevVAddr,
u32 ui32NumBytes,
u32 ui32PageSize,
void *hUniqueTag, int bInterleaved)
{
PVRSRV_ERROR eErr;
u32 ui32NumPages, ui32PageCounter;
IMG_DEV_PHYADDR sDevPAddr;
PVRSRV_DEVICE_NODE *psDeviceNode;
PDUMP_GET_SCRIPT_STRING();
PVR_ASSERT(((u32) sDevVAddr.uiAddr & (ui32PageSize - 1)) == 0);
PVR_ASSERT(((u32) ui32NumBytes & (ui32PageSize - 1)) == 0);
eErr =
PDumpOSBufprintf(hScript, ui32MaxLen,
"-- FREE :SGXMEM:VA_%8.8lX\r\n", sDevVAddr.uiAddr);
if (eErr != PVRSRV_OK) {
return eErr;
}
PDumpOSWriteString2(hScript, PDUMP_FLAGS_CONTINUOUS);
ui32NumPages = ui32NumBytes / ui32PageSize;
psDeviceNode = psBMHeap->pBMContext->psDeviceNode;
for (ui32PageCounter = 0; ui32PageCounter < ui32NumPages;
ui32PageCounter++) {
if (!bInterleaved || (ui32PageCounter % 2) == 0) {
sDevPAddr =
psDeviceNode->pfnMMUGetPhysPageAddr(psBMHeap->
pMMUHeap,
sDevVAddr);
{
eErr =
PDumpOSBufprintf(hScript, ui32MaxLen,
"FREE :SGXMEM:PA_%8.8lX%8.8lX\r\n",
(u32) hUniqueTag,
sDevPAddr.uiAddr);
if (eErr != PVRSRV_OK) {
return eErr;
}
PDumpOSWriteString2(hScript,
PDUMP_FLAGS_CONTINUOUS);
}
} else {
}
sDevVAddr.uiAddr += ui32PageSize;
}
return PVRSRV_OK;
}
示例2: BM_GetPhysPageAddr
IMG_VOID BM_GetPhysPageAddr(PVRSRV_KERNEL_MEM_INFO *psMemInfo,
IMG_DEV_VIRTADDR sDevVPageAddr,
IMG_DEV_PHYADDR *psDevPAddr)
{
PVRSRV_DEVICE_NODE *psDeviceNode;
PVR_DPF((PVR_DBG_MESSAGE, "BM_GetPhysPageAddr"));
PVR_ASSERT (psMemInfo && psDevPAddr)
PVR_ASSERT((sDevVPageAddr.uiAddr & 0xFFF) == 0);
psDeviceNode = ((BM_BUF*)psMemInfo->sMemBlk.hBuffer)->pMapping->pBMHeap->pBMContext->psDeviceNode;
*psDevPAddr = psDeviceNode->pfnMMUGetPhysPageAddr(((BM_BUF*)psMemInfo->sMemBlk.hBuffer)->pMapping->pBMHeap->pMMUHeap,
sDevVPageAddr);
}