From cb8d8337a61ead5eb948d78ef24d55d07fa99e7b Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 22 Mar 2018 13:35:01 +0200 Subject: gpu: nvgpu: disallow invalid syncpoint wait ids Instead of ignoring a wait when a raw syncpoint prefence has an invalid id, reject the submit with -EINVAL just like with syncpoints in syncfds. Change-Id: I9b5c417bd1c7cd081c79659d088ac2c915de8c0e Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1680281 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/channel.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/channel.c') diff --git a/drivers/gpu/nvgpu/common/linux/channel.c b/drivers/gpu/nvgpu/common/linux/channel.c index 07bb393e..dc35fbc0 100644 --- a/drivers/gpu/nvgpu/common/linux/channel.c +++ b/drivers/gpu/nvgpu/common/linux/channel.c @@ -462,11 +462,8 @@ static int gk20a_submit_prepare_syncs(struct channel_gk20a *c, } /* - * Optionally insert syncpt wait in the beginning of gpfifo submission - * when user requested and the wait hasn't expired. Validate that the id - * makes sense, elide if not. The only reason this isn't being - * unceremoniously killed is to keep running some tests which trigger - * this condition. + * Optionally insert syncpt/semaphore wait in the beginning of gpfifo + * submission when user requested and the wait hasn't expired. */ if (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT) { int max_wait_cmds = c->deterministic ? 1 : 0; -- cgit v1.2.2