drm/amd/display: fix seq issue: turn on clock before programming afmt.
authorCharlene Liu <charlene.liu@amd.com>
Wed, 15 Nov 2017 23:27:31 +0000 (18:27 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Dec 2017 15:51:23 +0000 (10:51 -0500)
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@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/dce/dce_stream_encoder.c

index 83bae207371d9a74c68194ce7e929724370bafb3..327a0a76266b00594cb693742a879e6672ef77a6 100644 (file)
@@ -87,8 +87,10 @@ static void dce110_update_generic_info_packet(
         */
        uint32_t max_retries = 50;
 
+       REG_GET(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, &regval);
        /*we need turn on clock before programming AFMT block*/
-       REG_UPDATE(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, 1);
+       if (regval != 1)
+               REG_UPDATE(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, 1);
 
        if (REG(AFMT_VBI_PACKET_CONTROL1)) {
                if (packet_index >= 8)