summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-08-30 16:34:07 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-07 23:07:16 -0400
commit5e2c0c5c96d68aed9f6e2de857d49a61990ae55f (patch)
tree6148bb80fa15149fd44f22ede241fa7eec392e95 /drivers/gpu/nvgpu/gp106
parentbb457e675ed2c5dde45e2e89e3e472833444d3f9 (diff)
gpu: nvgpu: Use error code in xve clock change
Use the error code generated when the XVE clock change times out. Before this the error code was being set and the while loop that was polling the clock change status was broken out of. But the error code was only used later on in the while loop. Now just set the error code and only break from the loop later on when that error code is actually checked. Coverity ID: 2624553 Bug 200291879 Change-Id: If8f6046efcc9c4ad0eb13715735a57870be26110 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1548711 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r--drivers/gpu/nvgpu/gp106/xve_gp106.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c
index 89b6b873..a3514fc0 100644
--- a/drivers/gpu/nvgpu/gp106/xve_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c
@@ -355,7 +355,6 @@ static int __do_xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed)
355 err_status = -ETIMEDOUT; 355 err_status = -ETIMEDOUT;
356 xv_sc_dbg(EXEC_CHANGE, " timeout; pl_link_config = 0x%x", 356 xv_sc_dbg(EXEC_CHANGE, " timeout; pl_link_config = 0x%x",
357 pl_link_config); 357 pl_link_config);
358 break;
359 } 358 }
360 359
361 xv_sc_dbg(EXEC_CHANGE, " Change done... Checking status"); 360 xv_sc_dbg(EXEC_CHANGE, " Change done... Checking status");
@@ -376,8 +375,10 @@ static int __do_xve_set_speed_gp106(struct gk20a *g, u32 next_link_speed)
376 link_speed_setting, 375 link_speed_setting,
377 xve_link_control_status_link_speed_v(link_control_status)); 376 xve_link_control_status_link_speed_v(link_control_status));
378 377
379 if (err_status == -ETIMEDOUT) 378 if (err_status == -ETIMEDOUT) {
380 xv_sc_dbg(EXEC_CHANGE, " Oops timed out?"); 379 xv_sc_dbg(EXEC_CHANGE, " Oops timed out?");
380 break;
381 }
381 } while (attempts-- > 0 && 382 } while (attempts-- > 0 &&
382 link_speed_setting != 383 link_speed_setting !=
383 xve_link_control_status_link_speed_v(link_control_status)); 384 xve_link_control_status_link_speed_v(link_control_status));