summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 28b0bbc7..a54e3a6c 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1545,6 +1545,12 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
1545 if (c->has_timedout) 1545 if (c->has_timedout)
1546 return -ETIMEDOUT; 1546 return -ETIMEDOUT;
1547 1547
1548 /* fifo not large enough for request. Return error immediately */
1549 if (c->gpfifo.entry_num < num_entries) {
1550 gk20a_err(d, "not enough gpfifo space allocated");
1551 return -ENOMEM;
1552 }
1553
1548 if ((flags & (NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT | 1554 if ((flags & (NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_WAIT |
1549 NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_GET)) && 1555 NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_GET)) &&
1550 !fence) 1556 !fence)
@@ -1606,7 +1612,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
1606 } 1612 }
1607 1613
1608 if (err) { 1614 if (err) {
1609 gk20a_err(d, "not enough gpfifo space"); 1615 gk20a_err(d, "timeout waiting for gpfifo space");
1610 err = -EAGAIN; 1616 err = -EAGAIN;
1611 goto clean_up; 1617 goto clean_up;
1612 } 1618 }