drm/amd/display: fix wrong register access
authorCharlene Liu <Charlene.Liu@amd.com>
Fri, 19 Aug 2022 00:24:26 +0000 (20:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Aug 2022 21:05:09 +0000 (17:05 -0400)
[why]
fw version check was for release branch.
for staging, it has a chance to enter wrong code path.

Reviewed-by: Hansen Dsouza <hansen.dsouza@amd.com>
Acked-by: Brian Chang <Brian.Chang@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn31/dcn31_dio_link_encoder.c
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_dio_stream_encoder.c

index a788d16..ab70ebd 100644 (file)
@@ -104,6 +104,9 @@ static bool has_query_dp_alt(struct link_encoder *enc)
 {
        struct dc_dmub_srv *dc_dmub_srv = enc->ctx->dmub_srv;
 
+       if (enc->ctx->dce_version >= DCN_VERSION_3_15)
+               return true;
+
        /* Supports development firmware and firmware >= 4.0.11 */
        return dc_dmub_srv &&
               !(dc_dmub_srv->dmub->fw_version >= DMUB_FW_VERSION(4, 0, 0) &&
index b384f30..e3351dd 100644 (file)
@@ -317,6 +317,7 @@ static void enc314_stream_encoder_dp_unblank(
        /* switch DP encoder to CRTC data, but reset it the fifo first. It may happen
         * that it overflows during mode transition, and sometimes doesn't recover.
         */
+       REG_UPDATE(DIG_FIFO_CTRL0, DIG_FIFO_READ_START_LEVEL, 0x7);
        REG_UPDATE(DP_STEER_FIFO, DP_STEER_FIFO_RESET, 1);
        udelay(10);