diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index a083cb81..08e483a3 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |||
@@ -401,7 +401,7 @@ int nvgpu_channel_ioctl_alloc_gpfifo(struct channel_gk20a *c, | |||
401 | 401 | ||
402 | static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, | 402 | static int gk20a_channel_wait_semaphore(struct channel_gk20a *ch, |
403 | ulong id, u32 offset, | 403 | ulong id, u32 offset, |
404 | u32 payload, long timeout) | 404 | u32 payload, u32 timeout) |
405 | { | 405 | { |
406 | struct dma_buf *dmabuf; | 406 | struct dma_buf *dmabuf; |
407 | void *data; | 407 | void *data; |
@@ -448,7 +448,6 @@ static int gk20a_channel_wait(struct channel_gk20a *ch, | |||
448 | u64 jiffies; | 448 | u64 jiffies; |
449 | ulong id; | 449 | ulong id; |
450 | u32 offset; | 450 | u32 offset; |
451 | unsigned long timeout; | ||
452 | int remain, ret = 0; | 451 | int remain, ret = 0; |
453 | u64 end; | 452 | u64 end; |
454 | 453 | ||
@@ -457,11 +456,6 @@ static int gk20a_channel_wait(struct channel_gk20a *ch, | |||
457 | if (ch->has_timedout) | 456 | if (ch->has_timedout) |
458 | return -ETIMEDOUT; | 457 | return -ETIMEDOUT; |
459 | 458 | ||
460 | if (args->timeout == NVGPU_NO_TIMEOUT) | ||
461 | timeout = MAX_SCHEDULE_TIMEOUT; | ||
462 | else | ||
463 | timeout = (u32)msecs_to_jiffies(args->timeout); | ||
464 | |||
465 | switch (args->type) { | 459 | switch (args->type) { |
466 | case NVGPU_WAIT_TYPE_NOTIFIER: | 460 | case NVGPU_WAIT_TYPE_NOTIFIER: |
467 | id = args->condition.notifier.dmabuf_fd; | 461 | id = args->condition.notifier.dmabuf_fd; |
@@ -494,7 +488,7 @@ static int gk20a_channel_wait(struct channel_gk20a *ch, | |||
494 | remain = NVGPU_COND_WAIT_INTERRUPTIBLE( | 488 | remain = NVGPU_COND_WAIT_INTERRUPTIBLE( |
495 | &ch->notifier_wq, | 489 | &ch->notifier_wq, |
496 | notif->status == 0 || ch->has_timedout, | 490 | notif->status == 0 || ch->has_timedout, |
497 | timeout); | 491 | args->timeout); |
498 | 492 | ||
499 | if (remain == 0 && notif->status != 0) { | 493 | if (remain == 0 && notif->status != 0) { |
500 | ret = -ETIMEDOUT; | 494 | ret = -ETIMEDOUT; |
@@ -521,7 +515,7 @@ notif_clean_up: | |||
521 | args->condition.semaphore.dmabuf_fd, | 515 | args->condition.semaphore.dmabuf_fd, |
522 | args->condition.semaphore.offset, | 516 | args->condition.semaphore.offset, |
523 | args->condition.semaphore.payload, | 517 | args->condition.semaphore.payload, |
524 | timeout); | 518 | args->timeout); |
525 | 519 | ||
526 | break; | 520 | break; |
527 | 521 | ||