Skip to content

Commit 7329417

Browse files
nehebalexdeucher
authored andcommitted
drm/amd/display: shrink struct members
On a 32-bit ARM system, the audio_decoder struct ends up being too large for dp_retrain_link_dp_test. link_dp_cts.c:157:1: error: the frame size of 1328 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] This is mitigated by shrinking the members of the struct and avoids having to deal with dynamic allocation. feed_back_divider is assigned but otherwise unused. Remove both. pixel_repetition looks like it should be a bool since it's only ever assigned to 1. But there are checks for 2 and 4. Reduce to uint8_t. Remove ss_percentage_divider. Unused. Shrink refresh_rate as it gets assigned to at most a 3 digit integer value. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 3849efd)
1 parent 8fc2796 commit 7329417

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,9 +1484,6 @@ void build_audio_output(
14841484
state->clk_mgr);
14851485
}
14861486

1487-
audio_output->pll_info.feed_back_divider =
1488-
pipe_ctx->pll_settings.feedback_divider;
1489-
14901487
audio_output->pll_info.dto_source =
14911488
translate_to_dto_source(
14921489
pipe_ctx->stream_res.tg->inst + 1);

drivers/gpu/drm/amd/display/include/audio_types.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ struct audio_crtc_info {
4747
uint32_t h_total;
4848
uint32_t h_active;
4949
uint32_t v_active;
50-
uint32_t pixel_repetition;
5150
uint32_t requested_pixel_clock_100Hz; /* in 100Hz */
5251
uint32_t calculated_pixel_clock_100Hz; /* in 100Hz */
53-
uint32_t refresh_rate;
52+
uint32_t dsc_bits_per_pixel;
53+
uint32_t dsc_num_slices;
5454
enum dc_color_depth color_depth;
5555
enum dc_pixel_encoding pixel_encoding;
56+
uint16_t refresh_rate;
57+
uint8_t pixel_repetition;
5658
bool interlaced;
57-
uint32_t dsc_bits_per_pixel;
58-
uint32_t dsc_num_slices;
5959
};
6060
struct azalia_clock_info {
6161
uint32_t pixel_clock_in_10khz;
@@ -78,11 +78,9 @@ enum audio_dto_source {
7878

7979
struct audio_pll_info {
8080
uint32_t audio_dto_source_clock_in_khz;
81-
uint32_t feed_back_divider;
81+
uint32_t ss_percentage;
8282
enum audio_dto_source dto_source;
8383
bool ss_enabled;
84-
uint32_t ss_percentage;
85-
uint32_t ss_percentage_divider;
8684
};
8785

8886
struct audio_channel_associate_info {

0 commit comments

Comments
 (0)