On 2024-04-30 10:48, Harry Wentland wrote:

On 2024-04-30 09:43, Aurabindo Pillai wrote:
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

Signed-off-by: Aurabindo Pillai <aurabindo.pil...@amd.com>
Series is
Reviewed-by: Harry Wentland <harry.wentl...@amd.com>

Harry

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index d7f948e84e4f..87a2f15c8a64 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -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

+
                        if (amdgpu_sriov_vf(adev))
                                amdgpu_discovery_set_sriov_display(adev);
                        else

Reply via email to