diff options
author | Sourab Gupta <sourabg@nvidia.com> | 2018-05-01 01:36:51 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-02 11:39:47 -0400 |
commit | 5a7e2abe6c9d1809898937dfa026ca2e5464db45 (patch) | |
tree | 598ddc891816d70be6874bef074a012ba4bf51b3 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | f3549327f9ec90217885ed36bbad18f4d9153f35 (diff) |
gpu: nvgpu: fix cond_wait return value in channel poll worker
The return value from NVGPU_COND_WAIT_INTERRUPTIBLE in
channel poll worker is wrongly compared with 0 and the
boolean result is assigned to ret value used subsequently.
Instead, the direct return value from
NVGPU_COND_WAIT_INTERRUPTIBLE should be used.
This bug seems remnant of the following patch which moved
the handling from 'wait_event_timeout' to 'NVGPU_COND_WAIT'.
commit 301965fb77b3dc97445957712b82ce430eaa17e3
gpu: nvgpu: Use nvgpu_cond in channel worker
Change-Id: Id48e197756a6855b35a9ee0dc26d014b62ed3860
Signed-off-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1705976
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 48677529..a7a08b5a 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -1606,7 +1606,7 @@ static int gk20a_channel_poll_worker(void *arg) | |||
1606 | ret = NVGPU_COND_WAIT_INTERRUPTIBLE( | 1606 | ret = NVGPU_COND_WAIT_INTERRUPTIBLE( |
1607 | &worker->wq, | 1607 | &worker->wq, |
1608 | __gk20a_channel_worker_pending(g, get), | 1608 | __gk20a_channel_worker_pending(g, get), |
1609 | watchdog_interval) > 0; | 1609 | watchdog_interval); |
1610 | 1610 | ||
1611 | if (ret == 0) | 1611 | if (ret == 0) |
1612 | gk20a_channel_worker_process(g, &get); | 1612 | gk20a_channel_worker_process(g, &get); |