drm/amdgpu: golden settings for ASIC rev_id 0
Subsystems (2)
PATCH 1/3 drm/amdgpu: golden settings for ASIC rev_id 0
Suggested by FW team that GB_ADDR_CONFIG is handled by golden settings in driver to get the expected value
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +11 -0
@@ -47,6 +47,8 @@ MODULE_FIRMWARE("amdgpu/gc_9_4_3_rlc.bin");#define GFX9_MEC_HPD_SIZE 4096#define RLCG_UCODE_LOADING_START_ADDRESS 0x00002000L +#define GOLDEN_GB_ADDR_CONFIG 0x2a114042 +struct amdgpu_gfx_ras gfx_v9_4_3_ras;static void gfx_v9_4_3_set_ring_funcs (struct amdgpu_device *adev);
@@ -197,6 +199,15 @@ static void gfx_v9_4_3_init_golden_registers(struct amdgpu_device *adev) dev_inst =GET_INST (GC , i);if (dev_inst >=2 )WREG32_SOC15 (GC , dev_inst, regGRBM_MCM_ADDR,0x4 ); + +/* Golden settings applied by driver for ASIC with rev_id 0 */ +if (adev->rev_id ==0 ) { +WREG32_SOC15 (GC , dev_inst, regGB_ADDR_CONFIG, +GOLDEN_GB_ADDR_CONFIG ); + +WREG32_FIELD15_PREREG (GC , dev_inst,TCP_UTCL1_CNTL1 , +REDUCE_FIFO_DEPTH_BY_2 ,2 ); + } } }
Signature · 1 line
2.17.1
PATCH 2/3 drm/amdgpu: add the accelerator pcie class
v2: add the base class id for accelerator (lijo)
v3: add the new pci class in amdgpu tree (hawking)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++ drivers/gpu/drm/amd/include/amd_shared.h | 1 + 2 files changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5 -0
@@ -2042,6 +2042,11 @@ static const struct pci_device_id pciidlist[] = { .class_mask = 0xffffff, .driver_data = CHIP_IP_DISCOVERY }, + { PCI_DEVICE(0x1002, PCI_ANY_ID), + .class = AMD_ACCELERATOR_PROCESSING << 8, + .class_mask = 0xffffff, + .driver_data = CHIP_IP_DISCOVERY }, + {0, 0, 0} };
drivers/gpu/drm/amd/include/amd_shared.h +1 -0
@@ -27,6 +27,7 @@#define AMD_MAX_USEC_TIMEOUT 1000000/* 1000 ms */ +#define AMD_ACCELERATOR_PROCESSING 0x1200/* hardcoded pci class */ /* * Chip flags
Signature · 1 line
2.17.1
PATCH 3/3 drm/amdgpu: set the APU flag based on package type
In reply to Shiwu ZhangSince currently APU and dGPU share the same pcie class while gmc init needs the flag to set up correctly for upcomming memory allocations
v2: call get_pkg_type in smuio 13_0_3 is enough (hawking)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
@@ -2500,6 +2500,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)break ;case IP_VERSION (13 ,0 ,3 ): adev->smuio.funcs = &smuio_v13_0_3_funcs; +if (adev->smuio.funcs->get_pkg_type (adev) ==AMDGPU_PKG_TYPE_APU ) { + adev->flags |=AMD_IS_APU ; + }break ;case IP_VERSION (13 ,0 ,6 ):case IP_VERSION (13 ,0 ,8 ):
Signature · 1 line
2.17.1
RE: [PATCH 3/3] drm/amdgpu: set the APU flag based on package type
[AMD Official Use Only - General]
Series is
Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Shiwu Zhang
Sent: Thursday, May 25, 2023 15:46
To: [email protected]
Subject: [PATCH 3/3] drm/amdgpu: set the APU flag based on package type
Since currently APU and dGPU share the same pcie class while gmc init needs the flag to set up correctly for upcomming memory allocations
v2: call get_pkg_type in smuio 13_0_3 is enough (hawking)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
@@ -2500,6 +2500,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)break ;case IP_VERSION (13 ,0 ,3 ): adev->smuio.funcs = &smuio_v13_0_3_funcs; +if (adev->smuio.funcs->get_pkg_type (adev) ==AMDGPU_PKG_TYPE_APU ) { + adev->flags |=AMD_IS_APU ; + }break ;case IP_VERSION (13 ,0 ,6 ):case IP_VERSION (13 ,0 ,8 ):
--
2.17.1