drm/amdgpu: add sdma support for yellow carp

This patch adds the sdma v5.2 support for yellow carp.

Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Aaron Liu 2020-11-04 14:10:13 +08:00 committed by Alex Deucher
parent bbbdc9739e
commit e88d68e106
1 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,7 @@ MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_sdma.bin");
MODULE_FIRMWARE("amdgpu/beige_goby_sdma.bin"); MODULE_FIRMWARE("amdgpu/beige_goby_sdma.bin");
MODULE_FIRMWARE("amdgpu/vangogh_sdma.bin"); MODULE_FIRMWARE("amdgpu/vangogh_sdma.bin");
MODULE_FIRMWARE("amdgpu/yellow_carp_sdma.bin");
#define SDMA1_REG_OFFSET 0x600 #define SDMA1_REG_OFFSET 0x600
#define SDMA3_REG_OFFSET 0x400 #define SDMA3_REG_OFFSET 0x400
@ -94,6 +95,7 @@ static void sdma_v5_2_init_golden_registers(struct amdgpu_device *adev)
case CHIP_VANGOGH: case CHIP_VANGOGH:
case CHIP_DIMGREY_CAVEFISH: case CHIP_DIMGREY_CAVEFISH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP:
break; break;
default: default:
break; break;
@ -165,6 +167,9 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
chip_name = "beige_goby"; chip_name = "beige_goby";
break; break;
case CHIP_YELLOW_CARP:
chip_name = "yellow_carp";
break;
default: default:
BUG(); BUG();
} }
@ -1229,6 +1234,7 @@ static int sdma_v5_2_early_init(void *handle)
break; break;
case CHIP_VANGOGH: case CHIP_VANGOGH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP:
adev->sdma.num_instances = 1; adev->sdma.num_instances = 1;
break; break;
default: default:
@ -1630,6 +1636,7 @@ static int sdma_v5_2_set_clockgating_state(void *handle,
case CHIP_VANGOGH: case CHIP_VANGOGH:
case CHIP_DIMGREY_CAVEFISH: case CHIP_DIMGREY_CAVEFISH:
case CHIP_BEIGE_GOBY: case CHIP_BEIGE_GOBY:
case CHIP_YELLOW_CARP:
sdma_v5_2_update_medium_grain_clock_gating(adev, sdma_v5_2_update_medium_grain_clock_gating(adev,
state == AMD_CG_STATE_GATE); state == AMD_CG_STATE_GATE);
sdma_v5_2_update_medium_grain_light_sleep(adev, sdma_v5_2_update_medium_grain_light_sleep(adev,