当前位置: 首页>>代码示例>>C++>>正文


C++ PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr方法代码示例

本文整理汇总了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;
}
开发者ID:,项目名称:,代码行数:53,代码来源:

示例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);
}
开发者ID:,项目名称:,代码行数:18,代码来源:


注:本文中的PVRSRV_DEVICE_NODE::pfnMMUGetPhysPageAddr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。