drm/amdgpu: declare firmware for new GC 11.0.3
Subsystems (3)
Alex Deucher
maintainerPATCH 1/8 drm/amdgpu: declare firmware for new GC 11.0.3
From: Hawking Zhang <[email protected]>
To support new gfx ip block
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +4 -0
@@ -73,6 +73,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_2_pfp.bin");MODULE_FIRMWARE ("amdgpu/gc_11_0_2_me.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_2_mec.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_2_rlc.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_pfp.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_me.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_mec.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_rlc.bin" );static const struct soc15_reg_golden golden_settings_gc_11_0_1[] = {
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 2/8 drm/amdgpu: declare firmware for new MES 11.0.3
From: Hawking Zhang <[email protected]>
To support new mes ip block
--- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -0
@@ -38,6 +38,8 @@ MODULE_FIRMWARE("amdgpu/gc_11_0_1_mes.bin");MODULE_FIRMWARE ("amdgpu/gc_11_0_1_mes1.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_2_mes.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_2_mes1.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_mes.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_mes1.bin" );static int mes_v11_0_hw_fini (void *handle);static int mes_v11_0_kiq_hw_init (struct amdgpu_device *adev);
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 3/8 drm/amdgpu: init gfx config for gfx v11_0_3
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
initialize some gfx config for gfx v11_0_3
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +2 -0
@@ -1114,6 +1114,7 @@ static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)switch (adev->ip_versions[GC_HWIP ][0 ]) {case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ): adev->gfx.config.max_hw_contexts =8 ; adev->gfx.config.sc_prim_fifo_size_frontend =0x20 ; adev->gfx.config.sc_prim_fifo_size_backend =0x100 ;
@@ -1549,6 +1550,7 @@ static int gfx_v11_0_sw_init(void *handle)case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,1 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ): adev->gfx.me.num_me =1 ; adev->gfx.me.num_pipe_per_me =1 ; adev->gfx.me.num_queue_per_pipe =1 ;
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 4/8 drm/amdkfd: Added GFX 11.0.3 Support
In reply to Alex DeucherFrom: David Belanger <[email protected]>
Added missing cases for GFX 11.0.3 code in a few switch statements.
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 1 + drivers/gpu/drm/amd/amdkfd/kfd_device.c | 8 ++++++++ 2 files changed, 9 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -0
@@ -1522,6 +1522,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,1 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ): pcache_info = cache_info; num_of_cache_types =kfd_fill_gpu_cache_info_from_gfx_config (kdev, pcache_info);
drivers/gpu/drm/amd/amdkfd/kfd_device.c +8 -0
@@ -92,6 +92,7 @@ static void kfd_device_info_set_sdma_info(struct kfd_dev *kfd)case IP_VERSION (6 ,0 ,0 ):case IP_VERSION (6 ,0 ,1 ):case IP_VERSION (6 ,0 ,2 ): +case IP_VERSION (6 ,0 ,3 ): kfd->device_info.num_sdma_queues_per_engine =8 ;break ;default :
@@ -104,6 +105,7 @@ static void kfd_device_info_set_sdma_info(struct kfd_dev *kfd)switch (sdma_version) {case IP_VERSION (6 ,0 ,0 ):case IP_VERSION (6 ,0 ,2 ): +case IP_VERSION (6 ,0 ,3 ):/* Reserve 1 for paging and 1 for gfx */ kfd->device_info.num_reserved_sdma_queues_per_engine =2 ;/* BIT(0)=engine-0 queue-0; BIT(1)=engine-1 queue-0; BIT(2)=engine-0 queue-1; ... */
@@ -151,6 +153,7 @@ static void kfd_device_info_set_event_interrupt_class(struct kfd_dev *kfd)case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,1 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ): kfd->device_info.event_interrupt_class = &event_interrupt_class_v11;break ;default :
@@ -400,6 +403,11 @@ struct kfd_dev *kgd2kfd_probe(struct amdgpu_device *adev, bool vf) gfx_target_version =110002 ; f2g = &gfx_v11_kfd2kgd;break ; +case IP_VERSION (11 ,0 ,3 ): +/* Note: Compiler version is 11.0.1 while HW version is 11.0.3 */ + gfx_target_version =110001 ; + f2g = &gfx_v11_kfd2kgd; +break ;default :break ; }
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 5/8 drm/amdgpu: enable imu_rlc_ram programming for v11_0_3
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
All gc v11_0_3 registers in gcvml2 range have different register offset from the ones in gc v11_0_0. v11_0_3 imu_rlc_ram programming has to be separated from v11_0_0 implementation
--- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 6 + drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.c | 144 +++++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.h | 29 +++++ 4 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.c create mode 100644 drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.h
drivers/gpu/drm/amd/amdgpu/Makefile +2 -1
@@ -134,7 +134,8 @@ amdgpu-y += \ gfx_v9_4_2.o \ gfx_v10_0.o \ imu_v11_0.o \ - gfx_v11_0.o + gfx_v11_0.o \ + imu_v11_0_3.o # add async DMA block amdgpu-y += \
drivers/gpu/drm/amd/amdgpu/imu_v11_0.c +6 -0
@@ -26,12 +26,15 @@#include "amdgpu_imu.h" #include "amdgpu_dpm.h" +#include "imu_v11_0_3.h" +#include "gc/gc_11_0_0_offset.h" #include "gc/gc_11_0_0_sh_mask.h" MODULE_FIRMWARE ("amdgpu/gc_11_0_0_imu.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_1_imu.bin" );MODULE_FIRMWARE ("amdgpu/gc_11_0_2_imu.bin" ); +MODULE_FIRMWARE ("amdgpu/gc_11_0_3_imu.bin" );static int imu_v11_0_init_microcode (struct amdgpu_device *adev) {
@@ -360,6 +363,9 @@ static void imu_v11_0_program_rlc_ram(struct amdgpu_device *adev)program_imu_rlc_ram (adev, imu_rlc_ram_golden_11_0_2, (const u32 )ARRAY_SIZE (imu_rlc_ram_golden_11_0_2));break ; +case IP_VERSION (11 ,0 ,3 ): +imu_v11_0_3_program_rlc_ram (adev); +break ;default :BUG ();break ;
drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.c new file +144 -0
144 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/imu_v11_0_3.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 __IMU_V11_0_3_H__ +#define __IMU_V11_0_3_H__ + +void imu_v11_0_3_program_rlc_ram (struct amdgpu_device *adev); + +#endif
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 6/8 drm/amdgpu: Set GC family for GC 11.0.3
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
Set AMDGPU_FAMILY_GC_11_0_0.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -2170,6 +2170,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)break ;case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ): adev->family =AMDGPU_FAMILY_GC_11_0_0 ;break ;case IP_VERSION (11 ,0 ,1 ):
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 7/8 drm/amdgpu: add new ip block for GFX 11.0
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
Add ip block support for gfx v11_0_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
@@ -1784,6 +1784,7 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,1 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ):amdgpu_device_ip_block_add (adev, &gfx_v11_0_ip_block);break ;default :
Signature · 1 line
2.37.1
Alex Deucher
maintainerPATCH 8/8 drm/amdgpu: add new ip block for MES 11.0.3
In reply to Alex DeucherFrom: Hawking Zhang <[email protected]>
Add ip block support for mes v11_0_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
@@ -1946,6 +1946,7 @@ static int amdgpu_discovery_set_mes_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (11 ,0 ,0 ):case IP_VERSION (11 ,0 ,1 ):case IP_VERSION (11 ,0 ,2 ): +case IP_VERSION (11 ,0 ,3 ):amdgpu_device_ip_block_add (adev, &mes_v11_0_ip_block); adev->enable_mes = true; adev->enable_mes_kiq = true;
Signature · 1 line
2.37.1