gpu: nvgpu: channel: use u32 for syncpt id

Make the APIs nvgpu_channel_sync_get_syncpt_id() and
channel_sync_syncpt_get_id() return u32s rather than converting to
ints and back.

Also define FIFO_INVAL_SYNCPT_ID to use for invalid syncpt IDs rather
than using magic numbers.

JIRA NVGPU-1008

Change-Id: I4dde6b15fd3708fb0126b46c6fea8ac1b447c7ce
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2014821
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Philip Elcan
2019-02-08 10:22:32 -05:00
committed by mobile promotions
parent fa81cf9000
commit ab5684ce1b
6 changed files with 13 additions and 11 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2018, NVIDIA Corporation. All rights reserved.
* Copyright (c) 2011-2019, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -443,7 +443,7 @@ static int gk20a_ctrl_prepare_compressible_read(
args->fence.syncpt_value =
fence_out->syncpt_value;
} else {
args->fence.syncpt_id = -1;
args->fence.syncpt_id = FIFO_INVAL_SYNCPT_ID;
args->fence.syncpt_value = 0;
}
}