drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calc_auto.c:121:6: warning: stack frame size (3296) exceeds limit (2048) in function 'mode_support_and_system_configuration'

From: kernel test robot
Date: Sat Jun 26 2021 - 19:36:13 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 625acffd7ae2c52898d249e6c5c39f348db0d8df
commit: d0a3ac549f389c1511a4df0d7638536305205d20 ubsan: enable for all*config builds
date: 6 months ago
config: powerpc-randconfig-r012-20210627 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 557b101ce714e39438ba1d39c4c50b03e12fcb96)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d0a3ac549f389c1511a4df0d7638536305205d20
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d0a3ac549f389c1511a4df0d7638536305205d20
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calc_auto.c:26:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:29:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:30:
In file included from include/linux/kgdb.h:18:
In file included from include/linux/atomic.h:7:
In file included from arch/powerpc/include/asm/atomic.h:11:
In file included from arch/powerpc/include/asm/cmpxchg.h:8:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:11:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:309:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calc_auto.c:121:6: warning: stack frame size (3296) exceeds limit (2048) in function 'mode_support_and_system_configuration' [-Wframe-larger-than]
void mode_support_and_system_configuration(struct dcn_bw_internal_vars *v)
^
2 warnings generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:27:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:29:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:32:
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/os_types.h:30:
In file included from include/linux/kgdb.h:18:
In file included from include/linux/atomic.h:7:
In file included from arch/powerpc/include/asm/atomic.h:11:
In file included from arch/powerpc/include/asm/cmpxchg.h:8:
In file included from include/linux/bug.h:5:
In file included from arch/powerpc/include/asm/bug.h:109:
In file included from include/asm-generic/bug.h:20:
In file included from include/linux/kernel.h:11:
In file included from include/linux/bitops.h:32:
In file included from arch/powerpc/include/asm/bitops.h:62:
arch/powerpc/include/asm/barrier.h:49:9: warning: '__lwsync' macro redefined [-Wmacro-redefined]
#define __lwsync() __asm__ __volatile__ (stringify_in_c(LWSYNC) : : :"memory")
^
<built-in>:309:9: note: previous definition is here
#define __lwsync __builtin_ppc_lwsync
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3052:10: warning: variable 'MaxUsedBW' set but not used [-Wunused-but-set-variable]
double MaxUsedBW = 0;
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:1917:13: warning: stack frame size (4416) exceeds limit (2048) in function 'DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation' [-Wframe-larger-than]
static void DISPCLKDPPCLKDCFCLKDeepSleepPrefetchParametersWatermarksAndPerformanceCalculation(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3641:6: warning: stack frame size (4816) exceeds limit (2048) in function 'dml30_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than]
void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib)
^
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:6679:13: warning: stack frame size (2112) exceeds limit (2048) in function 'UseMinimumDCFCLK' [-Wframe-larger-than]
static void UseMinimumDCFCLK(
^
5 warnings generated.


vim +/mode_support_and_system_configuration +121 drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calc_auto.c

5634fb6078dd9b Dmytro Laktyushkin 2017-06-15 120
74c49c7ac14f3a Harry Wentland 2017-05-08 @121 void mode_support_and_system_configuration(struct dcn_bw_internal_vars *v)

:::::: The code at line 121 was first introduced by commit
:::::: 74c49c7ac14f3a7cc500be959709f3473a6a49e7 drm/amdgpu/display: Add calcs code for DCN

:::::: TO: Harry Wentland <harry.wentland@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip