public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/dumb-buffers: Increase size limits to match current devices
@ 2026-06-02  7:30 Thomas Zimmermann
  2026-06-02 10:37 ` Saarinen, Jani
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2026-06-02  7:30 UTC (permalink / raw)
  To: rajat.gupta, jani.nikula, jani.saarinen, simona, airlied, mripard,
	maarten.lankhorst
  Cc: dri-devel, intel-gfx, intel-xe, Thomas Zimmermann

Increase the limits for dumb-buffer arguments to sizes of 16384x16384
at 64 bpp. Such buffer sizes are still within 32-bit unsigned limits.
Fixes CI and high-end devices.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 5ab62dd3687b ("drm: prevent integer overflows in dumb buffer creation helpers")
Reported-by: Jani Nikula <jani.nikula@linux.intel.com>
Closes: https://lore.kernel.org/dri-devel/ddf0233e50044059c85279f928661563ef6a55bf@intel.com/
Cc: Rajat Gupta <rajat.gupta@oss.qualcomm.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
---
 drivers/gpu/drm/drm_dumb_buffers.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c
index e60130b2bb0c..9c4cfb3210aa 100644
--- a/drivers/gpu/drm/drm_dumb_buffers.c
+++ b/drivers/gpu/drm/drm_dumb_buffers.c
@@ -201,11 +201,12 @@ int drm_mode_create_dumb(struct drm_device *dev,
 	if (!args->width || !args->height || !args->bpp)
 		return -EINVAL;
 
-	/* Reject unreasonable inputs early.  Dumb buffers are for software
-	 * rendering; nothing legitimate needs more than 8192x8192 at 32bpp.
-	 * This prevents overflows in downstream alignment helpers.
+	/*
+	 * Reject unreasonable inputs early. Dumb buffers are for software
+	 * rendering; nothing legitimate needs more than 16384x16384 at
+	 * 64 bpp. This prevents overflows in downstream alignment helpers.
 	 */
-	if (args->width >= 8192 || args->height >= 8192 || args->bpp > 32)
+	if (args->width > 16384 || args->height > 16384 || args->bpp > 64)
 		return -EINVAL;
 
 	/* overflow checks for 32bit size calculations */

base-commit: a980196655477a8f5067112946401fe52e510664
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-04  3:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02  7:30 [PATCH] drm/dumb-buffers: Increase size limits to match current devices Thomas Zimmermann
2026-06-02 10:37 ` Saarinen, Jani
2026-06-02 10:53   ` Jani Nikula
2026-06-02 11:23     ` Thomas Zimmermann
2026-06-04  3:08 ` Claude review: " Claude Code Review Bot
2026-06-04  3:08 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox