]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:29 +0000 (15:37 -0500)
[ Upstream commit c8bedab2d9a1a0daa49ac20f9928a943f7205582 ]

[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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 74efd50b7c23ade2606835272b88d3e8ad24d98e..77a842cf84e085ef5c326fb21faf9ad03685c201 100644 (file)
@@ -3307,6 +3307,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;
 
@@ -3601,7 +3604,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);
 
@@ -5073,6 +5077,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 d712548b1927d02634692a3bab8d128e074a03bf..d37fc14e27dbfd72a57a7d2d66da915ed9b58ea4 100644 (file)
@@ -4417,8 +4417,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;