summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
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/include
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/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/timers.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/timers.h b/drivers/gpu/nvgpu/include/nvgpu/timers.h
index 5265437e..482f92b7 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/timers.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/timers.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -52,8 +52,8 @@ struct nvgpu_timeout {
52 union { 52 union {
53 s64 time; 53 s64 time;
54 struct { 54 struct {
55 int max; 55 u32 max;
56 int attempted; 56 u32 attempted;
57 } retries; 57 } retries;
58 }; 58 };
59}; 59};
@@ -75,7 +75,7 @@ struct nvgpu_timeout {
75 NVGPU_TIMER_SILENT_TIMEOUT) 75 NVGPU_TIMER_SILENT_TIMEOUT)
76 76
77int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, 77int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout,
78 int duration, unsigned long flags); 78 u32 duration, unsigned long flags);
79int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout); 79int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout);
80 80
81#define nvgpu_timeout_expired(__timeout) \ 81#define nvgpu_timeout_expired(__timeout) \