summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/pmu/pmu_ipc.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/common/pmu/pmu_ipc.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/common/pmu/pmu_ipc.c')
-rw-r--r--drivers/gpu/nvgpu/common/pmu/pmu_ipc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c b/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c
index 0dbc2df3..6dffdf0f 100644
--- a/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c
+++ b/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c
@@ -453,7 +453,7 @@ static int pmu_write_cmd(struct nvgpu_pmu *pmu, struct pmu_cmd *cmd,
453 nvgpu_log_fn(g, " "); 453 nvgpu_log_fn(g, " ");
454 454
455 queue = &pmu->queue[queue_id]; 455 queue = &pmu->queue[queue_id];
456 nvgpu_timeout_init(g, &timeout, (int)timeout_ms, NVGPU_TIMER_CPU_TIMER); 456 nvgpu_timeout_init(g, &timeout, timeout_ms, NVGPU_TIMER_CPU_TIMER);
457 457
458 do { 458 do {
459 err = pmu_queue_open_write(pmu, queue, cmd->hdr.size); 459 err = pmu_queue_open_write(pmu, queue, cmd->hdr.size);
@@ -878,7 +878,7 @@ int pmu_wait_message_cond(struct nvgpu_pmu *pmu, u32 timeout_ms,
878 struct nvgpu_timeout timeout; 878 struct nvgpu_timeout timeout;
879 unsigned long delay = GR_IDLE_CHECK_DEFAULT; 879 unsigned long delay = GR_IDLE_CHECK_DEFAULT;
880 880
881 nvgpu_timeout_init(g, &timeout, (int)timeout_ms, NVGPU_TIMER_CPU_TIMER); 881 nvgpu_timeout_init(g, &timeout, timeout_ms, NVGPU_TIMER_CPU_TIMER);
882 882
883 do { 883 do {
884 if (*var == val) 884 if (*var == val)