[PATCH] udmabuf: vastly increase the size limit per dmabuf

Xaver Hugl <[email protected]> Mon, 3 Aug 2026 16:41:20 +0200
Newsgroups org.freedesktop.lists.dri-devel,org.kernel.vger.stable
Message-ID <[email protected]>
Buffer sizes can get big very fast, and the previous limit of 64MB
is easily hit nowadays.
I hit this problem while working on better multi-gpu copies for KWin,
where on my 5120x1440 monitor with scaling applied, some apps ended
up using a resolution of 8192x2304, resulting in buffer sizes of
roughly 75MB.

As another reference, with merely 32 bits per pixel, buffers reach
- 33MB for 4k
- 133MB for 8k
- 530MB for 16k

With 64bpp, those sizes would be doubled, and even 4k would hit the
previous 64MB limit.

Signed-off-by: Xaver Hugl <[email protected]>
Cc: [email protected]
---
 drivers/dma-buf/udmabuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 2f94be1df525..8cbba7ddfa00 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -20,9 +20,9 @@ static int list_limit = 1024;
 module_param(list_limit, int, 0644);
 MODULE_PARM_DESC(list_limit, "udmabuf_create_list->count limit. Default is 1024.");
 
-static int size_limit_mb = 64;
+static int size_limit_mb = 1024;
 module_param(size_limit_mb, int, 0644);
-MODULE_PARM_DESC(size_limit_mb, "Max size of a dmabuf, in megabytes. Default is 64.");
+MODULE_PARM_DESC(size_limit_mb, "Max size of a dmabuf, in megabytes. Default is 1024.");
 
 struct udmabuf {
 	pgoff_t pagecount;
-- 
2.55.0