amdgpu/addrlib: Cleanup.
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 20 Jul 2016 19:13:41 +0000 (21:13 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
13 files changed:
src/amd/addrlib/core/addrcommon.h
src/amd/addrlib/core/addrelemlib.cpp
src/amd/addrlib/core/addrelemlib.h
src/amd/addrlib/core/addrlib.cpp
src/amd/addrlib/core/addrlib.h
src/amd/addrlib/core/addrlib1.cpp
src/amd/addrlib/core/addrlib1.h
src/amd/addrlib/core/addrobject.cpp
src/amd/addrlib/core/addrobject.h
src/amd/addrlib/r800/ciaddrlib.cpp
src/amd/addrlib/r800/ciaddrlib.h
src/amd/addrlib/r800/egbaddrlib.cpp
src/amd/addrlib/r800/siaddrlib.cpp

index 9b0cc6d..caed63f 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addrcommon.h
-* @brief Contains the helper function and constants
+* @brief Contains the helper function and constants.
 ****************************************************************************************************
 */
 
index b894f49..c9d2074 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addrelemlib.cpp
-* @brief Contains the class implementation for element/pixel related functions
+* @brief Contains the class implementation for element/pixel related functions.
 ****************************************************************************************************
 */
 
@@ -720,7 +720,7 @@ VOID ElemLib::GetCompType(
 */
 VOID ElemLib::GetCompSwap(
     AddrSurfaceSwap  swap,   ///< [in] swap mode
-    PixelFormatInfo* pInfo)  ///< [in/out] output per component info
+    PixelFormatInfo* pInfo)  ///< [in,out] output per component info
 {
     switch (pInfo->comps)
     {
@@ -811,7 +811,7 @@ VOID ElemLib::GetCompSwap(
 VOID ElemLib::SwapComps(
     UINT_32          c0,     ///< [in] component index 0
     UINT_32          c1,     ///< [in] component index 1
-    PixelFormatInfo* pInfo)  ///< [in/out] output per component info
+    PixelFormatInfo* pInfo)  ///< [in,out] output per component info
 {
     UINT_32 start;
     UINT_32 bits;
@@ -1127,10 +1127,10 @@ VOID ElemLib::AdjustSurfaceInfo(
     ElemMode        elemMode,       ///< [in] element mode
     UINT_32         expandX,        ///< [in] decompression expansion factor in X
     UINT_32         expandY,        ///< [in] decompression expansion factor in Y
-    UINT_32*        pBpp,           ///< [in/out] bpp
-    UINT_32*        pBasePitch,     ///< [in/out] base pitch
-    UINT_32*        pWidth,         ///< [in/out] width
-    UINT_32*        pHeight)        ///< [in/out] height
+    UINT_32*        pBpp,           ///< [in,out] bpp
+    UINT_32*        pBasePitch,     ///< [in,out] base pitch
+    UINT_32*        pWidth,         ///< [in,out] width
+    UINT_32*        pHeight)        ///< [in,out] height
 {
     UINT_32 packedBits;
     UINT_32 basePitch;
@@ -1252,9 +1252,9 @@ VOID ElemLib::RestoreSurfaceInfo(
     ElemMode        elemMode,       ///< [in] element mode
     UINT_32         expandX,        ///< [in] decompression expansion factor in X
     UINT_32         expandY,        ///< [out] decompression expansion factor in Y
-    UINT_32*        pBpp,           ///< [in/out] bpp
-    UINT_32*        pWidth,         ///< [in/out] width
-    UINT_32*        pHeight)        ///< [in/out] height
+    UINT_32*        pBpp,           ///< [in,out] bpp
+    UINT_32*        pWidth,         ///< [in,out] width
+    UINT_32*        pHeight)        ///< [in,out] height
 {
     UINT_32 originalBits;
     UINT_32 width;
@@ -1561,7 +1561,7 @@ VOID ElemLib::GetCompBits(
 ****************************************************************************************************
 */
 VOID ElemLib::SetClearComps(
-    ADDR_FLT_32 comps[4],   ///< [in/out] components
+    ADDR_FLT_32 comps[4],   ///< [in,out] components
     BOOL_32 clearColor,     ///< [in] TRUE if clear color is set (CLEAR_COLOR)
     BOOL_32 float32)        ///< [in] TRUE if float32 component (BLEND_FLOAT32)
 {
index 2875026..c95c9d6 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addrelemlib.h
-* @brief Contains the class for element/pixel related functions
+* @brief Contains the class for element/pixel related functions.
 ****************************************************************************************************
 */
 
index 8553ca6..d4b31e6 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addrlib.cpp
-* @brief Contains the implementation for the AddrLib base class..
+* @brief Contains the implementation for the Addr::Lib class.
 ****************************************************************************************************
 */
 
index 10d029f..e5d4c57 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addrlib.h
-* @brief Contains the AddrLib base class definition.
+* @brief Contains the Addr::Lib base class definition.
 ****************************************************************************************************
 */
 
 #define CIASICIDGFXENGINE_SOUTHERNISLAND 0x0000000A
 #endif
 
-#ifndef CIASICIDGFXENGINE_SEAISLAND
-#define CIASICIDGFXENGINE_SEAISLAND 0x0000000B
-#endif
-
 namespace Addr
 {
 
@@ -227,36 +223,36 @@ private:
     VOID SetMinPitchAlignPixels(UINT_32 minPitchAlignPixels);
 
 protected:
-    LibClass            m_class;        ///< Store class type (HWL type)
+    LibClass    m_class;        ///< Store class type (HWL type)
 
-    ChipFamily          m_chipFamily;   ///< Chip family translated from the one in atiid.h
+    ChipFamily  m_chipFamily;   ///< Chip family translated from the one in atiid.h
 
-    UINT_32             m_chipRevision; ///< Revision id from xxx_id.h
+    UINT_32     m_chipRevision; ///< Revision id from xxx_id.h
 
-    UINT_32             m_version;      ///< Current version
+    UINT_32     m_version;      ///< Current version
 
     //
     // Global parameters
     //
-    ConfigFlags         m_configFlags;    ///< Global configuration flags. Note this is setup by
+    ConfigFlags m_configFlags;          ///< Global configuration flags. Note this is setup by
                                         ///  AddrLib instead of Client except forceLinearAligned
 
-    UINT_32             m_pipes;        ///< Number of pipes
-    UINT_32             m_banks;        ///< Number of banks
+    UINT_32     m_pipes;                ///< Number of pipes
+    UINT_32     m_banks;                ///< Number of banks
                                         ///  For r800 this is MC_ARB_RAMCFG.NOOFBANK
                                         ///  Keep it here to do default parameter calculation
 
-    UINT_32             m_pipeInterleaveBytes;
+    UINT_32     m_pipeInterleaveBytes;
                                         ///< Specifies the size of contiguous address space
                                         ///  within each tiling pipe when making linear
                                         ///  accesses. (Formerly Group Size)
 
-    UINT_32             m_rowSize;      ///< DRAM row size, in bytes
+    UINT_32     m_rowSize;              ///< DRAM row size, in bytes
 
-    UINT_32             m_minPitchAlignPixels; ///< Minimum pitch alignment in pixels
-    UINT_32             m_maxSamples;   ///< Max numSamples
+    UINT_32     m_minPitchAlignPixels;  ///< Minimum pitch alignment in pixels
+    UINT_32     m_maxSamples;           ///< Max numSamples
 private:
-    ElemLib*            m_pElemLib;     ///< Element Lib pointer
+    ElemLib*    m_pElemLib;             ///< Element Lib pointer
 };
 
 Lib* SiHwlInit  (const Client* pClient);
@@ -265,4 +261,3 @@ Lib* CiHwlInit  (const Client* pClient);
 } // Addr
 
 #endif
-
index e7ac385..f0cd58c 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addr1lib.cpp
-* @brief Contains the implementation for the AddrLib1 base class..
+* @brief Contains the implementation for the Addr::V1::Lib base class.
 ****************************************************************************************************
 */
 
@@ -1706,7 +1706,6 @@ ADDR_E_RETURNCODE Lib::ComputeCmaskCoordFromAddr(
     return returnCode;
 }
 
-
 /**
 ****************************************************************************************************
 *   Lib::ComputeTileDataWidthAndHeight
@@ -3225,14 +3224,14 @@ VOID Lib::PadDimensions(
     UINT_32             bpp,         ///< [in] bits per pixel
     ADDR_SURFACE_FLAGS  flags,       ///< [in] surface flags
     UINT_32             numSamples,  ///< [in] number of samples
-    ADDR_TILEINFO*      pTileInfo,   ///< [in/out] bank structure.
+    ADDR_TILEINFO*      pTileInfo,   ///< [in,out] bank structure.
     UINT_32             padDims,     ///< [in] Dimensions to pad valid value 1,2,3
     UINT_32             mipLevel,    ///< [in] MipLevel
-    UINT_32*            pPitch,      ///< [in/out] pitch in pixels
+    UINT_32*            pPitch,      ///< [in,out] pitch in pixels
     UINT_32             pitchAlign,  ///< [in] pitch alignment
-    UINT_32*            pHeight,     ///< [in/out] height in pixels
+    UINT_32*            pHeight,     ///< [in,out] height in pixels
     UINT_32             heightAlign, ///< [in] height alignment
-    UINT_32*            pSlices,     ///< [in/out] number of slices
+    UINT_32*            pSlices,     ///< [in,out] number of slices
     UINT_32             sliceAlign   ///< [in] number of slice alignment
     ) const
 {
@@ -3487,7 +3486,7 @@ BOOL_32 Lib::IsPrtTileMode(
 ****************************************************************************************************
 */
 VOID Lib::ComputeMipLevel(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn ///< [in/out] Input structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn ///< [in,out] Input structure
     ) const
 {
     if (ElemLib::IsBlockCompressed(pIn->format))
@@ -3656,7 +3655,7 @@ AddrTileMode Lib::DegradeLargeThickTile(
 ****************************************************************************************************
 */
 ADDR_E_RETURNCODE Lib::PostComputeMipLevel(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT*    pIn,   ///< [in/out] Input structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT*    pIn,   ///< [in,out] Input structure
     ADDR_COMPUTE_SURFACE_INFO_OUTPUT*   pOut   ///< [out] Output structure
     ) const
 {
@@ -3737,7 +3736,7 @@ UINT_32 Lib::HwlGetPipes(
 ****************************************************************************************************
 */
 BOOL_32 Lib::ComputeQbStereoInfo(
-    ADDR_COMPUTE_SURFACE_INFO_OUTPUT*       pOut    ///< [in/out] updated pOut+pStereoInfo
+    ADDR_COMPUTE_SURFACE_INFO_OUTPUT*       pOut    ///< [in,out] updated pOut+pStereoInfo
     ) const
 {
     BOOL_32 success = FALSE;
index 7c19d10..9c66f53 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  addrlib1.h
-* @brief Contains the Lib base class definition.
+* @brief Contains the Addr::V1::Lib class definition.
 ****************************************************************************************************
 */
 
index 0c5f81a..cb62aa0 100644 (file)
@@ -26,7 +26,7 @@
 
 /**
 ****************************************************************************************************
-* @file  Object.cpp
+* @file  addrobject.cpp
 * @brief Contains the Object base class implementation.
 ****************************************************************************************************
 */
index c648386..031103b 100644 (file)
@@ -26,7 +26,7 @@
 
 /**
 ****************************************************************************************************
-* @file  Object.h
+* @file  addrobject.h
 * @brief Contains the Object base class definition.
 ****************************************************************************************************
 */
index 839a268..3c0607e 100644 (file)
@@ -861,7 +861,7 @@ VOID CiLib::HwlFmaskPostThunkSurfInfo(
 AddrTileMode CiLib::HwlDegradeThickTileMode(
     AddrTileMode        baseTileMode,   ///< [in] base tile mode
     UINT_32             numSlices,      ///< [in] current number of slices
-    UINT_32*            pBytesPerTile   ///< [in/out] pointer to bytes per slice
+    UINT_32*            pBytesPerTile   ///< [in,out] pointer to bytes per slice
     ) const
 {
     return baseTileMode;
@@ -880,7 +880,7 @@ AddrTileMode CiLib::HwlDegradeThickTileMode(
 ****************************************************************************************************
 */
 VOID CiLib::HwlOverrideTileMode(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT*    pInOut      ///< [in/out] input output structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT*    pInOut      ///< [in,out] input output structure
     ) const
 {
     AddrTileMode tileMode = pInOut->tileMode;
@@ -1041,7 +1041,7 @@ VOID CiLib::HwlOverrideTileMode(
 ****************************************************************************************************
 */
 VOID CiLib::HwlSelectTileMode(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut     ///< [in/out] input output structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut     ///< [in,out] input output structure
     ) const
 {
     AddrTileMode tileMode;
@@ -1956,14 +1956,14 @@ VOID CiLib::HwlPadDimensions(
     UINT_32             bpp,         ///< [in] bits per pixel
     ADDR_SURFACE_FLAGS  flags,       ///< [in] surface flags
     UINT_32             numSamples,  ///< [in] number of samples
-    ADDR_TILEINFO*      pTileInfo,   ///< [in/out] bank structure.
+    ADDR_TILEINFO*      pTileInfo,   ///< [in,out] bank structure.
     UINT_32             padDims,     ///< [in] Dimensions to pad valid value 1,2,3
     UINT_32             mipLevel,    ///< [in] MipLevel
-    UINT_32*            pPitch,      ///< [in/out] pitch in pixels
+    UINT_32*            pPitch,      ///< [in,out] pitch in pixels
     UINT_32             pitchAlign,  ///< [in] pitch alignment
-    UINT_32*            pHeight,     ///< [in/out] height in pixels
+    UINT_32*            pHeight,     ///< [in,out] height in pixels
     UINT_32             heightAlign, ///< [in] height alignment
-    UINT_32*            pSlices,     ///< [in/out] number of slices
+    UINT_32*            pSlices,     ///< [in,out] number of slices
     UINT_32             sliceAlign   ///< [in] number of slice alignment
     ) const
 {
index 438790a..a9b1607 100644 (file)
@@ -57,7 +57,7 @@ struct CIChipSettings
         UINT_32 isSpectre   : 1;
         UINT_32 isSpooky    : 1;
         UINT_32 isKalindi   : 1;
-        // Hawaii is GFXIP 7.2, similar with CI (Bonaire)
+        // Hawaii is GFXIP 7.2
         UINT_32 isHawaii    : 1;
 
         // VI
index 5de3f99..b151682 100644 (file)
@@ -27,7 +27,7 @@
 /**
 ****************************************************************************************************
 * @file  egbaddrlib.cpp
-* @brief Contains the EgBasedLib class implementation
+* @brief Contains the EgBasedLib class implementation.
 ****************************************************************************************************
 */
 
@@ -49,7 +49,8 @@ namespace V1
 *
 ****************************************************************************************************
 */
-EgBasedLib::EgBasedLib(const Client* pClient) :
+EgBasedLib::EgBasedLib(const Client* pClient)
+    :
     Lib(pClient),
     m_ranks(0),
     m_logicalBanks(0),
@@ -743,7 +744,7 @@ BOOL_32 EgBasedLib::HwlReduceBankWidthHeight(
     UINT_32             numSamples,         ///< [in] number of samples
     UINT_32             bankHeightAlign,    ///< [in] bank height alignment
     UINT_32             pipes,              ///< [in] pipes
-    ADDR_TILEINFO*      pTileInfo           ///< [in/out] bank structure.
+    ADDR_TILEINFO*      pTileInfo           ///< [in,out] bank structure.
     ) const
 {
     UINT_32 macroAspectAlign;
@@ -846,7 +847,7 @@ BOOL_32 EgBasedLib::ComputeSurfaceAlignmentsMacroTiled(
     ADDR_SURFACE_FLAGS  flags,              ///< [in] surface flags
     UINT_32             mipLevel,           ///< [in] mip level
     UINT_32             numSamples,         ///< [in] number of samples
-    ADDR_TILEINFO*      pTileInfo,          ///< [in/out] bank structure.
+    ADDR_TILEINFO*      pTileInfo,          ///< [in,out] bank structure.
     UINT_32*            pBaseAlign,         ///< [out] base address alignment in bytes
     UINT_32*            pPitchAlign,        ///< [out] pitch alignment in pixels
     UINT_32*            pHeightAlign,       ///< [out] height alignment in pixels
@@ -1247,7 +1248,7 @@ BOOL_32 EgBasedLib::HwlDegradeBaseLevel(
 AddrTileMode EgBasedLib::HwlDegradeThickTileMode(
     AddrTileMode        baseTileMode,   ///< [in] base tile mode
     UINT_32             numSlices,      ///< [in] current number of slices
-    UINT_32*            pBytesPerTile   ///< [in/out] pointer to bytes per slice
+    UINT_32*            pBytesPerTile   ///< [in,out] pointer to bytes per slice
     ) const
 {
     ADDR_ASSERT(numSlices < Thickness(baseTileMode));
@@ -4755,8 +4756,8 @@ UINT_64 EgBasedLib::HwlGetSizeAdjustmentMicroTiled(
     UINT_32             numSamples,     ///< [in] number of samples
     UINT_32             baseAlign,      ///< [in] base alignment
     UINT_32             pitchAlign,     ///< [in] pitch alignment
-    UINT_32*            pPitch,         ///< [in/out] pointer to pitch
-    UINT_32*            pHeight         ///< [in/out] pointer to height
+    UINT_32*            pPitch,         ///< [in,out] pointer to pitch
+    UINT_32*            pHeight         ///< [in,out] pointer to height
     ) const
 {
     UINT_64 logicalSliceSize;
index 9d3f5aa..f1f5a1b 100644 (file)
@@ -1527,9 +1527,9 @@ UINT_64 SiLib::HwlGetSizeAdjustmentLinear(
     UINT_32             numSamples,     ///< [in] number of samples
     UINT_32             baseAlign,      ///< [in] base alignment
     UINT_32             pitchAlign,     ///< [in] pitch alignment
-    UINT_32*            pPitch,         ///< [in/out] pointer to pitch
-    UINT_32*            pHeight,        ///< [in/out] pointer to height
-    UINT_32*            pHeightAlign    ///< [in/out] pointer to height align
+    UINT_32*            pPitch,         ///< [in,out] pointer to pitch
+    UINT_32*            pHeight,        ///< [in,out] pointer to height
+    UINT_32*            pHeightAlign    ///< [in,out] pointer to height align
     ) const
 {
     UINT_64 sliceSize;
@@ -1682,8 +1682,8 @@ UINT_64 SiLib::HwlGetSizeAdjustmentMicroTiled(
     UINT_32             numSamples,     ///< [in] number of samples
     UINT_32             baseAlign,      ///< [in] base alignment
     UINT_32             pitchAlign,     ///< [in] pitch alignment
-    UINT_32*            pPitch,         ///< [in/out] pointer to pitch
-    UINT_32*            pHeight         ///< [in/out] pointer to height
+    UINT_32*            pPitch,         ///< [in,out] pointer to pitch
+    UINT_32*            pHeight         ///< [in,out] pointer to height
     ) const
 {
     UINT_64 logicalSliceSize;
@@ -2316,8 +2316,8 @@ UINT_32 SiLib::HwlComputeXmaskCoordYFrom8Pipe(
 */
 VOID SiLib::HwlComputeSurfaceCoord2DFromBankPipe(
     AddrTileMode        tileMode,   ///< [in] tile mode
-    UINT_32*            pX,         ///< [in/out] x coordinate
-    UINT_32*            pY,         ///< [in/out] y coordinate
+    UINT_32*            pX,         ///< [in,out] x coordinate
+    UINT_32*            pY,         ///< [in,out] y coordinate
     UINT_32             slice,      ///< [in] slice index
     UINT_32             bank,       ///< [in] bank number
     UINT_32             pipe,       ///< [in] pipe number
@@ -2555,7 +2555,7 @@ ADDR_E_RETURNCODE SiLib::HwlComputeSurfaceInfo(
 ****************************************************************************************************
 */
 BOOL_32 SiLib::HwlComputeMipLevel(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn ///< [in/out] Input structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn ///< [in,out] Input structure
     ) const
 {
     // basePitch is calculated from level 0 so we only check this for mipLevel > 0
@@ -2595,7 +2595,7 @@ BOOL_32 SiLib::HwlComputeMipLevel(
 */
 VOID SiLib::HwlCheckLastMacroTiledLvl(
     const ADDR_COMPUTE_SURFACE_INFO_INPUT* pIn, ///< [in] Input structure
-    ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut      ///< [in/out] Output structure (used as input, too)
+    ADDR_COMPUTE_SURFACE_INFO_OUTPUT* pOut      ///< [in,out] Output structure (used as input, too)
     ) const
 {
     // pow2Pad covers all mipmap cases
@@ -2672,7 +2672,7 @@ VOID SiLib::HwlCheckLastMacroTiledLvl(
 AddrTileMode SiLib::HwlDegradeThickTileMode(
     AddrTileMode        baseTileMode,   ///< [in] base tile mode
     UINT_32             numSlices,      ///< [in] current number of slices
-    UINT_32*            pBytesPerTile   ///< [in/out] pointer to bytes per slice
+    UINT_32*            pBytesPerTile   ///< [in,out] pointer to bytes per slice
     ) const
 {
     return EgBasedLib::HwlDegradeThickTileMode(baseTileMode, numSlices, pBytesPerTile);
@@ -3146,7 +3146,7 @@ UINT_32 SiLib::HwlComputeFmaskBits(
 ****************************************************************************************************
 */
 VOID SiLib::HwlOverrideTileMode(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT*    pInOut          ///< [in/out] input output structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT*    pInOut          ///< [in,out] input output structure
     ) const
 {
     AddrTileMode tileMode = pInOut->tileMode;
@@ -3216,7 +3216,7 @@ VOID SiLib::HwlOverrideTileMode(
 ****************************************************************************************************
 */
 VOID SiLib::HwlSelectTileMode(
-    ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut     ///< [in/out] input output structure
+    ADDR_COMPUTE_SURFACE_INFO_INPUT* pInOut     ///< [in,out] input output structure
     ) const
 {
     AddrTileMode tileMode;
@@ -3508,9 +3508,9 @@ VOID SiLib::InitEquationTable()
 ****************************************************************************************************
 */
 BOOL_32 SiLib::IsEquationSupported(
-    UINT_32        bpp,         ///< Bits per pixel
+    UINT_32    bpp,         ///< Bits per pixel
     TileConfig tileConfig,  ///< Tile config
-    INT_32         tileIndex    ///< Tile index
+    INT_32     tileIndex    ///< Tile index
     ) const
 {
     BOOL_32 supported = TRUE;