aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorRex Zhu <[email protected]>2017-10-09 05:50:31 +0000
committerAlex Deucher <[email protected]>2017-10-19 19:26:53 +0000
commit202f5d6e1a5962e3acb21c50cd9b4e3ab5990dab (patch)
tree781be3db388dfd88c99da0a81f1c7225feb59f2b /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentdrm/amd/pp: move common function to smu7_smumgr.c (diff)
downloadkernel-202f5d6e1a5962e3acb21c50cd9b4e3ab5990dab.tar.gz
kernel-202f5d6e1a5962e3acb21c50cd9b4e3ab5990dab.zip
drm/amdgpu: refine code delete duplicated error handling
in function amdgpu_ucode_init_bo, when failed, it will set load_type to AMDGPU_FW_LOAD_DIRECT. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Rex Zhu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 412ad99d8871..1f793eb301ef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1711,8 +1711,8 @@ static int amdgpu_init(struct amdgpu_device *adev)
}
mutex_lock(&adev->firmware.mutex);
- if (amdgpu_ucode_init_bo(adev))
- adev->firmware.load_type = AMDGPU_FW_LOAD_DIRECT;
+ if (adev->firmware.load_type != AMDGPU_FW_LOAD_DIRECT)
+ amdgpu_ucode_init_bo(adev);
mutex_unlock(&adev->firmware.mutex);
for (i = 0; i < adev->num_ip_blocks; i++) {