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) ...@@ -93,35 +93,35 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
DRM_DEBUG("\n"); DRM_DEBUG("\n");
switch (adev->asic_type) { switch (adev->ip_versions[MP0_HWIP]) {
case CHIP_VEGA20: case IP_VERSION(11, 0, 2):
chip_name = "vega20"; chip_name = "vega20";
break; break;
case CHIP_NAVI10: case IP_VERSION(11, 0, 0):
chip_name = "navi10"; chip_name = "navi10";
break; break;
case CHIP_NAVI14: case IP_VERSION(11, 0, 5):
chip_name = "navi14"; chip_name = "navi14";
break; break;
case CHIP_NAVI12: case IP_VERSION(11, 0, 9):
chip_name = "navi12"; chip_name = "navi12";
break; break;
case CHIP_ARCTURUS: case IP_VERSION(11, 0, 4):
chip_name = "arcturus"; chip_name = "arcturus";
break; break;
case CHIP_SIENNA_CICHLID: case IP_VERSION(11, 0, 7):
chip_name = "sienna_cichlid"; chip_name = "sienna_cichlid";
break; break;
case CHIP_NAVY_FLOUNDER: case IP_VERSION(11, 0, 11):
chip_name = "navy_flounder"; chip_name = "navy_flounder";
break; break;
case CHIP_VANGOGH: case IP_VERSION(11, 5, 0):
chip_name = "vangogh"; chip_name = "vangogh";
break; break;
case CHIP_DIMGREY_CAVEFISH: case IP_VERSION(11, 0, 12):
chip_name = "dimgrey_cavefish"; chip_name = "dimgrey_cavefish";
break; break;
case CHIP_BEIGE_GOBY: case IP_VERSION(11, 0, 13):
chip_name = "beige_goby"; chip_name = "beige_goby";
break; break;
default: default:
...@@ -129,9 +129,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp) ...@@ -129,9 +129,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
} }
switch (adev->asic_type) { switch (adev->ip_versions[MP0_HWIP]) {
case CHIP_VEGA20: case IP_VERSION(11, 0, 2):
case CHIP_ARCTURUS: case IP_VERSION(11, 0, 4):
err = psp_init_sos_microcode(psp, chip_name); err = psp_init_sos_microcode(psp, chip_name);
if (err) if (err)
return err; return err;
...@@ -168,9 +168,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp) ...@@ -168,9 +168,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
le32_to_cpu(ta_hdr->ras.offset_bytes); le32_to_cpu(ta_hdr->ras.offset_bytes);
} }
break; break;
case CHIP_NAVI10: case IP_VERSION(11, 0, 0):
case CHIP_NAVI14: case IP_VERSION(11, 0, 5):
case CHIP_NAVI12: case IP_VERSION(11, 0, 9):
err = psp_init_sos_microcode(psp, chip_name); err = psp_init_sos_microcode(psp, chip_name);
if (err) if (err)
return err; return err;
...@@ -213,9 +213,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp) ...@@ -213,9 +213,9 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
le32_to_cpu(ta_hdr->dtm.offset_bytes); le32_to_cpu(ta_hdr->dtm.offset_bytes);
} }
break; break;
case CHIP_SIENNA_CICHLID: case IP_VERSION(11, 0, 7):
case CHIP_NAVY_FLOUNDER: case IP_VERSION(11, 0, 11):
case CHIP_DIMGREY_CAVEFISH: case IP_VERSION(11, 0, 12):
err = psp_init_sos_microcode(psp, chip_name); err = psp_init_sos_microcode(psp, chip_name);
if (err) if (err)
return err; return err;
...@@ -223,7 +223,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp) ...@@ -223,7 +223,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
if (err) if (err)
return err; return err;
break; break;
case CHIP_BEIGE_GOBY: case IP_VERSION(11, 0, 13):
err = psp_init_sos_microcode(psp, chip_name); err = psp_init_sos_microcode(psp, chip_name);
if (err) if (err)
return err; return err;
...@@ -231,7 +231,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp) ...@@ -231,7 +231,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
if (err) if (err)
return err; return err;
break; break;
case CHIP_VANGOGH: case IP_VERSION(11, 5, 0):
err = psp_init_asd_microcode(psp, chip_name); err = psp_init_asd_microcode(psp, chip_name);
if (err) if (err)
return 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