Commit 741deade authored by Alex Deucher's avatar Alex Deucher
Browse files

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: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 23ecdc61
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ static const char *amdgpu_asic_name[] = {
	"VEGA12",
	"VEGA20",
	"RAVEN",
	"PICASSO",
	"LAST",
};

@@ -1337,12 +1336,11 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
	case CHIP_RAVEN:
		if (adev->rev_id >= 8)
			chip_name = "raven2";
		else if (adev->pdev->device == 0x15d8)
			chip_name = "picasso";
		else
			chip_name = "raven";
		break;
	case CHIP_PICASSO:
		chip_name = "picasso";
		break;
	}

	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)
	case CHIP_VEGA12:
	case CHIP_VEGA20:
	case CHIP_RAVEN:
	case CHIP_PICASSO:
		if ((adev->asic_type == CHIP_RAVEN) || (adev->asic_type == CHIP_PICASSO))
		if (adev->asic_type == CHIP_RAVEN)
			adev->family = AMDGPU_FAMILY_RV;
		else
			adev->family = AMDGPU_FAMILY_AI;
@@ -2183,7 +2180,6 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
	case CHIP_VEGA20:
#if defined(CONFIG_DRM_AMD_DC_DCN1_0)
	case CHIP_RAVEN:
	case CHIP_PICASSO:
#endif
		return amdgpu_dc != 0;
#endif
+1 −2
Original line number Diff line number Diff line
@@ -874,8 +874,7 @@ static const struct pci_device_id pciidlist[] = {
	{0x1002, 0x66AF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VEGA20},
	/* Raven */
	{0x1002, 0x15dd, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RAVEN|AMD_IS_APU},
	/* Picasso */
	{0x1002, 0x15d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PICASSO|AMD_IS_APU},
	{0x1002, 0x15d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RAVEN|AMD_IS_APU},

	{0, 0, 0}
};
+0 −1
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ static int psp_sw_init(void *handle)
		psp_v3_1_set_psp_funcs(psp);
		break;
	case CHIP_RAVEN:
	case CHIP_PICASSO:
		psp_v10_0_set_psp_funcs(psp);
		break;
	case CHIP_VEGA20:
+0 −1
Original line number Diff line number Diff line
@@ -303,7 +303,6 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type)
			return AMDGPU_FW_LOAD_SMU;
	case CHIP_VEGA10:
	case CHIP_RAVEN:
	case CHIP_PICASSO:
	case CHIP_VEGA12:
	case CHIP_VEGA20:
		if (!load_type)
+3 −4
Original line number Diff line number Diff line
@@ -65,12 +65,11 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
	case CHIP_RAVEN:
		if (adev->rev_id >= 8)
			fw_name = FIRMWARE_RAVEN2;
		else if (adev->pdev->device == 0x15d8)
			fw_name = FIRMWARE_PICASSO;
		else
			fw_name = FIRMWARE_RAVEN;
		break;
	case CHIP_PICASSO:
		fw_name = FIRMWARE_PICASSO;
		break;
	default:
		return -EINVAL;
	}
Loading