summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 7fa8a552..328f49b1 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1460,8 +1460,11 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
1460 if (c->has_timedout) 1460 if (c->has_timedout)
1461 return -ETIMEDOUT; 1461 return -ETIMEDOUT;
1462 1462
1463 /* fifo not large enough for request. Return error immediately */ 1463 /* fifo not large enough for request. Return error immediately.
1464 if (c->gpfifo.entry_num < num_entries) { 1464 * Kernel can insert gpfifo entries before and after user gpfifos.
1465 * So, add extra_entries in user request. Also, HW with fifo size N
1466 * can accept only N-1 entreis and so the below condition */
1467 if (c->gpfifo.entry_num - 1 < num_entries + extra_entries) {
1465 gk20a_err(d, "not enough gpfifo space allocated"); 1468 gk20a_err(d, "not enough gpfifo space allocated");
1466 return -ENOMEM; 1469 return -ENOMEM;
1467 } 1470 }