drm/amd/display: really fix time out in init sequence
authorTony Cheng <tony.cheng@amd.com>
Wed, 22 Nov 2017 16:51:30 +0000 (11:51 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Dec 2017 15:55:09 +0000 (10:55 -0500)
REG_UPDATE_2 return the reg value it write out through MMIO
we need to do a REG_READ to confirm the value is written out

Signed-off-by: Tony Cheng <tony.cheng@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@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/dcn10/dcn10_hubp.c

index 1984ac2eb740ddfee1cdce78f3dfcd8720458ee0..2d843b2d5f86ccdcbaa7fb5972477dfeacdbee8b 100644 (file)
@@ -42,13 +42,14 @@ void hubp1_set_blank(struct hubp *hubp, bool blank)
 {
        struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
        uint32_t blank_en = blank ? 1 : 0;
-       uint32_t reg_val = 0;
 
-       reg_val = REG_UPDATE_2(DCHUBP_CNTL,
+       REG_UPDATE_2(DCHUBP_CNTL,
                        HUBP_BLANK_EN, blank_en,
                        HUBP_TTU_DISABLE, blank_en);
 
        if (blank) {
+               uint32_t reg_val = REG_READ(DCHUBP_CNTL);
+
                if (reg_val) {
                        /* init sequence workaround: in case HUBP is
                         * power gated, this wait would timeout.