summaryrefslogtreecommitdiffstats
path: root/src/amd/addrlib/r800
diff options
context:
space:
mode:
authorXavi Zhang <[email protected]>2014-11-24 22:49:50 -0500
committerMarek Olšák <[email protected]>2017-03-30 14:44:33 +0200
commit2bf243f7c6fdea49737a27923d7ed24bb835de22 (patch)
tree4f487e9e27d50774805d58cc8a32868bb9d7f2f3 /src/amd/addrlib/r800
parente443b4896645ef30b93f3c801679d295d76175f0 (diff)
amdgpu/addrlib: add dccRamSizeAligned output flag
This flag indicates to the client if this level's DCC memory is aligned or not. No aligned means there are padding to the end.
Diffstat (limited to 'src/amd/addrlib/r800')
-rw-r--r--src/amd/addrlib/r800/ciaddrlib.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/addrlib/r800/ciaddrlib.cpp b/src/amd/addrlib/r800/ciaddrlib.cpp
index 776c8b5ce36..97ef3b6a8d1 100644
--- a/src/amd/addrlib/r800/ciaddrlib.cpp
+++ b/src/amd/addrlib/r800/ciaddrlib.cpp
@@ -247,6 +247,7 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeDccInfo(
HwlGetPipes(&pIn->tileInfo) *
m_pipeInterleaveBytes;
pOut->dccFastClearSize = dccFastClearSize;
+ pOut->dccRamSizeAligned = TRUE;
ADDR_ASSERT(IsPow2(pOut->dccRamBaseAlign));
@@ -262,6 +263,10 @@ ADDR_E_RETURNCODE CiAddrLib::HwlComputeDccInfo(
{
pOut->dccFastClearSize = PowTwoAlign(pOut->dccRamSize, dccRamSizeAlign);
}
+ if ((pOut->dccRamSize & (dccRamSizeAlign - 1)) != 0)
+ {
+ pOut->dccRamSizeAligned = FALSE;
+ }
pOut->dccRamSize = PowTwoAlign(pOut->dccRamSize, dccRamSizeAlign);
pOut->subLvlCompressible = FALSE;
}