summaryrefslogtreecommitdiffstats
path: root/src/amd/addrlib/addrinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/addrlib/addrinterface.cpp')
-rw-r--r--src/amd/addrlib/addrinterface.cpp90
1 files changed, 90 insertions, 0 deletions
diff --git a/src/amd/addrlib/addrinterface.cpp b/src/amd/addrlib/addrinterface.cpp
index 12985fc37b6..ea2506e440f 100644
--- a/src/amd/addrlib/addrinterface.cpp
+++ b/src/amd/addrlib/addrinterface.cpp
@@ -1529,6 +1529,38 @@ ADDR_E_RETURNCODE ADDR_API Addr2ComputeDccInfo(
/**
****************************************************************************************************
+* Addr2ComputeDccAddrFromCoord
+*
+* @brief
+* Compute DCC key address according to coordinates
+*
+* @return
+* ADDR_OK if successful, otherwise an error code of ADDR_E_RETURNCODE
+****************************************************************************************************
+*/
+ADDR_E_RETURNCODE ADDR_API Addr2ComputeDccAddrFromCoord(
+ ADDR_HANDLE hLib, ///< address lib handle
+ const ADDR2_COMPUTE_DCC_ADDRFROMCOORD_INPUT* pIn, ///< [in] Dcc info and coordinates
+ ADDR2_COMPUTE_DCC_ADDRFROMCOORD_OUTPUT* pOut) ///< [out] Dcc address
+{
+ V2::Lib* pLib = V2::Lib::GetLib(hLib);
+
+ ADDR_E_RETURNCODE returnCode = ADDR_OK;
+
+ if (pLib != NULL)
+ {
+ returnCode = pLib->ComputeDccAddrFromCoord(pIn, pOut);
+ }
+ else
+ {
+ returnCode = ADDR_ERROR;
+ }
+
+ return returnCode;
+}
+
+/**
+****************************************************************************************************
* Addr2ComputePipeBankXor
*
* @brief
@@ -1558,6 +1590,64 @@ ADDR_E_RETURNCODE ADDR_API Addr2ComputePipeBankXor(
/**
****************************************************************************************************
+* Addr2ComputeSlicePipeBankXor
+*
+* @brief
+* Calculate slice pipe bank xor value based on base pipe bank xor and slice id.
+****************************************************************************************************
+*/
+ADDR_E_RETURNCODE ADDR_API Addr2ComputeSlicePipeBankXor(
+ ADDR_HANDLE hLib, ///< handle of addrlib
+ const ADDR2_COMPUTE_SLICE_PIPEBANKXOR_INPUT* pIn, ///< [in] input
+ ADDR2_COMPUTE_SLICE_PIPEBANKXOR_OUTPUT* pOut) ///< [out] output
+{
+ ADDR_E_RETURNCODE returnCode;
+
+ V2::Lib* pLib = V2::Lib::GetLib(hLib);
+
+ if (pLib != NULL)
+ {
+ returnCode = pLib->ComputeSlicePipeBankXor(pIn, pOut);
+ }
+ else
+ {
+ returnCode = ADDR_ERROR;
+ }
+
+ return returnCode;
+}
+
+/**
+****************************************************************************************************
+* Addr2ComputeSubResourceOffsetForSwizzlePattern
+*
+* @brief
+* Calculate sub resource offset for swizzle pattern.
+****************************************************************************************************
+*/
+ADDR_E_RETURNCODE ADDR_API Addr2ComputeSubResourceOffsetForSwizzlePattern(
+ ADDR_HANDLE hLib, ///< handle of addrlib
+ const ADDR2_COMPUTE_SUBRESOURCE_OFFSET_FORSWIZZLEPATTERN_INPUT* pIn, ///< [in] input
+ ADDR2_COMPUTE_SUBRESOURCE_OFFSET_FORSWIZZLEPATTERN_OUTPUT* pOut) ///< [out] output
+{
+ ADDR_E_RETURNCODE returnCode;
+
+ V2::Lib* pLib = V2::Lib::GetLib(hLib);
+
+ if (pLib != NULL)
+ {
+ returnCode = pLib->ComputeSubResourceOffsetForSwizzlePattern(pIn, pOut);
+ }
+ else
+ {
+ returnCode = ADDR_ERROR;
+ }
+
+ return returnCode;
+}
+
+/**
+****************************************************************************************************
* Addr2GetPreferredSurfaceSetting
*
* @brief