From 386aa2f0393b0a9333d26bd1fe650b1366a47d5e Mon Sep 17 00:00:00 2001 From: Mikko Perttunen Date: Tue, 12 Dec 2023 10:12:27 +0200 Subject: [PATCH] gpu: host1x: Increase pushbuffer slots to 1023 To avoid CDMA waiting when many jobs are queued, double pushbuffer size. Bug 4386806 Signed-off-by: Mikko Perttunen Change-Id: I80841fdec96ba3c203c070bcc1f5c7fd1c3a7cbc Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032829 (cherry picked from commit 281f74c3235262261f5b4029fbfd71bb6dce983b) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152866 GVS: buildbot_gerritrpt Reviewed-by: Santosh BS --- drivers/gpu/host1x/cdma.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c index b2583102..da8b09d6 100644 --- a/drivers/gpu/host1x/cdma.c +++ b/drivers/gpu/host1x/cdma.c @@ -35,14 +35,14 @@ /* * Typically the commands written into the push buffer are a pair of words. We * use slots to represent each of these pairs and to simplify things. Note the - * strange number of slots allocated here. 512 slots will fit exactly within a - * single memory page. We also need one additional word at the end of the push + * strange number of slots allocated here. 1024 slots will fit exactly within a + * two memory pages. We also need one additional word at the end of the push * buffer for the RESTART opcode that will instruct the CDMA to jump back to - * the beginning of the push buffer. With 512 slots, this means that we'll use - * 2 memory pages and waste 4092 bytes of the second page that will never be + * the beginning of the push buffer. With 1024 slots, this means that we'll use + * 3 memory pages and waste 4092 bytes of the third page that will never be * used. */ -#define HOST1X_PUSHBUFFER_SLOTS 511 +#define HOST1X_PUSHBUFFER_SLOTS 1023 /* * Clean up push buffer resources