]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/amdgpu: add sdma ip block for beige_goby
authorChengming Gui <Jack.Gui@amd.com>
Tue, 13 Oct 2020 09:08:07 +0000 (17:08 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:40:26 +0000 (22:40 -0400)
Enable sdma block for beige_goby, same as sienna_cichlid

v2: share the same setting of sdma instance num with vangogh

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Suggested-by: Alexander Deucher <Alexander.Deucher@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nv.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c

index 41ccdec666d2824d6a7f37a622ee59b4bf7d7f17..c5b3eec413a03b42238f4c05c050d74346c52195 100644 (file)
@@ -956,6 +956,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &gmc_v10_0_ip_block);
                amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
                amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
+               amdgpu_device_ip_block_add(adev, &sdma_v5_2_ip_block);
                break;
        default:
                return -EINVAL;
index 7c4e0586e26d1d9b34b0714d909ddb89bf1b0939..0c93361ac9c98af870d05d0fd36689151d4fe718 100644 (file)
@@ -47,6 +47,7 @@
 MODULE_FIRMWARE("amdgpu/sienna_cichlid_sdma.bin");
 MODULE_FIRMWARE("amdgpu/navy_flounder_sdma.bin");
 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_sdma.bin");
+MODULE_FIRMWARE("amdgpu/beige_goby_sdma.bin");
 
 MODULE_FIRMWARE("amdgpu/vangogh_sdma.bin");
 
@@ -92,6 +93,7 @@ static void sdma_v5_2_init_golden_registers(struct amdgpu_device *adev)
        case CHIP_NAVY_FLOUNDER:
        case CHIP_VANGOGH:
        case CHIP_DIMGREY_CAVEFISH:
+       case CHIP_BEIGE_GOBY:
                break;
        default:
                break;
@@ -163,6 +165,9 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
        case CHIP_DIMGREY_CAVEFISH:
                chip_name = "dimgrey_cavefish";
                break;
+       case CHIP_BEIGE_GOBY:
+               chip_name = "beige_goby";
+               break;
        default:
                BUG();
        }
@@ -1228,6 +1233,7 @@ static int sdma_v5_2_early_init(void *handle)
                adev->sdma.num_instances = 2;
                break;
        case CHIP_VANGOGH:
+       case CHIP_BEIGE_GOBY:
                adev->sdma.num_instances = 1;
                break;
        default:
@@ -1628,6 +1634,7 @@ static int sdma_v5_2_set_clockgating_state(void *handle,
        case CHIP_NAVY_FLOUNDER:
        case CHIP_VANGOGH:
        case CHIP_DIMGREY_CAVEFISH:
+       case CHIP_BEIGE_GOBY:
                sdma_v5_2_update_medium_grain_clock_gating(adev,
                                state == AMD_CG_STATE_GATE);
                sdma_v5_2_update_medium_grain_light_sleep(adev,