drm/radeon: fix ordering of AVI packet setup
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Mar 2015 14:33:05 +0000 (10:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Apr 2015 13:54:52 +0000 (09:54 -0400)
Set the line first, then enable the stream.  May fix
pink line problems on some displays.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/evergreen_hdmi.c
drivers/gpu/drm/radeon/r600_hdmi.c

index c18d4ecbd95d02baa907d4d15b6da43f282f4e67..237997949a7c8984e5a739c635c0e66cccbe6e22 100644 (file)
@@ -219,13 +219,13 @@ void evergreen_set_avi_packet(struct radeon_device *rdev, u32 offset,
        WREG32(AFMT_AVI_INFO3 + offset,
                frame[0xC] | (frame[0xD] << 8) | (buffer[1] << 24));
 
-       WREG32_OR(HDMI_INFOFRAME_CONTROL0 + offset,
-               HDMI_AVI_INFO_SEND |    /* enable AVI info frames */
-               HDMI_AVI_INFO_CONT);    /* required for audio info values to be updated */
-
        WREG32_P(HDMI_INFOFRAME_CONTROL1 + offset,
-               HDMI_AVI_INFO_LINE(2),  /* anything other than 0 */
-               ~HDMI_AVI_INFO_LINE_MASK);
+                HDMI_AVI_INFO_LINE(2), /* anything other than 0 */
+                ~HDMI_AVI_INFO_LINE_MASK);
+
+       WREG32_OR(HDMI_INFOFRAME_CONTROL0 + offset,
+                 HDMI_AVI_INFO_SEND |  /* enable AVI info frames */
+                 HDMI_AVI_INFO_CONT);  /* required for audio info values to be updated */
 }
 
 void dce4_hdmi_audio_set_dto(struct radeon_device *rdev,
index dd6606b8e23ca9a3bfd3f7be414b17d01af2aacb..e85894ade95c44ab61d73f58f6452efb01bee0da 100644 (file)
@@ -228,12 +228,13 @@ void r600_set_avi_packet(struct radeon_device *rdev, u32 offset,
        WREG32(HDMI0_AVI_INFO3 + offset,
                frame[0xC] | (frame[0xD] << 8) | (buffer[1] << 24));
 
+       WREG32_OR(HDMI0_INFOFRAME_CONTROL1 + offset,
+                 HDMI0_AVI_INFO_LINE(2));      /* anything other than 0 */
+
        WREG32_OR(HDMI0_INFOFRAME_CONTROL0 + offset,
-               HDMI0_AVI_INFO_SEND |   /* enable AVI info frames */
-               HDMI0_AVI_INFO_CONT);   /* send AVI info frames every frame/field */
+                 HDMI0_AVI_INFO_SEND | /* enable AVI info frames */
+                 HDMI0_AVI_INFO_CONT); /* send AVI info frames every frame/field */
 
-       WREG32_OR(HDMI0_INFOFRAME_CONTROL1 + offset,
-               HDMI0_AVI_INFO_LINE(2));        /* anything other than 0 */
 }
 
 /*