summaryrefslogtreecommitdiff
path: root/src/amd/addrlib
AgeCommit message (Collapse)AuthorFilesLines
2017-04-10amd/addrlib: use correct variable name in headerThomas Hindoe Paaboel Andersen1-1/+1
Since the inclusion in 7f160efcde41b52ad78e562316384373dab419e3 the header used x_biased, while the implementation used y_biased. This changes the header to macth the implementation since the uses of the function seems to expect y_biased. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-04amd/addrlib: second update for Vega10 + bug fixesMarek Olšák17-2132/+3298
Highlights: - Display needs tiled pitch alignment to be at least 32 pixels - Implement Addr2ComputeDccAddrFromCoord(). - Macro-pixel packed formats don't support Z swizzle modes - Pad pitch and base alignment of PRT + TEX1D to 64KB. - Fix support for multimedia formats - Fix a case "PRT" entries are not selected on SI. - Fix wrong upper bits in equations for 3D resource. - We can't support 2d array slice rotation in gfx8 swizzle pattern - Set base alignment for PRT + non-xor swizzle mode resource to 64KB. - Bug workaround for Z16 4x/8x and Z32 2x/4x/8x MSAA depth texture - Add stereo support - Optimize swizzle mode selection - Report pitch and height in pixels for each mip - Adjust bpp/expandX for format ADDR_FMT_GB_GR/ADDR_FMT_BG_RG - Correct tcCompatible flag output for mipmap surface - Other fixes and cleanups Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-04-03amd/addrlib: fix optimized build warningsGrazvydas Ignotas1-1/+1
All the -Wunused-but-set-variable ones. Found a way to do it with a oneliner. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2017-03-30Partially revert "amd/addrlib: silence warnings" to fix builds with DEBUGMarek Olšák3-6/+6
This partially reverts commit 8a74140a21fe6b0d2e8a60b065b890f797f2db51.
2017-03-30amd/addrlib: silence warningsMarek Olšák4-15/+15
2017-03-30amd/addrlib: import gfx9 supportNicolai Hähnle16-3/+22032
2017-03-30amd/addrlib: Not all ETC2 formats are 128bpp... add new ETC2 formats to ↵Kevin Furrow3-19/+45
differentiate between 64 and 128bpp formats.
2017-03-30amd/addrlib: Fix selection of swizzle modes for 3D compressed images.Kevin Furrow1-1/+2
2017-03-30amd/addrlib: Add support for ETC2 and ASTC formats.Kevin Furrow3-1/+119
2017-03-30amd/addrlib: Bump version to 6.02Joe Ma1-1/+1
2017-03-30amd/addrlib: Adjust slie size after pitch and actual height adjustmentFrans Gu1-26/+31
2017-03-30amd/addrlib: Apply input pitch after internal pitch aligningFrans Gu1-12/+33
2017-03-30amdgpu/addrlib: Bump version to 6.01Nicolai Hähnle1-2/+2
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Seperate 2 dcc related workarounds by different flagsNicolai Hähnle3-3/+9
1) dccCompatible for padding MSAA surface to support fast clear 2) dccPipeWorkaround for padding surface to support dcc
2017-03-30amdgpu/addrlib: Fix the issue that tcCompatible HTILE slice size is not ↵Nicolai Hähnle2-0/+18
calculated correctly
2017-03-30amdgpu/addrlib: Add a new output flag to notify client that the returned ↵Nicolai Hähnle2-1/+5
tile index is for PRT on SI If this flag is set for mip0, client should set prt flag for sub mips, so that address lib can select the correct tile index for sub mips.
2017-03-30amdgpu/addrlib: add matchStencilTileCfg and tcCompatible fixesXavi Zhang4-20/+152
The usage should be client first call AddrComputeSurfaceInfo() on depth surface with flag "matchStencilTilecfg", AddrLib will use 2DThin1 tile index for depth as much as possible and do not down grade unless alignment requirement cannot be met. 1. If there is a matched 2DThin1 tile index for stencil which make sure they will share same tile config parameters, then return the stencil 2DThin1 tile index as well. 2. If using 2DThin1 tile mode cannot make sure such thing happen, and TcCompatible flag was set, then ignore this flag then try 2DThin1 tile mode for depth and stencil again. 3. If 2DThin1 tile mode cannot make sure depth and stencil to have same tile config parameters, then down grade depth surface tile mode to 1DThin1. 4. If depth surface's tile mode was 1DThin1, then return 1DThin1 tile index for stencil. 5. If depth surface's tile mode is PRT, then return invalid tile index to stencil since their tile config parameters will never be met. Client driver then check the returned tile index of stencil -- if it is not invalid tile index, then call AddrComputeSurfaceInfo() on stencil surface with the returned stencil tile index to get full output information. Please note, client needs to set flag "useTileIndex" when AddrLib get created.
2017-03-30amdgpu/addrlib: Adjust bank equation bit order based on macro tile aspect ↵Frans Gu4-91/+282
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.
2017-03-30amdgpu/addrlib: do some tile mode conversions to display surfaceFrans Gu1-2/+3
2017-03-30amdgpu/addrlib: Check prt flag for PRT_THIN1 extra padding for DCC.Xavi Zhang6-92/+56
2017-03-30amdgpu/addrlib: Add new flags minimizePadding and maxBaseAlignFrans Gu9-157/+401
1) minimizePadding - Use 1D tile mode if padded size of 2D is bigger than 1D 2) maxBaseAlign - Force PRT tile mode if macro block size is bigger than requested alignment. Also, related changes to tile mode optimization for needEquation.
2017-03-30amdgpu/addrlib: Always returns pixelPitch in original pixelsXavi Zhang1-14/+10
2017-03-30amdgpu/addrlib: fix crash on allocation failureSabre Shao5-36/+31
2017-03-30amdgpu/addrlib: Add flag to report if a surface can have dcc ramFrans Gu3-4/+28
2017-03-30amdgpu/addrlib: support non-power2 height alignment (for linear surface)Roy Zhan1-1/+10
2017-03-30amdgpu/addrlib: Fix family setting for VI and CZ ASICsFrans Gu1-0/+2
2017-03-30amdgpu/addrlib: style cleanupNicolai Hähnle2-28/+15
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Pad pitch to multiples of 256 for DCC surface on FijiNicolai Hähnle8-49/+131
The change also modifies function CiLib::HwlPadDimensions to report adjusted pitch alignment.
2017-03-30amdgpu/addrlib: Fix number of //Xavi Zhang8-66/+66
Find ^/{80,99}$ and replace them to 100 "/" Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Cleanup.Nicolai Hähnle13-73/+68
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Use namespacesXavi Zhang16-892/+969
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Adjust 99 "*" to 100 "*" alignmentKevin Zhao18-895/+895
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Add a new tile mode ADDR_TM_UNKNOWNFrans Gu8-14/+211
This can be used by address lib client to ask address lib to select tile mode.
2017-03-30amdgpu/addrlib: Stylish cleanup.Xavi Zhang5-17/+16
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-30amdgpu/addrlib: Disable tcComaptible when depth surface is not macro tiledRoy Zhan1-17/+20
Experiment show 1D tiling + TcCompatible cannot work together.
2017-03-30amdgpu/addrlib: fix pixel index calculation of thick micro tilingXavi Zhang1-4/+4
2017-03-30amdgpu/addrlib: Add a flag to skip calculate indicesXavi Zhang3-14/+21
This is useful for debugging and special cases for stencil surfaces do not require texture fetch compatible.
2017-03-30amdgpu/addrlib: add equation generationNicolai Hähnle12-118/+1344
1. Add new surface flags needEquation for client driver use to force the surface tile setting equation compatible. Override 2D/3D macro tile mode to PRT_* tile mode if this flag is TRUE and num slice > 1. 2. Add numEquations and pEquationTable in ADDR_CREATE_OUTPUT structure to return number of equations and the equation table to client driver 3. Add equationIndex in ADDR_COMPUTE_SURFACE_INFO_OUTPUT structure to return the equation index to client driver Please note the use of address equation has following restrictions: 1) The surface can't be splitable 2) The surface can't have non zero tile swizzle value 3) Surface with > 1 slices must have PRT tile mode, which disable slice rotation
2017-03-30amdgpu/addrlib: rename ComputeSurfaceThickness to ThicknessNicolai Hähnle5-32/+32
2017-03-30amdgpu/addrlib: add define HAVE_TSERVERXavi Zhang2-6/+6
2017-03-30amdgpu/addrlib: Add new interface to support macro mode index queryFrans Gu4-0/+115
2017-03-30amdgpu/addrlib: add explicit Log2NonPow2 functionRoy Zhan1-8/+20
2017-03-30amdgpu/addrlib: Fix invalid access to m_tileTableNicolai Hähnle1-6/+17
Sometimes client driver passes valid tile info into address library, in this case, the tile index is computed in function HwlPostCheckTileIndex instead of CiAddrLib::HwlSetupTileCfg. We need to call HwlPostCheckTileIndex to calculate the correct tile index to get tile split bytes for this case.
2017-03-30amdgpu/addrlib: add ADDR_ANALYSIS_ASSUMENicolai Hähnle3-10/+20
It helps fix analysis warnings in MSC.
2017-03-30amdgpu/addrlib: add tcCompatible htile addr from coordinate support.XiaoYuan Zheng5-13/+80
2017-03-30amdgpu/addrlib: force all zero tile info for linear general.Carlos Xiong1-1/+10
2017-03-30amdgpu/addrlib: Add a member "bpp" for input of method AddrConvertTileIndex ↵Nicolai Hähnle7-32/+53
and AddrConvertTileInfoToHW When clients queries tile Info from tile index and expects accurate tileSplit info, bits per pixel info is required to be provided since this is necessary for computing tileSplitBytes; otherwise Addrlib will return value of "tileBytes" instead if bpp is 0 - which is also current logic. If clients don't need tileSplit info, it's OK to pass bpp with value 0.
2017-03-30amdgpu/addrlib: Refine the PRT tile mode selectionFrans Gu2-51/+19
Switch the tile index based on logic instead of hardcoded threshold for different ASIC.
2017-03-30amdgpu/addrlib: add dccRamSizeAligned output flagXavi Zhang2-1/+7
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.
2017-03-30amdgpu/addrlib: Change comment alignmentNicolai Hähnle1-12/+12
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>