Commit dfcc3e8c authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: make cyan skillfish support code more consistent



Since this is an existing asic, adjust the code to follow
the same logic as previously so the driver state is consistent.

No functional change intended.

Acked-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fdda8f34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1452,7 +1452,8 @@ static int amdgpu_device_init_apu_flags(struct amdgpu_device *adev)
	case CHIP_YELLOW_CARP:
		break;
	case CHIP_CYAN_SKILLFISH:
		if (adev->pdev->device == 0x13FE)
		if ((adev->pdev->device == 0x13FE) ||
		    (adev->pdev->device == 0x143F))
			adev->apu_flags |= AMD_APU_IS_CYAN_SKILLFISH2;
		break;
	default:
+1 −0
Original line number Diff line number Diff line
@@ -1923,6 +1923,7 @@ static const struct pci_device_id pciidlist[] = {

	/* CYAN_SKILLFISH */
	{0x1002, 0x13FE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYAN_SKILLFISH|AMD_IS_APU},
	{0x1002, 0x143F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_CYAN_SKILLFISH|AMD_IS_APU},

	/* BEIGE_GOBY */
	{0x1002, 0x7420, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BEIGE_GOBY},
+1 −2
Original line number Diff line number Diff line
@@ -137,8 +137,7 @@ static int psp_early_init(void *handle)
		psp->autoload_supported = true;
		break;
	case IP_VERSION(11, 0, 8):
		if (adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2 ||
		    adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 4)) {
		if (adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2) {
			psp_v11_0_8_set_psp_funcs(psp);
			psp->autoload_supported = false;
		}
+1 −3
Original line number Diff line number Diff line
@@ -3956,14 +3956,12 @@ static int gfx_v10_0_init_microcode(struct amdgpu_device *adev)
		chip_name = "yellow_carp";
		break;
	case IP_VERSION(10, 1, 3):
	case IP_VERSION(10, 1, 4):
		if (adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2)
			chip_name = "cyan_skillfish2";
		else
			chip_name = "cyan_skillfish";
		break;
	case IP_VERSION(10, 1, 4):
		chip_name = "cyan_skillfish2";
		break;
	default:
		BUG();
	}
+1 −2
Original line number Diff line number Diff line
@@ -264,8 +264,7 @@ static int sdma_v5_0_init_microcode(struct amdgpu_device *adev)
		chip_name = "navi12";
		break;
	case IP_VERSION(5, 0, 1):
		if (adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2 ||
		    adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 4))
		if (adev->apu_flags & AMD_APU_IS_CYAN_SKILLFISH2)
			chip_name = "cyan_skillfish2";
		else
			chip_name = "cyan_skillfish";