amdgpu/addrlib: Add new interface to support macro mode index query

This commit is contained in:
Frans Gu
2015-04-10 04:20:06 -04:00
committed by Marek Olšák
parent c16e1e2041
commit 7293a020bd
4 changed files with 115 additions and 0 deletions
+37
View File
@@ -1079,6 +1079,43 @@ ADDR_E_RETURNCODE AddrLib1::ConvertTileIndex(
return returnCode;
}
/**
***************************************************************************************************
* AddrLib1::GetMacroModeIndex
*
* @brief
* Get macro mode index based on input info
*
* @return
* ADDR_E_RETURNCODE
***************************************************************************************************
*/
ADDR_E_RETURNCODE AddrLib1::GetMacroModeIndex(
const ADDR_GET_MACROMODEINDEX_INPUT* pIn, ///< [in] input structure
ADDR_GET_MACROMODEINDEX_OUTPUT* pOut ///< [out] output structure
) const
{
ADDR_E_RETURNCODE returnCode = ADDR_OK;
if (GetFillSizeFieldsFlags())
{
if ((pIn->size != sizeof(ADDR_GET_MACROMODEINDEX_INPUT)) ||
(pOut->size != sizeof(ADDR_GET_MACROMODEINDEX_OUTPUT)))
{
returnCode = ADDR_PARAMSIZEMISMATCH;
}
}
if (returnCode == ADDR_OK)
{
ADDR_TILEINFO tileInfo = {0};
pOut->macroModeIndex = HwlComputeMacroModeIndex(pIn->tileIndex, pIn->flags, pIn->bpp,
pIn->numFrags, &tileInfo);
}
return returnCode;
}
/**
***************************************************************************************************
* AddrLib1::ConvertTileIndex1