mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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:
committed by
mobile promotions
parent
fa81cf9000
commit
ab5684ce1b
@@ -307,7 +307,7 @@ static void channel_sync_syncpt_set_safe_state(struct nvgpu_channel_sync *s)
|
||||
nvgpu_nvhost_syncpt_set_safe_state(sp->nvhost_dev, sp->id);
|
||||
}
|
||||
|
||||
static int channel_sync_syncpt_get_id(struct nvgpu_channel_sync_syncpt *sp)
|
||||
static u32 channel_sync_syncpt_get_id(struct nvgpu_channel_sync_syncpt *sp)
|
||||
{
|
||||
return sp->id;
|
||||
}
|
||||
@@ -330,7 +330,7 @@ static void channel_sync_syncpt_destroy(struct nvgpu_channel_sync *s)
|
||||
nvgpu_kfree(sp->c->g, sp);
|
||||
}
|
||||
|
||||
int nvgpu_channel_sync_get_syncpt_id(struct nvgpu_channel_sync_syncpt *s)
|
||||
u32 nvgpu_channel_sync_get_syncpt_id(struct nvgpu_channel_sync_syncpt *s)
|
||||
{
|
||||
return channel_sync_syncpt_get_id(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user