drm/amd/display: Add debug option for exiting idle optimizations on cursor updates
authorAlvin Lee <Alvin.Lee2@amd.com>
Fri, 3 Jun 2022 20:39:48 +0000 (16:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 15 Jun 2022 01:38:40 +0000 (21:38 -0400)
[Description]
- Have option to exit idle opt on cursor updates
for debug and optimizations purposes

Reviewed-by: Samson Tam <Samson.Tam@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alvin Lee <Alvin.Lee2@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/core/dc_stream.c
drivers/gpu/drm/amd/display/dc/dc.h

index de8b214132a29d354e0d1b0f1d63a7f2416a76d0..167bb331087762297f05398560c134afb3042095 100644 (file)
@@ -389,7 +389,7 @@ bool dc_stream_set_cursor_position(
        struct dc_stream_state *stream,
        const struct dc_cursor_position *position)
 {
-       struct dc  *dc;
+       struct dc  *dc = stream->ctx->dc;
        bool reset_idle_optimizations = false;
 
        if (NULL == stream) {
@@ -406,7 +406,8 @@ bool dc_stream_set_cursor_position(
        dc_z10_restore(dc);
 
        /* disable idle optimizations if enabling cursor */
-       if (dc->idle_optimizations_allowed && !stream->cursor_position.enable && position->enable) {
+       if (dc->idle_optimizations_allowed && (!stream->cursor_position.enable || dc->debug.exit_idle_opt_for_cursor_updates)
+                       && position->enable) {
                dc_allow_idle_optimizations(dc, false);
                reset_idle_optimizations = true;
        }
index 76db013aac6e00da8eb06c6ed2a37b3c8e170e46..7191fc48c2e70239c26c717be231e8fddcd00408 100644 (file)
@@ -748,6 +748,7 @@ struct dc_debug_options {
        uint8_t psr_power_use_phy_fsm;
        enum dml_hostvm_override_opts dml_hostvm_override;
        bool use_legacy_soc_bb_mechanism;
+       bool exit_idle_opt_for_cursor_updates;
 };
 
 struct gpu_info_soc_bounding_box_v1_0;