diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/timers.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/timers.c b/drivers/gpu/nvgpu/common/linux/timers.c index 2953902e..5786b240 100644 --- a/drivers/gpu/nvgpu/common/linux/timers.c +++ b/drivers/gpu/nvgpu/common/linux/timers.c | |||
@@ -54,12 +54,9 @@ static int nvgpu_timeout_is_pre_silicon(struct nvgpu_timeout *timeout) | |||
54 | * | 54 | * |
55 | * If neither %NVGPU_TIMER_CPU_TIMER or %NVGPU_TIMER_RETRY_TIMER is passed then | 55 | * If neither %NVGPU_TIMER_CPU_TIMER or %NVGPU_TIMER_RETRY_TIMER is passed then |
56 | * a CPU timer is used by default. | 56 | * a CPU timer is used by default. |
57 | * | ||
58 | * A negative duration is interpreted as the maximum possible, which for our | ||
59 | * purposes means infinite wait. | ||
60 | */ | 57 | */ |
61 | int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, | 58 | int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, |
62 | int duration, unsigned long flags) | 59 | u32 duration, unsigned long flags) |
63 | { | 60 | { |
64 | if (flags & ~NVGPU_TIMER_FLAG_MASK) | 61 | if (flags & ~NVGPU_TIMER_FLAG_MASK) |
65 | return -EINVAL; | 62 | return -EINVAL; |
@@ -69,9 +66,6 @@ int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, | |||
69 | timeout->g = g; | 66 | timeout->g = g; |
70 | timeout->flags = flags; | 67 | timeout->flags = flags; |
71 | 68 | ||
72 | if (duration < 0) | ||
73 | duration = INT_MAX; | ||
74 | |||
75 | if (flags & NVGPU_TIMER_RETRY_TIMER) | 69 | if (flags & NVGPU_TIMER_RETRY_TIMER) |
76 | timeout->retries.max = duration; | 70 | timeout->retries.max = duration; |
77 | else | 71 | else |