Commit c8bedab2 authored by Karthi Kandasamy's avatar Karthi Kandasamy Committed by Alex Deucher
Browse files

drm/amd/display: Add AVI infoframe copy in copy_stream_update_to_stream



[WHY]
Ensure AVI infoframe updates from stream updates are applied to the active
stream so OS overrides are not lost.

[HOW]
Copy avi_infopacket to stream when valid flag is set.
Follow existing infopacket copy pattern and perform a basic validity check before assignment.

Reviewed-by: default avatarAric Cyr <aric.cyr@amd.com>
Signed-off-by: default avatarKarthi Kandasamy <karthi.kandasamy@amd.com>
Signed-off-by: default avatarIvan Lipski <ivan.lipski@amd.com>
Tested-by: default avatarDan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 54980f3c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3313,6 +3313,9 @@ static void copy_stream_update_to_stream(struct dc *dc,
	if (update->adaptive_sync_infopacket)
		stream->adaptive_sync_infopacket = *update->adaptive_sync_infopacket;

	if (update->avi_infopacket)
		stream->avi_infopacket = *update->avi_infopacket;

	if (update->dither_option)
		stream->dither_option = *update->dither_option;

@@ -3607,7 +3610,8 @@ static void commit_planes_do_stream_update(struct dc *dc,
					stream_update->vsp_infopacket ||
					stream_update->hfvsif_infopacket ||
					stream_update->adaptive_sync_infopacket ||
					stream_update->vtem_infopacket) {
					stream_update->vtem_infopacket ||
					stream_update->avi_infopacket) {
				resource_build_info_frame(pipe_ctx);
				dc->hwss.update_info_frame(pipe_ctx);

@@ -5079,6 +5083,7 @@ static bool full_update_required(struct dc *dc,
			stream_update->hfvsif_infopacket ||
			stream_update->vtem_infopacket ||
			stream_update->adaptive_sync_infopacket ||
			stream_update->avi_infopacket ||
			stream_update->dpms_off ||
			stream_update->allow_freesync ||
			stream_update->vrr_active_variable ||
+6 −0
Original line number Diff line number Diff line
@@ -4410,8 +4410,14 @@ static void set_avi_info_frame(
	unsigned int fr_ind = pipe_ctx->stream->timing.fr_index;
	enum dc_timing_3d_format format;

	if (stream->avi_infopacket.valid) {
		*info_packet = stream->avi_infopacket;
		return;
	}

	memset(&hdmi_info, 0, sizeof(union hdmi_info_packet));


	color_space = pipe_ctx->stream->output_color_space;
	if (color_space == COLOR_SPACE_UNKNOWN)
		color_space = (stream->timing.pixel_encoding == PIXEL_ENCODING_RGB) ?
+3 −0
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ struct dc_stream_state {
	struct dc_info_packet hfvsif_infopacket;
	struct dc_info_packet vtem_infopacket;
	struct dc_info_packet adaptive_sync_infopacket;
	struct dc_info_packet avi_infopacket;
	uint8_t dsc_packed_pps[128];
	struct rect src; /* composition area */
	struct rect dst; /* stream addressable area */
@@ -335,6 +336,8 @@ struct dc_stream_update {
	struct dc_info_packet *hfvsif_infopacket;
	struct dc_info_packet *vtem_infopacket;
	struct dc_info_packet *adaptive_sync_infopacket;
	struct dc_info_packet *avi_infopacket;

	bool *dpms_off;
	bool integer_scaling_update;
	bool *allow_freesync;