drm/amd/display: Add Replay supported/enabled checks
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Wed, 28 Jun 2023 15:55:50 +0000 (11:55 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Aug 2023 21:40:31 +0000 (17:40 -0400)
- Add checks for Cursor update and dirty rects (sending updates to dmub)
- Add checks for dc_notify_vsync, and fbc and subvp

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 8504e6e..508d5ea 100644 (file)
@@ -3289,6 +3289,9 @@ static bool dc_dmub_should_send_dirty_rect_cmd(struct dc *dc, struct dc_stream_s
                        && stream->ctx->dce_version >= DCN_VERSION_3_1)
                return true;
 
+       if (stream->link->replay_settings.config.replay_supported)
+               return true;
+
        return false;
 }
 
@@ -5173,6 +5176,9 @@ void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bo
        if (link->psr_settings.psr_feature_enabled)
                return;
 
+       if (link->replay_settings.replay_feature_enabled)
+               return;
+
        /*find primary pipe associated with stream*/
        for (i = 0; i < MAX_PIPES; i++) {
                pipe = &dc->current_state->res_ctx.pipe_ctx[i];
index 8c75f75..530b85a 100644 (file)
@@ -897,6 +897,9 @@ static bool dc_dmub_should_update_cursor_data(struct pipe_ctx *pipe_ctx)
                pipe_ctx->stream->ctx->dce_version >= DCN_VERSION_3_1)
                return true;
 
+       if (pipe_ctx->stream->link->replay_settings.config.replay_supported)
+               return true;
+
        return false;
 }
 
index 5008860..ad967b5 100644 (file)
@@ -1590,6 +1590,7 @@ static enum dc_status apply_single_controller_ctx_to_hw(
         */
        if (pipe_ctx->stream->mall_stream_config.type != SUBVP_PHANTOM) {
                pipe_ctx->stream->link->psr_settings.psr_feature_enabled = false;
+               pipe_ctx->stream->link->replay_settings.replay_feature_enabled = false;
        }
        return DC_OK;
 }
@@ -2021,6 +2022,10 @@ static bool should_enable_fbc(struct dc *dc,
        if (pipe_ctx->stream->link->psr_settings.psr_feature_enabled)
                return false;
 
+       /* Replay should not be enabled */
+       if (pipe_ctx->stream->link->replay_settings.replay_feature_enabled)
+               return false;
+
        /* Nothing to compress */
        if (!pipe_ctx->plane_state)
                return false;