drm/amdgpu: fill in IP versions from IP discovery table
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 20 Jul 2021 20:57:40 +0000 (16:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Oct 2021 19:22:58 +0000 (15:22 -0400)
Prerequisite for using IP versions in the driver rather
than asic type.

v2: Use IP_VERSION() macro instead of new function

Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

index d195b814712da55180b7772821c933b6d55c007a..3c60b7af9898af0458acdf21d449b88555d947d8 100644 (file)
@@ -336,8 +336,9 @@ int amdgpu_discovery_reg_base_init(struct amdgpu_device *adev)
                                                        hw_id_names[le16_to_cpu(ip->hw_id)]);
                                        adev->reg_offset[hw_ip][ip->number_instance] =
                                                ip->base_address;
+                                       adev->ip_versions[hw_ip] =
+                                               IP_VERSION(ip->major, ip->minor, ip->revision);
                                }
-
                        }
 
 next_ip: