From 268c298f45cb1bc0beb0b51a3583c803010b2aff Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 27 Aug 2018 16:28:25 +0300 Subject: gpu: nvgpu: use own usermode gpfifo object Add usermode_gpfifo member to channel to store the usermode-owned buffer data. This makes it more explicit about which (user or kernel) memory is accessed. Jira NVGPU-967 Change-Id: I98e4f4568f04aa31e00e497794fadd4997ba8aab Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1807503 Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Sourab Gupta Reviewed-by: Deepak Nibade Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/submit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/fifo/submit.c') diff --git a/drivers/gpu/nvgpu/common/fifo/submit.c b/drivers/gpu/nvgpu/common/fifo/submit.c index e0f31233..56512894 100644 --- a/drivers/gpu/nvgpu/common/fifo/submit.c +++ b/drivers/gpu/nvgpu/common/fifo/submit.c @@ -341,14 +341,14 @@ static int nvgpu_submit_channel_gpfifo(struct channel_gk20a *c, return -ETIMEDOUT; } - if (!nvgpu_mem_is_valid(&c->gpfifo.mem)) { - return -ENOMEM; - } - if (c->usermode_submit_enabled) { return -EINVAL; } + if (!nvgpu_mem_is_valid(&c->gpfifo.mem)) { + return -ENOMEM; + } + /* 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