From cd134bb198d7138a3c2fcb17d11f2eedf934e2c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Konsta=20H=C3=B6ltt=C3=A4?= <kholtta@nvidia.com>
Date: Wed, 29 Jul 2020 08:48:03 +0300
Subject: gpu: nvgpu: delete priv cmd buf size warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Running out of priv cmd buffer allocation capacity is typically a
recoverable "error" caused by extra pressure wrt. allocation sizes based
on number of inflight jobs chosen by userspace. These conditions return
-EAGAIN and further retries will succeed as long as the channel advances
with submitted jobs. Remove the unnecessary debug spew.

Bug 200641803
Bug 200651329

Change-Id: I4dfc38cfc3eb10d57ac11c1b7164c3d84f9034d3
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2388799
(cherry picked from commit 29ad324f8226ed3326f5de9117b9115a15cdd032)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2410069
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
---
 drivers/gpu/nvgpu/common/sync/channel_sync.c         | 3 ---
 drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c   | 1 -
 drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c | 2 --
 3 files changed, 6 deletions(-)

diff --git a/drivers/gpu/nvgpu/common/sync/channel_sync.c b/drivers/gpu/nvgpu/common/sync/channel_sync.c
index b40de834..a88092e1 100644
--- a/drivers/gpu/nvgpu/common/sync/channel_sync.c
+++ b/drivers/gpu/nvgpu/common/sync/channel_sync.c
@@ -66,7 +66,6 @@ int channel_sync_syncpt_gen_wait_cmd(struct channel_gk20a *c,
 			err = gk20a_channel_alloc_priv_cmdbuf(c,
 				c->g->ops.fifo.get_syncpt_wait_cmd_size(), wait_cmd);
 			if (err != 0) {
-				nvgpu_err(c->g, "not enough priv cmd buffer space");
 				return err;
 			}
 		}
@@ -464,8 +463,6 @@ static int channel_sync_semaphore_incr_common(
 	incr_cmd_size = c->g->ops.fifo.get_sema_incr_cmd_size();
 	err = gk20a_channel_alloc_priv_cmdbuf(c, incr_cmd_size, incr_cmd);
 	if (err) {
-		nvgpu_err(c->g,
-				"not enough priv cmd buffer space");
 		goto clean_up_sema;
 	}
 
diff --git a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c
index ec3de12b..eb60600d 100644
--- a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c
+++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c
@@ -55,7 +55,6 @@ int nvgpu_os_fence_sema_wait_gen_cmd(struct nvgpu_os_fence *s,
 		wait_cmd_size * num_wait_cmds,
 		wait_cmd);
 	if (err) {
-		nvgpu_err(c->g, "not enough priv cmd buffer space");
 		return err;
 	}
 
diff --git a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c
index 30655967..368a03c5 100644
--- a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c
+++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c
@@ -65,8 +65,6 @@ int nvgpu_os_fence_syncpt_wait_gen_cmd(struct nvgpu_os_fence *s,
 	err = gk20a_channel_alloc_priv_cmdbuf(c,
 		wait_cmd_size * num_wait_cmds, wait_cmd);
 	if (err) {
-		nvgpu_err(c->g,
-			"not enough priv cmd buffer space");
 		return err;
 	}
 
-- 
cgit v1.2.2