Skip to contentSkip to conversation

drm/amd/display: Override DCN410 IP version

PATCH In review Aurabindo Pillai 2 participants 3 messages Apr 30, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Override DCN410 IP version

Override DCN IP version to 4.0.1 from 4.1.0 temporarily until change is made in DC codebase to use 4.1.0

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +5 -0
index 2aad1ba0ab9d..87a2f15c8a64 100644
@@ -1965,6 +1965,11 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
 		case IP_VERSION(3, 2, 1):
 		case IP_VERSION(3, 5, 0):
 		case IP_VERSION(3, 5, 1):
+		case IP_VERSION(4, 1, 0):
+			/* TODO: Fix IP version. DC code expects version 4.0.1 */
+			if (adev->ip_versions[DCE_HWIP][0] == IP_VERSION(4, 1, 0))
+                               adev->ip_versions[DCE_HWIP][0] = IP_VERSION(4, 0, 1);
+
 			if (amdgpu_sriov_vf(adev))
 				amdgpu_discovery_set_sriov_display(adev);
 			else
Signature · 1 line
2.44.0
#1 lore raw
Quoted 13 lines · Aurabindo Pillai

Override DCN IP version to 4.0.1 from 4.1.0 temporarily until change is made in DC codebase to use 4.1.0

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -0
index 2aad1ba0ab9d..87a2f15c8a64 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev) · line 1968

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -1965,6 +1965,11 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
 		case IP_VERSION(3, 2, 1):
 		case IP_VERSION(3, 5, 0):
 		case IP_VERSION(3, 5, 1):
+		case IP_VERSION(4, 1, 0):

Doesn't this do more than override? Doesn't this enable IP creation for DCN 4.1.0 in the first place?

It might make sense to split this into a separate patch as it sounds like we'll want to revert the override at some point in the future but not the IP creation.

Harry

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -0
+			/* TODO: Fix IP version. DC code expects version 4.0.1 */
+			if (adev->ip_versions[DCE_HWIP][0] == IP_VERSION(4, 1, 0))
+                               adev->ip_versions[DCE_HWIP][0] = IP_VERSION(4, 0, 1);
+
 			if (amdgpu_sriov_vf(adev))
 				amdgpu_discovery_set_sriov_display(adev);
 			else
#2 lore raw

[AMD Official Use Only - General]

Thanks for the review!

Just sent a v2
________________________________
From: Wentland, Harry <[email protected]>
Sent: Tuesday, April 30, 2024 9:36 AM
To: Pillai, Aurabindo <[email protected]>; [email protected] <[email protected]>
Cc: Siqueira, Rodrigo <[email protected]>; Deucher, Alexander <[email protected]>
Subject: Re: [PATCH] drm/amd/display: Override DCN410 IP version

Quoted 13 lines · Aurabindo Pillai

Override DCN IP version to 4.0.1 from 4.1.0 temporarily until change is made in DC codebase to use 4.1.0

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +0 -0
index 2aad1ba0ab9d..87a2f15c8a64 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev) · line 1968

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
@@ -1965,6 +1965,11 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
               case IP_VERSION(3, 2, 1):
               case IP_VERSION(3, 5, 0):
               case IP_VERSION(3, 5, 1):
+             case IP_VERSION(4, 1, 0):

Doesn't this do more than override? Doesn't this enable IP creation for DCN 4.1.0 in the first place?

It might make sense to split this into a separate patch as it sounds like we'll want to revert the override at some point in the future but not the IP creation.

Harry

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -0
+                     /* TODO: Fix IP version. DC code expects version 4.0.1 */
+                     if (adev->ip_versions[DCE_HWIP][0] == IP_VERSION(4, 1, 0))
+                               adev->ip_versions[DCE_HWIP][0] = IP_VERSION(4, 0, 1);
+
                       if (amdgpu_sriov_vf(adev))
                               amdgpu_discovery_set_sriov_display(adev);
                       else