]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/amdgpu: call atomfirmware get_clock_info for atomfirmware systems
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Jul 2017 14:43:10 +0000 (10:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jul 2017 15:06:38 +0000 (11:06 -0400)
Rather than the legacy atombios version.

Acked-by: Chunming Zhou <david1.zhou@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 078886c6b7587fd51df397094434ab94522bd56d..a9eeaad49d182804b7ddd72847947d3b6169668a 100644 (file)
@@ -2189,7 +2189,15 @@ int amdgpu_device_init(struct amdgpu_device *adev,
                DRM_INFO("GPU post is not needed\n");
        }
 
-       if (!adev->is_atom_fw) {
+       if (adev->is_atom_fw) {
+               /* Initialize clocks */
+               r = amdgpu_atomfirmware_get_clock_info(adev);
+               if (r) {
+                       dev_err(adev->dev, "amdgpu_atomfirmware_get_clock_info failed\n");
+                       amdgpu_vf_error_put(AMDGIM_ERROR_VF_ATOMBIOS_GET_CLOCK_FAIL, 0, 0);
+                       goto failed;
+               }
+       } else {
                /* Initialize clocks */
                r = amdgpu_atombios_get_clock_info(adev);
                if (r) {