summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/channel.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-03-22 07:35:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-03-23 20:18:24 -0400
commitcb8d8337a61ead5eb948d78ef24d55d07fa99e7b (patch)
tree428f0ce0f90620bc0ec1c7ddf1453c832aae5d3a /drivers/gpu/nvgpu/common/linux/channel.c
parentbac51e8081a2ae778bfdccc1c57ee3ef382de077 (diff)
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 <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1680281 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/channel.c7
1 files changed, 2 insertions, 5 deletions
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,
462 } 462 }
463 463
464 /* 464 /*
465 * Optionally insert syncpt wait in the beginning of gpfifo submission 465 * Optionally insert syncpt/semaphore wait in the beginning of gpfifo
466 * when user requested and the wait hasn't expired. Validate that the id 466 * submission when user requested and the wait hasn't expired.
467 * makes sense, elide if not. The only reason this isn't being
468 * unceremoniously killed is to keep running some tests which trigger
469 * this condition.
470 */ 467 */
471 if (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT) { 468 if (flags & NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT) {
472 int max_wait_cmds = c->deterministic ? 1 : 0; 469 int max_wait_cmds = c->deterministic ? 1 : 0;