]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: move firmware loading type setup to common code
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Mar 2018 20:06:35 +0000 (15:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Mar 2018 21:01:15 +0000 (16:01 -0500)
No need to replicate it in several places.

Reviewed-by: Rex Zhu <rezhu@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
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/soc15.c
drivers/gpu/drm/amd/amdgpu/vi.c

index e32ff159ba890b11912c31d89c09dfb5e1b699da..b054fea358767498ca9a13fa91b7c13a3a7af8cc 100644 (file)
@@ -856,6 +856,8 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)
                dev_warn(adev->dev, "lockup_timeout msut be > 0, adjusting to 10000\n");
                amdgpu_lockup_timeout = 10000;
        }
+
+       adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
 }
 
 /**
index 4324184996a52f20d36ce12ef4f3b4ae6f0e41fe..f14dd1b073e9763376067bc94a1fc6774be2468f 100644 (file)
@@ -1887,8 +1887,6 @@ static int cik_common_early_init(void *handle)
                return -EINVAL;
        }
 
-       adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
-
        amdgpu_device_get_pcie_info(adev);
 
        return 0;
index 8dc8b72ed49b5560e379c2dfedd4a552520d3171..de7defbfe9325fb8128ca53be9bfe04183d4575b 100644 (file)
@@ -692,8 +692,6 @@ static int soc15_common_early_init(void *handle)
                xgpu_ai_mailbox_set_irq_funcs(adev);
        }
 
-       adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
-
        amdgpu_device_get_pcie_info(adev);
 
        return 0;
index 61360a1552d83df2fb613301e9e7c672f0c06ab2..dec7de3be78aa15d947e2556e355845aec82076d 100644 (file)
@@ -1097,9 +1097,6 @@ static int vi_common_early_init(void *handle)
                xgpu_vi_mailbox_set_irq_funcs(adev);
        }
 
-       /* vi use smc load by default */
-       adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
-
        amdgpu_device_get_pcie_info(adev);
 
        return 0;