mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
gpu: nvgpu: move set_min_max out of safety build
nvgpu_channel_sync_set_min_eq_max is not used as part of the safety build and hence is moved out. channel_sync_syncpt_set_min_eq_max is also moved out as a part of the above function. Also add a branch coverage for the case when g->disable_syncpoints is set to true. Jira NVGPU-913 Change-Id: I2512d01e105551732aad63b2800bb4cb6d913cb2 Signed-off-by: ddutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2263003 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -299,8 +299,6 @@ int nvgpu_channel_sync_wait_syncpt(struct nvgpu_channel_sync_syncpt *s,
|
||||
return channel_sync_syncpt_wait_raw(s, id, thresh, entry);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NVGPU_KERNEL_MODE_SUBMIT */
|
||||
|
||||
static void channel_sync_syncpt_set_min_eq_max(struct nvgpu_channel_sync *s)
|
||||
{
|
||||
struct nvgpu_channel_sync_syncpt *sp =
|
||||
@@ -308,6 +306,8 @@ static void channel_sync_syncpt_set_min_eq_max(struct nvgpu_channel_sync *s)
|
||||
nvgpu_nvhost_syncpt_set_min_eq_max_ext(sp->nvhost_dev, sp->id);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NVGPU_KERNEL_MODE_SUBMIT */
|
||||
|
||||
static void channel_sync_syncpt_set_safe_state(struct nvgpu_channel_sync *s)
|
||||
{
|
||||
struct nvgpu_channel_sync_syncpt *sp =
|
||||
@@ -353,7 +353,7 @@ nvgpu_channel_sync_to_syncpt(struct nvgpu_channel_sync *sync)
|
||||
{
|
||||
struct nvgpu_channel_sync_syncpt *syncpt = NULL;
|
||||
|
||||
if (sync->set_min_eq_max == channel_sync_syncpt_set_min_eq_max) {
|
||||
if (sync->set_safe_state == channel_sync_syncpt_set_safe_state) {
|
||||
syncpt = nvgpu_channel_sync_syncpt_from_ops(sync);
|
||||
}
|
||||
|
||||
@@ -414,8 +414,8 @@ nvgpu_channel_sync_syncpt_create(struct nvgpu_channel *c, bool user_managed)
|
||||
sp->ops.wait_fence_fd = channel_sync_syncpt_wait_fd;
|
||||
sp->ops.incr = channel_sync_syncpt_incr;
|
||||
sp->ops.incr_user = channel_sync_syncpt_incr_user;
|
||||
#endif
|
||||
sp->ops.set_min_eq_max = channel_sync_syncpt_set_min_eq_max;
|
||||
#endif
|
||||
sp->ops.set_safe_state = channel_sync_syncpt_set_safe_state;
|
||||
sp->ops.destroy = channel_sync_syncpt_destroy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user