drm/amd/display: Fix wrong index bug in set_avi_info_frame
authorHarry Wentland <harry.wentland@amd.com>
Wed, 4 Jan 2017 23:54:29 +0000 (18:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:08:44 +0000 (17:08 -0400)
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c

index 3e33795..80fe6b9 100644 (file)
@@ -1490,9 +1490,10 @@ static void set_avi_info_frame(
        info_packet->hb2 =
                info_frame.avi_info_packet.info_packet_hdmi.packet_raw_data.hb2;
 
-       for (byte_index = 0; byte_index < sizeof(info_packet->sb); byte_index++)
+       for (byte_index = 0; byte_index < sizeof(info_frame.avi_info_packet.
+                               info_packet_hdmi.packet_raw_data.sb); byte_index++)
                info_packet->sb[byte_index] = info_frame.avi_info_packet.
-               info_packet_hdmi.packet_raw_data.sb[byte_index];
+                               info_packet_hdmi.packet_raw_data.sb[byte_index];
 
        info_packet->valid = true;
 }