amdgpu/addrlib: support non-power2 height alignment (for linear surface)

This commit is contained in:
Roy Zhan 2016-01-10 07:56:11 -05:00 committed by Marek Olšák
parent c867a2b222
commit ca88f83222

View file

@ -3278,7 +3278,16 @@ VOID Lib::PadDimensions(
if (padDims > 1)
{
*pHeight = PowTwoAlign((*pHeight), heightAlign);
if (IsPow2(heightAlign))
{
*pHeight = PowTwoAlign((*pHeight), heightAlign);
}
else
{
*pHeight += heightAlign - 1;
*pHeight /= heightAlign;
*pHeight *= heightAlign;
}
}
if (padDims > 2 || thickness > 1)