summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2017-07-03 06:49:27 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-07 13:35:30 -0400
commitd0a77f558ef8d101059c6238abd46a9a97191564 (patch)
tree76488cf718482c20ff81685f48737eaf63a9b3e7 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent858a204362a385f076b057b6196fd89f7edb839b (diff)
gpu: nvgpu: use u32 for timeout API duration
A negative value in the timeout duration does not have any special uses, so change the duration type to u32 (from just int). Delete some unnecessary typecasts to int. Also change MAX_SCHEDULE_TIMEOUT to ULONG_MAX in default gr idle timeout because the value is in milliseconds instead of scheduling units and to drop unnecessary Linux dependency. Change-Id: I5cf6febd4f1cb00c46fe159603436a9ac3b003ac Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master/r/1512565 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index c5dab0b5..4dfb6ee8 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -344,8 +344,7 @@ int gr_gk20a_wait_idle(struct gk20a *g, unsigned long duration_ms,
344 344
345 gr_engine_id = gk20a_fifo_get_gr_engine_id(g); 345 gr_engine_id = gk20a_fifo_get_gr_engine_id(g);
346 346
347 nvgpu_timeout_init(g, &timeout, (int)duration_ms, 347 nvgpu_timeout_init(g, &timeout, duration_ms, NVGPU_TIMER_CPU_TIMER);
348 NVGPU_TIMER_CPU_TIMER);
349 348
350 do { 349 do {
351 /* fmodel: host gets fifo_engine_status(gr) from gr 350 /* fmodel: host gets fifo_engine_status(gr) from gr
@@ -398,8 +397,7 @@ int gr_gk20a_wait_fe_idle(struct gk20a *g, unsigned long duration_ms,
398 397
399 gk20a_dbg_fn(""); 398 gk20a_dbg_fn("");
400 399
401 nvgpu_timeout_init(g, &timeout, (int)duration_ms, 400 nvgpu_timeout_init(g, &timeout, duration_ms, NVGPU_TIMER_CPU_TIMER);
402 NVGPU_TIMER_CPU_TIMER);
403 401
404 do { 402 do {
405 val = gk20a_readl(g, gr_status_r()); 403 val = gk20a_readl(g, gr_status_r());