]> git.dujemihanovic.xyz Git - linux.git/commit
drm/amd/display: Reduce stack size by splitting function
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Mon, 16 Oct 2023 14:19:17 +0000 (08:19 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 20 Oct 2023 19:11:29 +0000 (15:11 -0400)
commitb141fa036c901303ca5659cc22e9c08f8b097892
treee85bfae83a7ad30ae9de7373f36029773399d7c8
parent7ef6b2d4b7e5c0d105c688a4da1f0ac122e3aa44
drm/amd/display: Reduce stack size by splitting function

When compiling with allmodconfig, gcc highlights the following error:

drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c: In function 'dml_core_mode_support':
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/display_mode_core.c:8229:1: error: the frame size of 2736 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
 8229 | } // dml_core_mode_support
      | ^
cc1: all warnings being treated as errors

This commit mitigates part of this problem by extracting the prefetch
code to its own function. After applying this commit, the stack size
reduces from 2736 to 2464, however, the stack size issue becomes part of
the new function.

Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Chaitanya Dhere <chaitanya.dhere@amd.com>
Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2")
Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c