diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-09-13 16:41:57 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-14 10:38:03 -0400 |
commit | 741deade2a704a434bd5939118c43d38e9ddac25 (patch) | |
tree | 403036d4b55161c6d968ff2593e5ddfd47eb81eb /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 23ecdc6187ef74e00b78e889446a309628719b6e (diff) |
drm/amdgpu: simplify Raven, Raven2, and Picasso handling
Treat them all as Raven rather than adding a new picasso
asic type. This simplifies a lot of code and also handles the
case of rv2 chips with the 0x15d8 pci id. It also fixes dmcu
fw handling for picasso.
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 762dc5f886cd..354f0557d697 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -91,7 +91,6 @@ static const char *amdgpu_asic_name[] = { | |||
91 | "VEGA12", | 91 | "VEGA12", |
92 | "VEGA20", | 92 | "VEGA20", |
93 | "RAVEN", | 93 | "RAVEN", |
94 | "PICASSO", | ||
95 | "LAST", | 94 | "LAST", |
96 | }; | 95 | }; |
97 | 96 | ||
@@ -1337,12 +1336,11 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev) | |||
1337 | case CHIP_RAVEN: | 1336 | case CHIP_RAVEN: |
1338 | if (adev->rev_id >= 8) | 1337 | if (adev->rev_id >= 8) |
1339 | chip_name = "raven2"; | 1338 | chip_name = "raven2"; |
1339 | else if (adev->pdev->device == 0x15d8) | ||
1340 | chip_name = "picasso"; | ||
1340 | else | 1341 | else |
1341 | chip_name = "raven"; | 1342 | chip_name = "raven"; |
1342 | break; | 1343 | break; |
1343 | case CHIP_PICASSO: | ||
1344 | chip_name = "picasso"; | ||
1345 | break; | ||
1346 | } | 1344 | } |
1347 | 1345 | ||
1348 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_gpu_info.bin", chip_name); | 1346 | snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_gpu_info.bin", chip_name); |
@@ -1468,8 +1466,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev) | |||
1468 | case CHIP_VEGA12: | 1466 | case CHIP_VEGA12: |
1469 | case CHIP_VEGA20: | 1467 | case CHIP_VEGA20: |
1470 | case CHIP_RAVEN: | 1468 | case CHIP_RAVEN: |
1471 | case CHIP_PICASSO: | 1469 | if (adev->asic_type == CHIP_RAVEN) |
1472 | if ((adev->asic_type == CHIP_RAVEN) || (adev->asic_type == CHIP_PICASSO)) | ||
1473 | adev->family = AMDGPU_FAMILY_RV; | 1470 | adev->family = AMDGPU_FAMILY_RV; |
1474 | else | 1471 | else |
1475 | adev->family = AMDGPU_FAMILY_AI; | 1472 | adev->family = AMDGPU_FAMILY_AI; |
@@ -2183,7 +2180,6 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type) | |||
2183 | case CHIP_VEGA20: | 2180 | case CHIP_VEGA20: |
2184 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) | 2181 | #if defined(CONFIG_DRM_AMD_DC_DCN1_0) |
2185 | case CHIP_RAVEN: | 2182 | case CHIP_RAVEN: |
2186 | case CHIP_PICASSO: | ||
2187 | #endif | 2183 | #endif |
2188 | return amdgpu_dc != 0; | 2184 | return amdgpu_dc != 0; |
2189 | #endif | 2185 | #endif |