drm/amd/display: Reduce stack size
Linux kernel enabled more compilation restrictions related to the stack size, which caused compilation failures in our code. This commit reduces the allocation size by allocating the required memory dynamically. Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Acked-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
5e8a71cf13
commit
6bf528ec91
@@ -2056,7 +2056,7 @@ static int dcn10_align_pixel_clocks(struct dc *dc, int group_size,
|
||||
{
|
||||
struct dc_context *dc_ctx = dc->ctx;
|
||||
int i, master = -1, embedded = -1;
|
||||
struct dc_crtc_timing hw_crtc_timing[MAX_PIPES] = {0};
|
||||
struct dc_crtc_timing *hw_crtc_timing;
|
||||
uint64_t phase[MAX_PIPES];
|
||||
uint64_t modulo[MAX_PIPES];
|
||||
unsigned int pclk;
|
||||
@@ -2067,6 +2067,10 @@ static int dcn10_align_pixel_clocks(struct dc *dc, int group_size,
|
||||
uint32_t dp_ref_clk_100hz =
|
||||
dc->res_pool->dp_clock_source->ctx->dc->clk_mgr->dprefclk_khz*10;
|
||||
|
||||
hw_crtc_timing = kcalloc(MAX_PIPES, sizeof(*hw_crtc_timing), GFP_KERNEL);
|
||||
if (!hw_crtc_timing)
|
||||
return master;
|
||||
|
||||
if (dc->config.vblank_alignment_dto_params &&
|
||||
dc->res_pool->dp_clock_source->funcs->override_dp_pix_clk) {
|
||||
embedded_h_total =
|
||||
@@ -2130,6 +2134,8 @@ static int dcn10_align_pixel_clocks(struct dc *dc, int group_size,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
kfree(hw_crtc_timing);
|
||||
return master;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user