Commit 7329417f authored by Rosen Penev's avatar Rosen Penev Committed by Alex Deucher
Browse files

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: default avatarRosen Penev <rosenp@gmail.com>
Reviewed-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 3849efdc)
parent 8fc2796d
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1484,9 +1484,6 @@ void build_audio_output(
						state->clk_mgr);
	}

	audio_output->pll_info.feed_back_divider =
			pipe_ctx->pll_settings.feedback_divider;

	audio_output->pll_info.dto_source =
		translate_to_dto_source(
			pipe_ctx->stream_res.tg->inst + 1);
+5 −7
Original line number Diff line number Diff line
@@ -47,15 +47,15 @@ struct audio_crtc_info {
	uint32_t h_total;
	uint32_t h_active;
	uint32_t v_active;
	uint32_t pixel_repetition;
	uint32_t requested_pixel_clock_100Hz; /* in 100Hz */
	uint32_t calculated_pixel_clock_100Hz; /* in 100Hz */
	uint32_t refresh_rate;
	uint32_t dsc_bits_per_pixel;
	uint32_t dsc_num_slices;
	enum dc_color_depth color_depth;
	enum dc_pixel_encoding pixel_encoding;
	uint16_t refresh_rate;
	uint8_t pixel_repetition;
	bool interlaced;
	uint32_t dsc_bits_per_pixel;
	uint32_t dsc_num_slices;
};
struct azalia_clock_info {
	uint32_t pixel_clock_in_10khz;
@@ -78,11 +78,9 @@ enum audio_dto_source {

struct audio_pll_info {
	uint32_t audio_dto_source_clock_in_khz;
	uint32_t feed_back_divider;
	uint32_t ss_percentage;
	enum audio_dto_source dto_source;
	bool ss_enabled;
	uint32_t ss_percentage;
	uint32_t ss_percentage_divider;
};

struct audio_channel_associate_info {