Skip to contentSkip to conversation

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

PATCH Superseded Perry Yuan 2 participants 5 messages Nov 2, 2022 – Nov 3, 2022

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Perry Yuan

author
#0 lore raw

PATCH v2 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 v2 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..90636b88d6bf 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[GC_HWIP][0]) {
+	case IP_VERSION(10, 3, 1):
 		if (!adev->mman.keep_stolen_vga_memory)
 			return true;
 		break;
Signature · 1 line
2.34.1
Reviewed-by on v2 2/3
#2 lore raw

Re: [PATCH v2 2/3] drm/amd/display: change GPU match with IP version for Vangogh

Quoted 14 lines · Perry Yuan

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 +0 -0
index 1efe7fa5bc58..90636b88d6bf 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context · line 10206

Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
@@ -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[GC_HWIP][0]) {
+       case IP_VERSION(10, 3, 1):

How about:
switch (adev->ip_versions[DCE_HWIP][0]) {
case IP_VERSION(3, 0, 1):

Since this code is more relevant to the DC IP than the GC IP. With that fixed, the series is:

Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
                if (!adev->mman.keep_stolen_vga_memory)
                        return true;
                break;
--

2.34.1

#3 lore raw

RE: [PATCH v2 2/3] drm/amd/display: change GPU match with IP version for Vangogh

[AMD Official Use Only - General]

Hi Alex.

Quoted 40 lines

-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, November 3, 2022 1:14 AM
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 v2 2/3] drm/amd/display: change GPU match with IP version for Vangogh

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

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c int

Quoted 15 lines · Perry Yuan

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 +0 -0
index 1efe7fa5bc58..90636b88d6bf 100644
@@ -10202,8 +10202,8 @@ int

amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c int amdgpu_dm_process_dmub_aux_transfer_sync(bool is_cmd_aux, struct dc_context · line 10206

Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +2 -2
  */
 bool check_seamless_boot_capability(struct amdgpu_device *adev)  {
-       switch (adev->asic_type) {
-       case CHIP_VANGOGH:
+       switch (adev->ip_versions[GC_HWIP][0]) {
+       case IP_VERSION(10, 3, 1):
Quoted 4 lines

How about:
switch (adev->ip_versions[DCE_HWIP][0]) { case IP_VERSION(3, 0, 1):

Since this code is more relevant to the DC IP than the GC IP. With that fixed,

You are right, The DCE IP is more reasonable to match this. V3 sent for the fix.

Perry.

Quoted 9 lines

the series is:

Quoted 6 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
                if (!adev->mman.keep_stolen_vga_memory)
                        return true;
                break;
--

2.34.1

author
#4 lore raw

PATCH v2 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