Commit e47868ea authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/psp_v11.0: convert to IP version checking

Use IP versions rather than asic_type to differentiate
IP version specific features.
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 82d05736
......@@ -93,35 +93,35 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
DRM_DEBUG("\n");
switch (adev->asic_type) {
case CHIP_VEGA20:
switch (adev->ip_versions[MP0_HWIP]) {
case IP_VERSION(11, 0, 2):
chip_name = "vega20";
break;
case CHIP_NAVI10:
case IP_VERSION(11, 0, 0):
chip_name = "navi10";
break;
case CHIP_NAVI14:
case IP_VERSION(11, 0, 5):
chip_name = "navi14";
break;
case CHIP_NAVI12:
case IP_VERSION(11, 0, 9):
chip_name = "navi12";
break;
case CHIP_ARCTURUS:
case IP_VERSION(11, 0, 4):
chip_name = "arcturus";
break;
case CHIP_SIENNA_CICHLID:
case IP_VERSION(11, 0, 7):
chip_name = "sienna_cichlid";
break;
case CHIP_NAVY_FLOUNDER:
case IP_VERSION(11, 0, 11):
chip_name = "navy_flounder";
break;
case CHIP_VANGOGH:
case IP_VERSION(11, 5, 0):
chip_name = "vangogh";
break;
case CHIP_DIMGREY_CAVEFISH:
case IP_VERSION(11, 0, 12):
chip_name = "dimgrey_cavefish";
break;
case CHIP_BEIGE_GOBY:
case IP_VERSION(11, 0, 13):
chip_name = "beige_goby";
break;
default:
......@@ -129,9 +129,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
}
switch (adev->asic_type) {
case CHIP_VEGA20:
case CHIP_ARCTURUS:
switch (adev->ip_versions[MP0_HWIP]) {
case IP_VERSION(11, 0, 2):
case IP_VERSION(11, 0, 4):
err = psp_init_sos_microcode(psp, chip_name);
if (err)
return err;
......@@ -168,9 +168,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
le32_to_cpu(ta_hdr->ras.offset_bytes);
}
break;
case CHIP_NAVI10:
case CHIP_NAVI14:
case CHIP_NAVI12:
case IP_VERSION(11, 0, 0):
case IP_VERSION(11, 0, 5):
case IP_VERSION(11, 0, 9):
err = psp_init_sos_microcode(psp, chip_name);
if (err)
return err;
......@@ -213,9 +213,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
le32_to_cpu(ta_hdr->dtm.offset_bytes);
}
break;
case CHIP_SIENNA_CICHLID:
case CHIP_NAVY_FLOUNDER:
case CHIP_DIMGREY_CAVEFISH:
case IP_VERSION(11, 0, 7):
case IP_VERSION(11, 0, 11):
case IP_VERSION(11, 0, 12):
err = psp_init_sos_microcode(psp, chip_name);
if (err)
return err;
......@@ -223,7 +223,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
if (err)
return err;
break;
case CHIP_BEIGE_GOBY:
case IP_VERSION(11, 0, 13):
err = psp_init_sos_microcode(psp, chip_name);
if (err)
return err;
......@@ -231,7 +231,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
if (err)
return err;
break;
case CHIP_VANGOGH:
case IP_VERSION(11, 5, 0):
err = psp_init_asd_microcode(psp, chip_name);
if (err)
return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment