drm/amdgpu/psp11: check if prior to navi10 for sram map

Submitted by Deucher, Alexander on July 16, 2019, 4:03 p.m.

Details

Message ID BN6PR12MB18096684A232AD7A6564D06EF7CE0@BN6PR12MB1809.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amdgpu/psp11: check if prior to navi10 for sram map" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Deucher, Alexander July 16, 2019, 4:03 p.m.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index 87596c69b235..a8b526dbb6c6 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -538,7 +538,7 @@  psp_v11_0_sram_map(struct amdgpu_device *adev,

         case AMDGPU_UCODE_ID_RLC_G:
                 *sram_offset = 0x2000;
-               if (adev->asic_type != CHIP_NAVI10) {
+               if (adev->asic_type < CHIP_NAVI10) {
                         *sram_addr_reg_offset = SOC15_REG_OFFSET(GC, 0, mmRLC_GPM_UCODE_ADDR);
                         *sram_data_reg_offset = SOC15_REG_OFFSET(GC, 0, mmRLC_GPM_UCODE_DATA);
                 }
@@ -550,7 +550,7 @@  psp_v11_0_sram_map(struct amdgpu_device *adev,

         case AMDGPU_UCODE_ID_SDMA0:
                 *sram_offset = 0x0;
-               if (adev->asic_type != CHIP_NAVI10) {
+               if (adev->asic_type < CHIP_NAVI10) {
                         *sram_addr_reg_offset = SOC15_REG_OFFSET(SDMA0, 0, mmSDMA0_UCODE_ADDR);
                         *sram_data_reg_offset = SOC15_REG_OFFSET(SDMA0, 0, mmSDMA0_UCODE_DATA);
                 }