]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amd/display: Add AVI infoframe copy in copy_stream_update_to_stream
authorKarthi Kandasamy <karthi.kandasamy@amd.com>
Wed, 3 Sep 2025 12:16:27 +0000 (14:16 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 23 Sep 2025 14:26:33 +0000 (10:26 -0400)
[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: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Karthi Kandasamy <karthi.kandasamy@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc_stream.h

index c4dd52ed377d9a28431e7ff187febc7a02b49f46..974d63af1c707622e347f385f5bbd57dde4f6ea8 100644 (file)
@@ -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 ||
index cbca3c67f439a51bba75c03fa50451f0b52166d2..bc5dedf5f60c30a5d1d1e5ca6a68fc7ed79478e8 100644 (file)
@@ -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) ?
index 5fc6fea211de3bcc75c38a54de05440806d4d486..76cf9fdedab0ea4644c6057d70afa8f8db5db78f 100644 (file)
@@ -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;