Skip to contentSkip to conversation

drm/amd/display: Enable DCN410 init

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

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

PATCH v2 1/2 drm/amd/display: Enable DCN410 init

Enable initializing Display Manager for DCN410 IP

---
 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 2aad1ba0ab9d..d7f948e84e4f 100644
@@ -1965,6 +1965,7 @@ 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):
 			if (amdgpu_sriov_vf(adev))
 				amdgpu_discovery_set_sriov_display(adev);
 			else
Signature · 1 line
2.44.0
#1 lore raw

PATCH v2 2/2 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 | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -0
index d7f948e84e4f..87a2f15c8a64 100644
@@ -1966,6 +1966,10 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
 		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
Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] drm/amd/display: Override DCN410 IP version

Quoted 4 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

Series is

Harry

Quoted 19 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -0
index d7f948e84e4f..87a2f15c8a64 100644
@@ -1966,6 +1966,10 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
 		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
#3 lore raw

Re: [PATCH v2 2/2] drm/amd/display: Override DCN410 IP version

Quoted 15 lines · Harry Wentland
Quoted 4 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

Series is

Harry

Quoted 4 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 4 ++++
  1 file changed, 4 insertions(+)
Quoted 11 lines

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

Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
index d7f948e84e4f..87a2f15c8a64 100644
@@ -1966,6 +1966,10 @@ static int amdgpu_discovery_set_display_ip_blocks(struct amdgpu_device *adev)
  		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);

This test will be called for all IP versions - most of them are not needed.
I can suggest to move "case IP_VERSION(4, 1, 0) to the top and then fall through to the rest. Of course it works without this but it will waste some instructions unnecessarily.

David

Quoted 4 lines
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
+
  			if (amdgpu_sriov_vf(adev))
  				amdgpu_discovery_set_sriov_display(adev);
  			else