• Arnd Bergmann's avatar
    drm/amd/pm: avoid large variable on kernel stack · 76a95b83
    Arnd Bergmann authored
    The activity_monitor_external[] array is too big to fit on the
    kernel stack, resulting in this warning with clang:
    
    drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1438:12: error: stack frame size (1040) exceeds limit (1024) in 'smu_v13_0_7_get_power_profile_mode' [-Werror,-Wframe-larger-than]
    
    Use dynamic allocation instead. It should also be possible to
    have single element here instead of the array, but this seems
    easier.
    
    v2: fix up argument to sizeof() (Alex)
    
    Fixes: 334682ae ("drm/amd/pm: enable workload type change on smu_v13_0_7")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    76a95b83
smu_v13_0_7_ppt.c 55.3 KB