summaryrefslogtreecommitdiffstats
path: root/src/amd/addrlib/r800/siaddrlib.h
diff options
context:
space:
mode:
authorFrans Gu <[email protected]>2016-03-04 05:04:23 -0500
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit6764d96eaaebc641c81cfc5666d99e8aa6ae698c (patch)
tree4d184dd088d406099bbc0c9674ab178100420532 /src/amd/addrlib/r800/siaddrlib.h
parented1aca8e8f8a33f28323c16688880979d2165378 (diff)
amdgpu/addrlib: Adjust bank equation bit order based on macro tile aspect ratio settings
By this way, we can have valid equation for 2D_THIN1 tile mode. Add flag "preferEquation" to return equation index without adjusting input tile mode.
Diffstat (limited to 'src/amd/addrlib/r800/siaddrlib.h')
-rw-r--r--src/amd/addrlib/r800/siaddrlib.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/amd/addrlib/r800/siaddrlib.h b/src/amd/addrlib/r800/siaddrlib.h
index 6daaa2388a7..37e26ffc26e 100644
--- a/src/amd/addrlib/r800/siaddrlib.h
+++ b/src/amd/addrlib/r800/siaddrlib.h
@@ -261,7 +261,7 @@ protected:
// Check if it is supported for given bpp and tile config to generate an equation
BOOL_32 IsEquationSupported(
- UINT_32 bpp, TileConfig tileConfig, INT_32 tileIndex) const;
+ UINT_32 bpp, TileConfig tileConfig, INT_32 tileIndex, UINT_32 elementBytesLog2) const;
// Protected non-virtual functions
VOID ComputeTileCoordFromPipeAndElemIdx(
@@ -289,10 +289,19 @@ protected:
// Max number of bpp (8bpp/16bpp/32bpp/64bpp/128bpp)
static const UINT_32 MaxNumElementBytes = 5;
+
+ static const BOOL_32 m_EquationSupport[TileTableSize][MaxNumElementBytes];
+
+ // Prt tile mode index mask
+ static const UINT_32 SiPrtTileIndexMask = ((1 << 3) | (1 << 5) | (1 << 6) | (1 << 7) |
+ (1 << 21) | (1 << 22) | (1 << 23) | (1 << 24) |
+ (1 << 25) | (1 << 30));
+
// More than half slots in tile mode table can't support equation
- static const UINT_32 EquationTableSize = (MaxNumElementBytes * TileTableSize) / 2;
+ static const UINT_32 EquationTableSize = (MaxNumElementBytes * TileTableSize) / 2;
// Equation table
ADDR_EQUATION m_equationTable[EquationTableSize];
+ UINT_32 m_numMacroBits[EquationTableSize];
UINT_32 m_blockWidth[EquationTableSize];
UINT_32 m_blockHeight[EquationTableSize];
UINT_32 m_blockSlices[EquationTableSize];
@@ -301,6 +310,8 @@ protected:
// Equation lookup table according to bpp and tile index
UINT_32 m_equationLookupTable[MaxNumElementBytes][TileTableSize];
+ UINT_32 m_uncompressDepthEqIndex;
+
private:
VOID ReadGbTileMode(UINT_32 regValue, TileConfig* pCfg) const;