From 145eb3321fb8b5411c9e4975eada21515c19ebb0 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 2 Jul 2018 12:48:58 +0300 Subject: gpu: nvgpu: reject submits when usermode is on Kernel mode submits conflict with user submits, so don't allow them if a channel user has asked for usermode submit support. Bug 200145225 Change-Id: I3a99222b09260a1b3e116c6aa86d8da5d380d903 Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1767907 Reviewed-by: Deepak Nibade Reviewed-by: Sourab Gupta Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/submit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/common/fifo/submit.c b/drivers/gpu/nvgpu/common/fifo/submit.c index daeee608..f6a79f80 100644 --- a/drivers/gpu/nvgpu/common/fifo/submit.c +++ b/drivers/gpu/nvgpu/common/fifo/submit.c @@ -322,6 +322,9 @@ static int nvgpu_submit_channel_gpfifo(struct channel_gk20a *c, if (!nvgpu_mem_is_valid(&c->gpfifo.mem)) return -ENOMEM; + if (c->usermode_submit_enabled) + return -EINVAL; + /* fifo not large enough for request. Return error immediately. * Kernel can insert gpfifo entries before and after user gpfifos. * So, add extra_entries in user request. Also, HW with fifo size N -- cgit v1.2.2