diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2019-01-14 14:56:42 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-25 16:15:34 -0500 |
commit | 1f46df61a148da7263165079b4874d61525c8ae1 (patch) | |
tree | a82063e3e68a608976b9fa304bc76b26763dc9c5 | |
parent | 0982a8fc2a85ecac36901a27b7d8e29b2885d939 (diff) |
drm/amdgpu/soc15: return proper error codes in baco reset
Rather than just -1.
Reviewed-by: JimQu <Jim.Qu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc15.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 5248b03df5fa..7130a4c8dd5f 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c | |||
@@ -427,7 +427,7 @@ static int soc15_asic_get_baco_capability(struct amdgpu_device *adev, bool *cap) | |||
427 | 427 | ||
428 | if (!pp_funcs || !pp_funcs->get_asic_baco_capability) { | 428 | if (!pp_funcs || !pp_funcs->get_asic_baco_capability) { |
429 | *cap = false; | 429 | *cap = false; |
430 | return -1; | 430 | return -ENOENT; |
431 | } | 431 | } |
432 | 432 | ||
433 | return pp_funcs->get_asic_baco_capability(pp_handle, cap); | 433 | return pp_funcs->get_asic_baco_capability(pp_handle, cap); |
@@ -439,15 +439,15 @@ static int soc15_asic_baco_reset(struct amdgpu_device *adev) | |||
439 | const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; | 439 | const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; |
440 | 440 | ||
441 | if (!pp_funcs ||!pp_funcs->get_asic_baco_state ||!pp_funcs->set_asic_baco_state) | 441 | if (!pp_funcs ||!pp_funcs->get_asic_baco_state ||!pp_funcs->set_asic_baco_state) |
442 | return -1; | 442 | return -ENOENT; |
443 | 443 | ||
444 | /* enter BACO state */ | 444 | /* enter BACO state */ |
445 | if (pp_funcs->set_asic_baco_state(pp_handle, 1)) | 445 | if (pp_funcs->set_asic_baco_state(pp_handle, 1)) |
446 | return -1; | 446 | return -EIO; |
447 | 447 | ||
448 | /* exit BACO state */ | 448 | /* exit BACO state */ |
449 | if (pp_funcs->set_asic_baco_state(pp_handle, 0)) | 449 | if (pp_funcs->set_asic_baco_state(pp_handle, 0)) |
450 | return -1; | 450 | return -EIO; |
451 | 451 | ||
452 | dev_info(adev->dev, "GPU BACO reset\n"); | 452 | dev_info(adev->dev, "GPU BACO reset\n"); |
453 | 453 | ||