GMC 9.4.3 Support
Subsystems (2)
Alex Deucher
maintainercover GMC 9.4.3 Support
Add GMC (Graphics Memory Controller) support for GMC 9.4.3 which contains mmhub 1.8 and gfxhub 1.2. Patches 1-3, 6 are register headers which are too big for the mailing list.
Hawking Zhang (6):
drm/amdgpu: add athub v1_8_0 ip headers drm/amdgpu: add osssys v4_4_2 ip headers drm/amdgpu: add gc v9_4_3 ip headers drm/amdgpu: add gmc ip block support for GC 9.4.3 drm/amdgpu: add mmhub v1_8_0 ip headers drm/amdgpu: add GMC ip block for GC 9.4.3
Le Ma (3):
drm/amdgpu: add gfxhub v1_2 support drm/amdgpu: add mmhub v1_8 support
drm/amdgpu: initialize gfxhub v1_2 and mmhub v1_8 funcs
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 471 + drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.h | 29 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 24 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 477 + drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.h | 28 + .../asic_reg/athub/athub_1_8_0_offset.h | 411 + .../asic_reg/athub/athub_1_8_0_sh_mask.h | 1807 + .../amd/include/asic_reg/gc/gc_9_4_3_offset.h | 7258 ++++ .../include/asic_reg/gc/gc_9_4_3_sh_mask.h | 30535 ++++++++++++++++ .../asic_reg/mmhub/mmhub_1_8_0_offset.h | 3314 ++ .../asic_reg/mmhub/mmhub_1_8_0_sh_mask.h | 22315 +++++++++++ .../asic_reg/oss/osssys_4_4_2_offset.h | 263 + .../asic_reg/oss/osssys_4_4_2_sh_mask.h | 995 + 15 files changed, 67924 insertions(+), 6 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.h create mode 100644 drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c create mode 100644 drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/athub/athub_1_8_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/athub/athub_1_8_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_3_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/gc/gc_9_4_3_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_1_8_0_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_1_8_0_sh_mask.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/oss/osssys_4_4_2_offset.h create mode 100644 drivers/gpu/drm/amd/include/asic_reg/oss/osssys_4_4_2_sh_mask.h
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 4/9 drm/amdgpu: add gmc ip block support for GC 9.4.3
From: Hawking Zhang <[email protected]>
Initialize various gmc sw/hw settings/configurations for GC 9.4.3.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +10 -4
@@ -657,6 +657,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,case IP_VERSION (2 ,4 ,0 ): mmhub_cid = mmhub_client_ids_renoir[cid][rw];break ; +case IP_VERSION (1 ,8 ,0 ):case IP_VERSION (9 ,4 ,2 ): mmhub_cid = mmhub_client_ids_aldebaran[cid][rw];break ;
@@ -735,7 +736,8 @@ static uint32_t gmc_v9_0_get_invalidate_req(unsigned int vmid,static bool gmc_v9_0_use_invalidate_semaphore (struct amdgpu_device *adev,uint32_t vmhub) { -if (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,2 )) +if (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,2 ) || + adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 ))return false; return ((vmhub == AMDGPU_MMHUB_0 ||
@@ -1144,6 +1146,7 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,switch (adev->ip_versions[GC_HWIP ][0 ]) {case IP_VERSION (9 ,4 ,1 ):case IP_VERSION (9 ,4 ,2 ): +case IP_VERSION (9 ,4 ,3 ):if (is_vram) {if (bo_adev == adev) {if (uncached)
@@ -1155,8 +1158,8 @@ static void gmc_v9_0_get_coherence_flags(struct amdgpu_device *adev,/* FIXME: is this still needed? Or does * amdgpu_ttm_tt_pde_flags already handle this? */ -if (adev->ip_versions[GC_HWIP ][0 ] == -IP_VERSION (9 ,4 ,2 ) && +if ((adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,2 ) || + adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 )) && adev->gmc.xgmi.connected_to_cpu) snoop = true; }else {
@@ -1544,6 +1547,7 @@ static int gmc_v9_0_mc_init(struct amdgpu_device *adev)case IP_VERSION (9 ,4 ,0 ):case IP_VERSION (9 ,4 ,1 ):case IP_VERSION (9 ,4 ,2 ): +case IP_VERSION (9 ,4 ,3 ):default : adev->gmc.gart_size =512ULL <<20 ;break ;
@@ -1673,6 +1677,7 @@ static int gmc_v9_0_sw_init(void *handle)case IP_VERSION (9 ,4 ,0 ):case IP_VERSION (9 ,3 ,0 ):case IP_VERSION (9 ,4 ,2 ): +case IP_VERSION (9 ,4 ,3 ): adev->num_vmhubs =2 ;
@@ -1769,7 +1774,8 @@ static int gmc_v9_0_sw_init(void *handle)*/ adev->vm_manager.first_kfd_vmid = (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,1 ) || - adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,2 )) ?3 :8 ; + adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,2 ) || + adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 )) ?3 :8 ;amdgpu_vm_manager_init (adev);
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 5/9 drm/amdgpu: add gfxhub v1_2 support
In reply to Alex DeucherFrom: Le Ma <[email protected]>
Hack the gc 9.0 reg offset for initial support
v2: squash in header switch (Alex)
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c | 471 +++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.h | 29 ++ 3 files changed, 501 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c create mode 100644 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -93,7 +93,7 @@ amdgpu-y += \ gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o mmhub_v9_4.o \ gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o gfxhub_v2_1.o mmhub_v2_3.o \ mmhub_v1_7.o gfxhub_v3_0.o mmhub_v3_0.o mmhub_v3_0_2.o gmc_v11_0.o \ - mmhub_v3_0_1.o gfxhub_v3_0_3.o + mmhub_v3_0_1.o gfxhub_v3_0_3.o gfxhub_v1_2.o # add UMC block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.c new file +471 -0
471 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright 2022 Advanced Micro Devices, Inc. +* +* 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. +* +*/ + +#ifndef __GFXHUB_V1_2_H__ +#define __GFXHUB_V1_2_H__ + +extern const struct amdgpu_gfxhub_funcs gfxhub_v1_2_funcs; + +#endif
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 7/9 drm/amdgpu: add mmhub v1_8 support
In reply to Alex DeucherFrom: Le Ma <[email protected]>
Hack the mmhub 1.7 reg offset for initial support
v2: squash in header switch, CG funcs (Alex)
--- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 477 ++++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.h | 28 ++ 3 files changed, 506 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c create mode 100644 drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.h
drivers/gpu/drm/amd/amdgpu/Makefile +1 -1
@@ -93,7 +93,7 @@ amdgpu-y += \ gfxhub_v1_0.o mmhub_v1_0.o gmc_v9_0.o gfxhub_v1_1.o mmhub_v9_4.o \ gfxhub_v2_0.o mmhub_v2_0.o gmc_v10_0.o gfxhub_v2_1.o mmhub_v2_3.o \ mmhub_v1_7.o gfxhub_v3_0.o mmhub_v3_0.o mmhub_v3_0_2.o gmc_v11_0.o \ - mmhub_v3_0_1.o gfxhub_v3_0_3.o gfxhub_v1_2.o + mmhub_v3_0_1.o gfxhub_v3_0_3.o gfxhub_v1_2.o mmhub_v1_8.o # add UMC block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c new file +477 -0
477 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright 2022 Advanced Micro Devices, Inc. +* +* 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. +* +*/ +#ifndef __MMHUB_V1_8_H__ +#define __MMHUB_V1_8_H__ + +extern const struct amdgpu_mmhub_funcs mmhub_v1_8_funcs; + +#endif
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 8/9 drm/amdgpu: initialize gfxhub v1_2 and mmhub v1_8 funcs
In reply to Alex DeucherFrom: Le Ma <[email protected]>
Initialize gfxhub1.2 and mmhub1.8 function calls
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +9 -1
@@ -49,8 +49,10 @@#include "mmhub_v1_0.h" #include "athub_v1_0.h" #include "gfxhub_v1_1.h" +#include "gfxhub_v1_2.h" #include "mmhub_v9_4.h" #include "mmhub_v1_7.h" +#include "mmhub_v1_8.h" #include "umc_v6_1.h" #include "umc_v6_0.h" #include "umc_v6_7.h"
@@ -1332,6 +1334,9 @@ static void gmc_v9_0_set_mmhub_funcs(struct amdgpu_device *adev)case IP_VERSION (9 ,4 ,2 ): adev->mmhub.funcs = &mmhub_v1_7_funcs;break ; +case IP_VERSION (1 ,8 ,0 ): + adev->mmhub.funcs = &mmhub_v1_8_funcs; +break ;default : adev->mmhub.funcs = &mmhub_v1_0_funcs;break ;
@@ -1358,7 +1363,10 @@ static void gmc_v9_0_set_mmhub_ras_funcs(struct amdgpu_device *adev)static void gmc_v9_0_set_gfxhub_funcs (struct amdgpu_device *adev) { - adev->gfxhub.funcs = &gfxhub_v1_0_funcs; +if (adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,3 )) + adev->gfxhub.funcs = &gfxhub_v1_2_funcs; +else + adev->gfxhub.funcs = &gfxhub_v1_0_funcs; }static void gmc_v9_0_set_hdp_ras_funcs (struct amdgpu_device *adev)
Signature · 1 line
2.39.2
Alex Deucher
maintainerPATCH 9/9 drm/amdgpu: add GMC ip block for GC 9.4.3
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
Add GMC IP handling for GC 9.4.3
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -1547,6 +1547,7 @@ static int amdgpu_discovery_set_gmc_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (9 ,4 ,0 ):case IP_VERSION (9 ,4 ,1 ):case IP_VERSION (9 ,4 ,2 ): +case IP_VERSION (9 ,4 ,3 ):amdgpu_device_ip_block_add (adev, &gmc_v9_0_ip_block);break ;case IP_VERSION (10 ,1 ,10 ):
Signature · 1 line
2.39.2