diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 797d7074f..09425c040 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -1640,6 +1640,22 @@ static int channel_setup_bind_prechecks(struct nvgpu_channel *c, err = -EINVAL; goto fail; } + + /* FUSA build for now assumes that the deterministic flag is not useful */ +#ifdef CONFIG_NVGPU_IOCTL_NON_FUSA + if ((args->flags & NVGPU_SETUP_BIND_FLAGS_USERMODE_SUPPORT) != 0U && + (args->flags & NVGPU_SETUP_BIND_FLAGS_SUPPORT_DETERMINISTIC) == 0U) { + /* + * Usermode submit shares various preconditions with + * deterministic mode. Require that it's explicitly set to + * avoid surprises. + */ + nvgpu_err(g, "need deterministic for usermode submit"); + err = -EINVAL; + goto fail; + } +#endif + fail: return err; } diff --git a/userspace/units/fifo/channel/nvgpu-channel.c b/userspace/units/fifo/channel/nvgpu-channel.c index 6f3c3c7cd..fef3b55e9 100644 --- a/userspace/units/fifo/channel/nvgpu-channel.c +++ b/userspace/units/fifo/channel/nvgpu-channel.c @@ -821,6 +821,8 @@ int test_channel_setup_bind(struct unit_module *m, struct gk20a *g, void *vargs) bind_args.flags &= ~NVGPU_SETUP_BIND_FLAGS_USERMODE_SUPPORT; } else { + bind_args.flags |= + NVGPU_SETUP_BIND_FLAGS_SUPPORT_DETERMINISTIC; bind_args.flags |= NVGPU_SETUP_BIND_FLAGS_USERMODE_SUPPORT; } @@ -1705,6 +1707,7 @@ int test_channel_semaphore_wakeup(struct unit_module *m, memset(&bind_args, 0, sizeof(bind_args)); bind_args.num_gpfifo_entries = 32; + bind_args.flags |= NVGPU_SETUP_BIND_FLAGS_SUPPORT_DETERMINISTIC; bind_args.flags |= NVGPU_SETUP_BIND_FLAGS_USERMODE_SUPPORT; err = nvgpu_channel_setup_bind(ch, &bind_args);