From fd3451babd6cded6794561d74c8919576ba1f97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 24 Feb 2022 11:46:51 -0500 Subject: [PATCH] amd: update addrlib Reviewed-by: Yifan Zhang Tested-by: Yifan Zhang Part-of: --- src/amd/addrlib/inc/addrinterface.h | 10 ++-- src/amd/addrlib/inc/addrtypes.h | 10 ++-- src/amd/addrlib/src/addrinterface.cpp | 10 ++-- src/amd/addrlib/src/amdgpu_asic_addr.h | 17 ++++--- src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h | 47 +++++++++---------- src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h | 47 +++++++++---------- src/amd/addrlib/src/chip/r800/si_gb_reg.h | 10 ++-- src/amd/addrlib/src/core/addrcommon.h | 42 ++++++++++++++--- src/amd/addrlib/src/core/addrelemlib.cpp | 10 ++-- src/amd/addrlib/src/core/addrelemlib.h | 10 ++-- src/amd/addrlib/src/core/addrlib.cpp | 10 ++-- src/amd/addrlib/src/core/addrlib.h | 10 ++-- src/amd/addrlib/src/core/addrlib1.cpp | 10 ++-- src/amd/addrlib/src/core/addrlib1.h | 10 ++-- src/amd/addrlib/src/core/addrlib2.cpp | 8 ++-- src/amd/addrlib/src/core/addrlib2.h | 8 ++-- src/amd/addrlib/src/core/addrobject.cpp | 10 ++-- src/amd/addrlib/src/core/addrobject.h | 10 ++-- src/amd/addrlib/src/core/coord.cpp | 10 ++-- src/amd/addrlib/src/core/coord.h | 10 ++-- .../addrlib/src/gfx10/gfx10SwizzlePattern.h | 8 ++-- src/amd/addrlib/src/gfx10/gfx10addrlib.cpp | 28 +++++------ src/amd/addrlib/src/gfx10/gfx10addrlib.h | 8 ++-- src/amd/addrlib/src/gfx9/gfx9addrlib.cpp | 10 ++-- src/amd/addrlib/src/gfx9/gfx9addrlib.h | 10 ++-- src/amd/addrlib/src/r800/ciaddrlib.cpp | 10 ++-- src/amd/addrlib/src/r800/ciaddrlib.h | 10 ++-- src/amd/addrlib/src/r800/egbaddrlib.cpp | 10 ++-- src/amd/addrlib/src/r800/egbaddrlib.h | 10 ++-- src/amd/addrlib/src/r800/siaddrlib.cpp | 10 ++-- src/amd/addrlib/src/r800/siaddrlib.h | 10 ++-- 31 files changed, 204 insertions(+), 229 deletions(-) diff --git a/src/amd/addrlib/inc/addrinterface.h b/src/amd/addrlib/inc/addrinterface.h index 47f6b5d1482..24d270ecf8b 100644 --- a/src/amd/addrlib/inc/addrinterface.h +++ b/src/amd/addrlib/inc/addrinterface.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/inc/addrtypes.h b/src/amd/addrlib/inc/addrtypes.h index 63c7f0af8af..399c2b63eb4 100644 --- a/src/amd/addrlib/inc/addrtypes.h +++ b/src/amd/addrlib/inc/addrtypes.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/addrinterface.cpp b/src/amd/addrlib/src/addrinterface.cpp index 9e7ca698b8b..7f85a4b6c16 100644 --- a/src/amd/addrlib/src/addrinterface.cpp +++ b/src/amd/addrlib/src/addrinterface.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/amdgpu_asic_addr.h b/src/amd/addrlib/src/amdgpu_asic_addr.h index a17201d7157..95c4e380d06 100644 --- a/src/amd/addrlib/src/amdgpu_asic_addr.h +++ b/src/amd/addrlib/src/amdgpu_asic_addr.h @@ -1,8 +1,7 @@ -/** -*********************************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2017-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -*********************************************************************************************************************** -*/ +***********************************************************************************************************************/ #ifndef _AMDGPU_ASIC_ADDR_H #define _AMDGPU_ASIC_ADDR_H @@ -83,6 +81,7 @@ #define AMDGPU_ICELAND_RANGE 0x01, 0x14 #define AMDGPU_TONGA_RANGE 0x14, 0x28 #define AMDGPU_FIJI_RANGE 0x3C, 0x50 + #define AMDGPU_POLARIS10_RANGE 0x50, 0x5A #define AMDGPU_POLARIS11_RANGE 0x5A, 0x64 #define AMDGPU_POLARIS12_RANGE 0x64, 0x6E @@ -163,11 +162,17 @@ #define ASICREV_IS_RENOIR(r) ASICREV_IS(r, RENOIR) #define ASICREV_IS_NAVI10_P(r) ASICREV_IS(r, NAVI10) + #define ASICREV_IS_NAVI12_P(r) ASICREV_IS(r, NAVI12) + #define ASICREV_IS_NAVI14_M(r) ASICREV_IS(r, NAVI14) + #define ASICREV_IS_SIENNA_CICHLID(r) ASICREV_IS(r, SIENNA_CICHLID) + #define ASICREV_IS_NAVY_FLOUNDER(r) ASICREV_IS(r, NAVY_FLOUNDER) + #define ASICREV_IS_DIMGREY_CAVEFISH(r) ASICREV_IS(r, DIMGREY_CAVEFISH) + #define ASICREV_IS_BEIGE_GOBY(r) ASICREV_IS(r, BEIGE_GOBY) #define ASICREV_IS_VANGOGH(r) ASICREV_IS(r, VANGOGH) diff --git a/src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h b/src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h index 3e3aa66a771..7383c4e0619 100644 --- a/src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h +++ b/src/amd/addrlib/src/chip/gfx10/gfx10_gb_reg.h @@ -1,28 +1,27 @@ /* - * Copyright © 2007-2019 Advanced Micro Devices, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS - * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - */ +************************************************************************************************************************ +* +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE +* +***********************************************************************************************************************/ #if !defined (__GFX10_GB_REG_H__) #define __GFX10_GB_REG_H__ diff --git a/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h b/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h index ca89af6920b..b0be682ccf1 100644 --- a/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h +++ b/src/amd/addrlib/src/chip/gfx9/gfx9_gb_reg.h @@ -1,28 +1,27 @@ /* - * Copyright © 2007-2019 Advanced Micro Devices, Inc. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS - * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - * USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - */ +************************************************************************************************************************ +* +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. +* +* Permission is hereby granted, free of charge, to any person obtaining a +* copy of this software and associated documentation files (the "Software"), +* to deal in the Software without restriction, including without limitation +* the rights to use, copy, modify, merge, publish, distribute, sublicense, +* and/or sell copies of the Software, and to permit persons to whom the +* Software is furnished to do so, subject to the following conditions: +* +* The above copyright notice and this permission notice shall be included in +* all copies or substantial portions of the Software. +* +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +* OTHER DEALINGS IN THE SOFTWARE +* +***********************************************************************************************************************/ #if !defined (__GFX9_GB_REG_H__) #define __GFX9_GB_REG_H__ diff --git a/src/amd/addrlib/src/chip/r800/si_gb_reg.h b/src/amd/addrlib/src/chip/r800/si_gb_reg.h index 4c8a4535698..3f5f4071eb1 100644 --- a/src/amd/addrlib/src/chip/r800/si_gb_reg.h +++ b/src/amd/addrlib/src/chip/r800/si_gb_reg.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ #if !defined (__SI_GB_REG_H__) #define __SI_GB_REG_H__ diff --git a/src/amd/addrlib/src/core/addrcommon.h b/src/amd/addrlib/src/core/addrcommon.h index dc00057f891..02e54438147 100644 --- a/src/amd/addrlib/src/core/addrcommon.h +++ b/src/amd/addrlib/src/core/addrcommon.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** @@ -449,6 +447,38 @@ static inline INT_32 Max( return ((value1 > (value2)) ? (value1) : value2); } +/** +**************************************************************************************************** +* RoundUpQuotient +* +* @brief +* Divides two numbers, rounding up any remainder. +**************************************************************************************************** +*/ +static inline UINT_32 RoundUpQuotient( + UINT_32 numerator, + UINT_32 denominator) +{ + ADDR_ASSERT(denominator > 0); + return ((numerator + (denominator - 1)) / denominator); +} + +/** +**************************************************************************************************** +* RoundUpQuotient +* +* @brief +* Divides two numbers, rounding up any remainder. +**************************************************************************************************** +*/ +static inline UINT_64 RoundUpQuotient( + UINT_64 numerator, + UINT_64 denominator) +{ + ADDR_ASSERT(denominator > 0); + return ((numerator + (denominator - 1)) / denominator); +} + /** **************************************************************************************************** * NextPow2 diff --git a/src/amd/addrlib/src/core/addrelemlib.cpp b/src/amd/addrlib/src/core/addrelemlib.cpp index d3b1e8eb927..30d7bc8e0cb 100644 --- a/src/amd/addrlib/src/core/addrelemlib.cpp +++ b/src/amd/addrlib/src/core/addrelemlib.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/core/addrelemlib.h b/src/amd/addrlib/src/core/addrelemlib.h index 1e7ff12f6ce..e386e52103e 100644 --- a/src/amd/addrlib/src/core/addrelemlib.h +++ b/src/amd/addrlib/src/core/addrelemlib.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** diff --git a/src/amd/addrlib/src/core/addrlib.cpp b/src/amd/addrlib/src/core/addrlib.cpp index 6266426e218..6e328e12e42 100644 --- a/src/amd/addrlib/src/core/addrlib.cpp +++ b/src/amd/addrlib/src/core/addrlib.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/core/addrlib.h b/src/amd/addrlib/src/core/addrlib.h index 1c121befb1b..334bbe140ee 100644 --- a/src/amd/addrlib/src/core/addrlib.h +++ b/src/amd/addrlib/src/core/addrlib.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/core/addrlib1.cpp b/src/amd/addrlib/src/core/addrlib1.cpp index f55afe35699..00f344da386 100644 --- a/src/amd/addrlib/src/core/addrlib1.cpp +++ b/src/amd/addrlib/src/core/addrlib1.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/core/addrlib1.h b/src/amd/addrlib/src/core/addrlib1.h index fb31ea71e12..b097e7214ad 100644 --- a/src/amd/addrlib/src/core/addrlib1.h +++ b/src/amd/addrlib/src/core/addrlib1.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** diff --git a/src/amd/addrlib/src/core/addrlib2.cpp b/src/amd/addrlib/src/core/addrlib2.cpp index e632ba534d8..a1638c2f478 100644 --- a/src/amd/addrlib/src/core/addrlib2.cpp +++ b/src/amd/addrlib/src/core/addrlib2.cpp @@ -1,8 +1,7 @@ -/** +/* ************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -************************************************************************************************************************ -*/ +***********************************************************************************************************************/ /** diff --git a/src/amd/addrlib/src/core/addrlib2.h b/src/amd/addrlib/src/core/addrlib2.h index 9f8918f8da8..e9cd8a9b208 100644 --- a/src/amd/addrlib/src/core/addrlib2.h +++ b/src/amd/addrlib/src/core/addrlib2.h @@ -1,8 +1,7 @@ -/** +/* ************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -************************************************************************************************************************ -*/ +***********************************************************************************************************************/ /** diff --git a/src/amd/addrlib/src/core/addrobject.cpp b/src/amd/addrlib/src/core/addrobject.cpp index 63b72f885c3..a18072a1df2 100644 --- a/src/amd/addrlib/src/core/addrobject.cpp +++ b/src/amd/addrlib/src/core/addrobject.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** diff --git a/src/amd/addrlib/src/core/addrobject.h b/src/amd/addrlib/src/core/addrobject.h index 5dabfcbaf7e..31b967bf142 100644 --- a/src/amd/addrlib/src/core/addrobject.h +++ b/src/amd/addrlib/src/core/addrobject.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** diff --git a/src/amd/addrlib/src/core/coord.cpp b/src/amd/addrlib/src/core/coord.cpp index 4848f955baf..96e94088cf9 100644 --- a/src/amd/addrlib/src/core/coord.cpp +++ b/src/amd/addrlib/src/core/coord.cpp @@ -1,9 +1,8 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -23,8 +22,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ // Coordinate class implementation #include "addrcommon.h" diff --git a/src/amd/addrlib/src/core/coord.h b/src/amd/addrlib/src/core/coord.h index cbdbb4cc3b2..b3158f818d4 100644 --- a/src/amd/addrlib/src/core/coord.h +++ b/src/amd/addrlib/src/core/coord.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ // Class used to define a coordinate bit diff --git a/src/amd/addrlib/src/gfx10/gfx10SwizzlePattern.h b/src/amd/addrlib/src/gfx10/gfx10SwizzlePattern.h index ea022021a06..4ac52fd2787 100644 --- a/src/amd/addrlib/src/gfx10/gfx10SwizzlePattern.h +++ b/src/amd/addrlib/src/gfx10/gfx10SwizzlePattern.h @@ -1,8 +1,7 @@ -/** +/* ************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -************************************************************************************************************************ -*/ +***********************************************************************************************************************/ /** ************************************************************************************************************************ diff --git a/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp b/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp index a4b48f466cd..e4fc9e3e5e5 100644 --- a/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp +++ b/src/amd/addrlib/src/gfx10/gfx10addrlib.cpp @@ -1,8 +1,7 @@ -/** +/* ************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -************************************************************************************************************************ -*/ +***********************************************************************************************************************/ /** ************************************************************************************************************************ @@ -1072,7 +1070,6 @@ ChipFamily Gfx10Lib::HwlConvertChipFamily( { ADDR_ASSERT(!"Unknown chip revision"); } - break; case FAMILY_YC: @@ -1085,7 +1082,6 @@ ChipFamily Gfx10Lib::HwlConvertChipFamily( { ADDR_ASSERT(!"Unknown chip revision"); } - break; case FAMILY_GC_10_3_6: if (ASICREV_IS_GFX1036(chipRevision)) @@ -2327,10 +2323,10 @@ ADDR_E_RETURNCODE Gfx10Lib::HwlComputeNonBlockCompressedView( // Only 2D resource can have a NonBC view... returnCode = ADDR_INVALIDPARAMS; } - else if ((pIn->format != ADDR_FMT_ASTC_8x8) && + else if (((pIn->format < ADDR_FMT_ASTC_4x4) || (pIn->format > ADDR_FMT_ETC2_128BPP)) && ((pIn->format < ADDR_FMT_BC1) || (pIn->format > ADDR_FMT_BC7))) { - // Only support BC1~BC7 or ASTC_8x8 for now... + // Only support BC1~BC7, ASTC, or ETC2 for now... returnCode = ADDR_NOTSUPPORTED; } else @@ -2343,8 +2339,8 @@ ADDR_E_RETURNCODE Gfx10Lib::HwlComputeNonBlockCompressedView( infoIn.swizzleMode = pIn->swizzleMode; infoIn.resourceType = pIn->resourceType; infoIn.bpp = bpp; - infoIn.width = PowTwoAlign(pIn->width, bcWidth) / bcWidth; - infoIn.height = PowTwoAlign(pIn->height, bcHeight) / bcHeight; + infoIn.width = RoundUpQuotient(pIn->width, bcWidth); + infoIn.height = RoundUpQuotient(pIn->height, bcHeight); infoIn.numSlices = pIn->numSlices; infoIn.numMipLevels = pIn->numMipLevels; infoIn.numSamples = 1; @@ -2396,8 +2392,8 @@ ADDR_E_RETURNCODE Gfx10Lib::HwlComputeNonBlockCompressedView( pOut->pipeBankXor = slicePbXorOut.pipeBankXor; const BOOL_32 inTail = tiled && (pIn->mipId >= infoOut.firstMipIdInTail) ? TRUE : FALSE; - const UINT_32 requestMipWidth = PowTwoAlign(Max(pIn->width >> pIn->mipId, 1u), bcWidth) / bcWidth; - const UINT_32 requestMipHeight = PowTwoAlign(Max(pIn->height >> pIn->mipId, 1u), bcHeight) / bcHeight; + const UINT_32 requestMipWidth = RoundUpQuotient(Max(pIn->width >> pIn->mipId, 1u), bcWidth); + const UINT_32 requestMipHeight = RoundUpQuotient(Max(pIn->height >> pIn->mipId, 1u), bcHeight); if (inTail) { @@ -2447,10 +2443,8 @@ ADDR_E_RETURNCODE Gfx10Lib::HwlComputeNonBlockCompressedView( pOut->mipId = 1; pOut->numMipLevels = 2; - const UINT_32 upperMipWidth = - PowTwoAlign(Max(pIn->width >> (pIn->mipId - 1), 1u), bcWidth) / bcWidth; - const UINT_32 upperMipHeight = - PowTwoAlign(Max(pIn->height >> (pIn->mipId - 1), 1u), bcHeight) / bcHeight; + const UINT_32 upperMipWidth = RoundUpQuotient(Max(pIn->width >> (pIn->mipId - 1), 1u), bcWidth); + const UINT_32 upperMipHeight = RoundUpQuotient(Max(pIn->height >> (pIn->mipId - 1), 1u), bcHeight); const BOOL_32 needToAvoidInTail = tiled && (requestMipWidth <= infoOut.blockWidth / 2) && (requestMipHeight <= infoOut.blockHeight) ? diff --git a/src/amd/addrlib/src/gfx10/gfx10addrlib.h b/src/amd/addrlib/src/gfx10/gfx10addrlib.h index c23c67c14d0..a5f8424e81e 100644 --- a/src/amd/addrlib/src/gfx10/gfx10addrlib.h +++ b/src/amd/addrlib/src/gfx10/gfx10addrlib.h @@ -1,8 +1,7 @@ -/** +/* ************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -************************************************************************************************************************ -*/ +***********************************************************************************************************************/ /** ************************************************************************************************************************ diff --git a/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp b/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp index 45ac1f29907..4aec276e579 100644 --- a/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp +++ b/src/amd/addrlib/src/gfx9/gfx9addrlib.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** ************************************************************************************************************************ diff --git a/src/amd/addrlib/src/gfx9/gfx9addrlib.h b/src/amd/addrlib/src/gfx9/gfx9addrlib.h index 66067862208..c9dc0a0a974 100644 --- a/src/amd/addrlib/src/gfx9/gfx9addrlib.h +++ b/src/amd/addrlib/src/gfx9/gfx9addrlib.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** ************************************************************************************************************************ diff --git a/src/amd/addrlib/src/r800/ciaddrlib.cpp b/src/amd/addrlib/src/r800/ciaddrlib.cpp index d6a9ae932c4..e7a2c09b32b 100644 --- a/src/amd/addrlib/src/r800/ciaddrlib.cpp +++ b/src/amd/addrlib/src/r800/ciaddrlib.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/r800/ciaddrlib.h b/src/amd/addrlib/src/r800/ciaddrlib.h index c8e93ec54fe..8b2da35416e 100644 --- a/src/amd/addrlib/src/r800/ciaddrlib.h +++ b/src/amd/addrlib/src/r800/ciaddrlib.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/r800/egbaddrlib.cpp b/src/amd/addrlib/src/r800/egbaddrlib.cpp index 72e02c20286..256dba01c4e 100644 --- a/src/amd/addrlib/src/r800/egbaddrlib.cpp +++ b/src/amd/addrlib/src/r800/egbaddrlib.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** * @file egbaddrlib.cpp diff --git a/src/amd/addrlib/src/r800/egbaddrlib.h b/src/amd/addrlib/src/r800/egbaddrlib.h index 9209cc07e3b..e2e6b4d7b54 100644 --- a/src/amd/addrlib/src/r800/egbaddrlib.h +++ b/src/amd/addrlib/src/r800/egbaddrlib.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/r800/siaddrlib.cpp b/src/amd/addrlib/src/r800/siaddrlib.cpp index 0ada14db6a3..bb7983c996a 100644 --- a/src/amd/addrlib/src/r800/siaddrlib.cpp +++ b/src/amd/addrlib/src/r800/siaddrlib.cpp @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** **************************************************************************************************** diff --git a/src/amd/addrlib/src/r800/siaddrlib.h b/src/amd/addrlib/src/r800/siaddrlib.h index a283c228b42..d222568211c 100644 --- a/src/amd/addrlib/src/r800/siaddrlib.h +++ b/src/amd/addrlib/src/r800/siaddrlib.h @@ -1,8 +1,7 @@ -/** -**************************************************************************************************** +/* +************************************************************************************************************************ * -* Copyright © 2007-2021 Advanced Micro Devices, Inc. -* All Rights Reserved. +* Copyright (C) 2007-2022 Advanced Micro Devices, Inc. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,8 +21,7 @@ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE * -**************************************************************************************************** -*/ +***********************************************************************************************************************/ /** ****************************************************************************************************