linux/drivers/gpu/drm/amd/display
Arnd Bergmann 88c61827ce drm/amd/display: dynamically allocate dml2_configuration_options structures
This structure is too large to fit on a stack, as shown by the
newly introduced warnings from a recent code change:

drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c: In function 'dcn32_update_bw_bounding_box':
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn32/dcn32_resource.c:2019:1: error: the frame size of 1180 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn321/dcn321_resource.c: In function 'dcn321_update_bw_bounding_box':
drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn321/dcn321_resource.c:1597:1: error: the frame size of 1180 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c: In function 'dc_state_create':
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:219:1: error: the frame size of 1184 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Instead of open-coding the assignment of a large structure to a stack
variable, use an explicit kmemdup() in each case to move it off the stack.

Fixes: e779f4587f ("drm/amd/display: Add handling for DC power mode")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2024-05-29 14:48:31 -04:00
..
amdgpu_dm drm/amd/display: Enable copying of bounding box data from VBIOS DMUB 2024-05-29 14:40:40 -04:00
dc drm/amd/display: dynamically allocate dml2_configuration_options structures 2024-05-29 14:48:31 -04:00
dmub drm/amd/display: Add new GPINT command definitions 2024-05-29 14:40:40 -04:00
include drm/amd/display: Refactor dcn401_update_clocks 2024-05-13 15:47:46 -04:00
modules drm/amd/display: Add array index check for hdcp ddc access 2024-05-02 16:18:17 -04:00
Kconfig drm/amd/display: Fix invalid Copyright notice 2024-05-02 16:18:16 -04:00
Makefile drm/amd/display: Refactor HUBP into component folder. 2024-05-08 15:17:03 -04:00