Skip to contentSkip to conversation

drm/amdgpu: add Vangogh APU flag to IP discovery path

PATCH In review Perry Yuan 2 participants 6 messages Nov 3, 2022

Subsystems (3)
lore
Share & tools
lore

Perry Yuan

author
#0 lore raw

PATCH v3 1/3 drm/amdgpu: add Vangogh APU flag to IP discovery path

Add the missing apu flag for Vangogh when using IP discovery code path to initialize IPs

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index 95d34590cad1..c1b1f223f3d0 100644
@@ -2153,6 +2153,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
 		break;
 	case IP_VERSION(10, 3, 1):
 		adev->family = AMDGPU_FAMILY_VGH;
+		adev->apu_flags |= AMD_APU_IS_VANGOGH;
 		break;
 	case IP_VERSION(10, 3, 3):
 		adev->family = AMDGPU_FAMILY_YC;
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v3 2/3 drm/amd/display: change GPU match with IP version for Vangogh

Use ip versions (10,3,1) to match the GPU after Vangogh switched to use IP discovery path.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
index 1efe7fa5bc58..cfdcd8852ebc 100644
@@ -10202,8 +10202,8 @@ int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context
  */
 bool check_seamless_boot_capability(struct amdgpu_device *adev)
 {
-	switch (adev->asic_type) {
-	case CHIP_VANGOGH:
+	switch (adev->ip_versions[DCE_HWIP][0]) {
+	case IP_VERSION(3, 0, 1):
 		if (!adev->mman.keep_stolen_vga_memory)
 			return true;
 		break;
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH v3 3/3 drm/amdgpu: remove the DID of Vangogh from pciidlist

In reply to Perry Yuan

change the vangogh family to use IP discovery path to initialize IP list, this needs to remove the DID from the PCI ID list to allow the IP discovery path to set all the IP versions correctly.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -3
index 429fcdf28836..9c323405e3bb 100644
@@ -1909,9 +1909,6 @@ static const struct pci_device_id pciidlist[] = {
 	{0x1002, 0x73AF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
 	{0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
 
-	/* Van Gogh */
-	{0x1002, 0x163F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VANGOGH|AMD_IS_APU},
-
 	/* Yellow Carp */
 	{0x1002, 0x164D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_YELLOW_CARP|AMD_IS_APU},
 	{0x1002, 0x1681, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_YELLOW_CARP|AMD_IS_APU},
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v3 3/3] drm/amdgpu: remove the DID of Vangogh from pciidlist

Quoted 4 lines · Perry Yuan

change the vangogh family to use IP discovery path to initialize IP list, this needs to remove the DID from the PCI ID list to allow the IP discovery path to set all the IP versions correctly.

As a follow up patch, it may make sense to remove CHIP_VANGOGH entirely so no one accidentally tries to use it.

Alex

Quoted 23 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -4
index 429fcdf28836..9c323405e3bb 100644
@@ -1909,9 +1909,6 @@ static const struct pci_device_id pciidlist[] = {
        {0x1002, 0x73AF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
        {0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
 
-       /* Van Gogh */
-       {0x1002, 0x163F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VANGOGH|AMD_IS_APU},
-
        /* Yellow Carp */
        {0x1002, 0x164D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_YELLOW_CARP|AMD_IS_APU},
        {0x1002, 0x1681, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_YELLOW_CARP|AMD_IS_APU},
--

2.34.1

#4 lore raw

RE: [PATCH v3 3/3] drm/amdgpu: remove the DID of Vangogh from pciidlist

[AMD Official Use Only - General]

Hi Alex.

Quoted 17 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, November 3, 2022 9:15 PM
To: Yuan, Perry <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Liang, Richard qi <[email protected]>; Huang, Shimmer <[email protected]>; [email protected]; Liu, Kun <[email protected]>
Subject: Re: [PATCH v3 3/3] drm/amdgpu: remove the DID of Vangogh from pciidlist

Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.

Quoted 1 line · Perry Yuan
Quoted 8 lines
Quoted 3 lines

change the vangogh family to use IP discovery path to initialize IP list, this needs to remove the DID from the PCI ID list to allow the IP discovery path to set all the IP versions correctly.

As a follow up patch, it may make sense to remove CHIP_VANGOGH entirely so no one accidentally tries to use it.

Alex

Sure, I will create some following patches to remove the CHIP_VANGOGH relevant code.

Perry.

Quoted 31 lines
Quoted 14 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
index 429fcdf28836..9c323405e3bb 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static const struct pci_device_id pciidlist[] = { · line 1909

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -0
@@ -1909,9 +1909,6 @@ static const struct pci_device_id pciidlist[] = {
        {0x1002, 0x73AF, PCI_ANY_ID, PCI_ANY_ID, 0, 0,

CHIP_SIENNA_CICHLID},

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static const struct pci_device_id pciidlist[] = { · line 1914

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -2
        {0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
 CHIP_SIENNA_CICHLID},
 
-       /* Van Gogh */
-       {0x1002, 0x163F, PCI_ANY_ID, PCI_ANY_ID, 0, 0,

CHIP_VANGOGH|AMD_IS_APU},

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c static const struct pci_device_id pciidlist[] = {

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -1
-
        /* Yellow Carp */
        {0x1002, 0x164D, PCI_ANY_ID, PCI_ANY_ID, 0, 0,

CHIP_YELLOW_CARP|AMD_IS_APU},

Quoted 5 lines
        {0x1002, 0x1681, PCI_ANY_ID, PCI_ANY_ID, 0, 0,

CHIP_YELLOW_CARP|AMD_IS_APU},
--
2.34.1

Reviewed-by on v3 1/3
#5 lore raw
In reply to Perry Yuan

Series is:

Quoted 24 lines · Perry Yuan

Add the missing apu flag for Vangogh when using IP discovery code path to initialize IPs

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -1
index 95d34590cad1..c1b1f223f3d0 100644
@@ -2153,6 +2153,7 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
                break;
        case IP_VERSION(10, 3, 1):
                adev->family = AMDGPU_FAMILY_VGH;
+               adev->apu_flags |= AMD_APU_IS_VANGOGH;
                break;
        case IP_VERSION(10, 3, 3):
                adev->family = AMDGPU_FAMILY_YC;
--

2.34.1