]> 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:34:29 +0000 (15:34 -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 426912d82179c097b157245753af025622a3baf6..257d77aa7c97970bf56567227b95cdf95b3b1960 100644 (file)
@@ -3035,6 +3035,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;
 
@@ -3325,7 +3328,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);
 
@@ -4759,6 +4763,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 36f8eb37e6710b4ff3469ed0dfc16e6c6f363947..07473e96042772573e92cb1f7e1e49c1869a5176 100644 (file)
@@ -4156,8 +4156,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 8b9af1a6a03162fd47545258b1246312cefbfd26..1ecf956a7102090b50c3ed7c9b4157c5e1f7f032 100644 (file)
@@ -200,6 +200,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 */
@@ -331,6 +332,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;