summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/fifo/submit.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-08-27 09:28:25 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-30 23:11:32 -0400
commit268c298f45cb1bc0beb0b51a3583c803010b2aff (patch)
tree28dcc3cafe9695566802c7ac19e1e9c7169ff35f /drivers/gpu/nvgpu/common/fifo/submit.c
parentbc6625b9b2a2e5ef05cedf0888c28819d3c3f412 (diff)
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 <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1807503 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Sourab Gupta <sourabg@nvidia.com> Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/fifo/submit.c')
-rw-r--r--drivers/gpu/nvgpu/common/fifo/submit.c8
1 files changed, 4 insertions, 4 deletions
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,
341 return -ETIMEDOUT; 341 return -ETIMEDOUT;
342 } 342 }
343 343
344 if (!nvgpu_mem_is_valid(&c->gpfifo.mem)) {
345 return -ENOMEM;
346 }
347
348 if (c->usermode_submit_enabled) { 344 if (c->usermode_submit_enabled) {
349 return -EINVAL; 345 return -EINVAL;
350 } 346 }
351 347
348 if (!nvgpu_mem_is_valid(&c->gpfifo.mem)) {
349 return -ENOMEM;
350 }
351
352 /* fifo not large enough for request. Return error immediately. 352 /* fifo not large enough for request. Return error immediately.
353 * Kernel can insert gpfifo entries before and after user gpfifos. 353 * Kernel can insert gpfifo entries before and after user gpfifos.
354 * So, add extra_entries in user request. Also, HW with fifo size N 354 * So, add extra_entries in user request. Also, HW with fifo size N