*pMacroHeight = numTiles * MicroTileHeight;
}
-/**
-***************************************************************************************************
-* CiAddrLib::HwlStereoCheckRightOffsetPadding
-*
-* @brief
-* check if the height needs extra padding for stereo right eye offset, to avoid swizzling
-*
-* @return
-* TRUE is the extra padding is needed
-*
-* @note
-* Kalindi (Kabini) is the only one that needs this padding as there is a uncertain
-* possible HW issue where the right eye displays incorrectly with some type of swizzles, if
-* the right eye offset is not 64KB aligned - EPR#366461
-* Other Kaveri APUs also need the padding according to DXX team's report otherwise
-* corruption observed. - EPR#374788
-***************************************************************************************************
-*/
-BOOL_32 CiAddrLib::HwlStereoCheckRightOffsetPadding() const
-{
- BOOL_32 bNeedPadding = FALSE;
-
- if (m_settings.isKaveri)
- {
- bNeedPadding = TRUE;
- }
-
- return bNeedPadding;
-}
-
/**
***************************************************************************************************
* CiAddrLib::HwlComputeMetadataNibbleAddress
&expNumSlices, microTileThickness);
if (pIn->flags.qbStereo &&
- (pOut->pStereoInfo != NULL) &&
- HwlStereoCheckRightOffsetPadding())
+ (pOut->pStereoInfo != NULL))
{
- // Eye height's bank bits are different from y == 0?
- // Since 3D rendering treats right eye buffer starting from y == "eye height" while
- // display engine treats it to be 0, so the bank bits may be different, we pad
- // more in height to make sure y == "eye height" has the same bank bits as y == 0.
- UINT_32 checkMask = pOut->pTileInfo->banks - 1;
- UINT_32 bankBits = 0;
- do
- {
- bankBits = (paddedHeight / 8 / pOut->pTileInfo->bankHeight) & checkMask;
+ UINT_32 stereoHeightAlign = HwlStereoCheckRightOffsetPadding(pOut->pTileInfo);
- if (bankBits)
- {
- paddedHeight += pOut->heightAlign;
- }
- } while (bankBits);
+ if (stereoHeightAlign != 0)
+ {
+ paddedHeight = PowTwoAlign(paddedHeight, stereoHeightAlign);
+ }
}
//
return logicalSliceSize;
}
+/**
+***************************************************************************************************
+* EgBasedAddrLib::HwlStereoCheckRightOffsetPadding
+*
+* @brief
+* check if the height needs extra padding for stereo right eye offset, to avoid swizzling
+*
+* @return
+* TRUE is the extra padding is needed
+*
+***************************************************************************************************
+*/
+UINT_32 EgBasedAddrLib::HwlStereoCheckRightOffsetPadding(
+ ADDR_TILEINFO* pTileInfo ///< Tiling info
+ ) const
+{
+ UINT_32 stereoHeightAlign = 0;
+
+ if (pTileInfo->macroAspectRatio > 2)
+ {
+ // Since 3D rendering treats right eye surface starting from y == "eye height" while
+ // display engine treats it to be 0, so the bank bits may be different.
+ // Additional padding in height is required to make sure it's possible
+ // to achieve synonym by adjusting bank swizzle of right eye surface.
+
+ static const UINT_32 StereoAspectRatio = 2;
+ stereoHeightAlign = pTileInfo->banks *
+ pTileInfo->bankHeight *
+ MicroTileHeight /
+ StereoAspectRatio;
+ }
+
+ return stereoHeightAlign;
+}
{
}
- /// Virtual function to check if the height needs extra padding
- /// for stereo right eye offset, to avoid bank pipe swizzle
- virtual BOOL_32 HwlStereoCheckRightOffsetPadding() const
- {
- return FALSE;
- }
+ virtual UINT_32 HwlStereoCheckRightOffsetPadding(ADDR_TILEINFO* pTileInfo) const;
virtual BOOL_32 HwlReduceBankWidthHeight(
UINT_32 tileSize, UINT_32 bpp, ADDR_SURFACE_FLAGS flags, UINT_32 numSamples,