drm/amd/display: try to find matching audio inst for enc inst first
authorCharlene Liu <[email protected]>
Wed, 15 Nov 2017 23:55:57 +0000 (18:55 -0500)
committerAlex Deucher <[email protected]>
Thu, 14 Dec 2017 15:51:29 +0000 (10:51 -0500)
[Description]
in eDP+ HDMI/DP clone or extended configuration, audio inst changed from inst 1 to inst0.
No failure related this though, just playback device endpoint inst changed.
Also  remove one addition register read.

Signed-off-by: Charlene Liu <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c

index 327a0a76266b00594cb693742a879e6672ef77a6..83bae207371d9a74c68194ce7e929724370bafb3 100644 (file)
@@ -87,10 +87,8 @@ 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*/
-       if (regval != 1)
-               REG_UPDATE(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, 1);
+       REG_UPDATE(AFMT_CNTL, AFMT_AUDIO_CLOCK_EN, 1);
 
        if (REG(AFMT_VBI_PACKET_CONTROL1)) {
                if (packet_index >= 8)