[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250610092737.2641862-1-arnd@kernel.org>
Date: Tue, 10 Jun 2025 11:27:33 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>,
Nathan Chancellor <nathan@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
"Dr. David Alan Gilbert" <linux@...blig.org>,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: [PATCH] drm: omapdrm: reduce clang stack usage
From: Arnd Bergmann <arnd@...db.de>
The thread sanitizer makes the stack usage explode from extra variable
spills in dispc_runtime_resume:
drivers/gpu/drm/omapdrm/dss/dispc.c:4735:27: error: stack frame size (1824) exceeds limit (1280) in 'dispc_runtime_resume' [-Werror,-Wframe-larger-than]
I could not figure out what exactly is going on here, but I see that
whenever dispc_restore_context() is not inlined, that function
and its caller shrink below 900 bytes combined of stack usage.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 533f70e8a4a6..cf055815077c 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -524,7 +524,7 @@ static void dispc_save_context(struct dispc_device *dispc)
DSSDBG("context saved\n");
}
-static void dispc_restore_context(struct dispc_device *dispc)
+static noinline_for_stack void dispc_restore_context(struct dispc_device *dispc)
{
int i, j;
--
2.39.5
Powered by blists - more mailing lists