drm/amd/display: Implementing ramless idle mouse trigger
authorMuaaz Nisar <muaaz.nisar@amd.com>
Wed, 4 Feb 2026 08:08:01 +0000 (03:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 19 Feb 2026 17:16:10 +0000 (12:16 -0500)
[Why & How]
Adding mouse trigger in dc_stream to
recover from low refresh rate idle state
upon mouse movement without vsync interrupts.

Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Muaaz Nisar <muaaz.nisar@amd.com>
Signed-off-by: Ray Wu <ray.wu@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.c
drivers/gpu/drm/amd/display/dc/core/dc_stream.c
drivers/gpu/drm/amd/display/dc/dc_stream.h

index 17ba7af..6f3c283 100644 (file)
@@ -3369,6 +3369,10 @@ static void copy_stream_update_to_stream(struct dc *dc,
                stream->scaler_sharpener_update = *update->scaler_sharpener_update;
        if (update->sharpening_required)
                stream->sharpening_required = *update->sharpening_required;
+
+       if (update->drr_trigger_mode) {
+               stream->drr_trigger_mode = *update->drr_trigger_mode;
+       }
 }
 
 static void backup_planes_and_stream_state(
index 9349ccc..191f643 100644 (file)
@@ -515,6 +515,21 @@ bool dc_stream_program_cursor_position(
                        }
                }
 
+               if (stream->drr_trigger_mode == DRR_TRIGGER_ON_FLIP_AND_CURSOR) {
+                       /* apply manual trigger */
+                       int i;
+
+                       for (i = 0; i < dc->res_pool->pipe_count; i++) {
+                               struct pipe_ctx *pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[i];
+
+                               /* trigger event on first pipe with current stream */
+                               if (stream == pipe_ctx->stream) {
+                                       pipe_ctx->stream_res.tg->funcs->program_manual_trigger(pipe_ctx->stream_res.tg);
+                                       break;
+                               }
+                       }
+               }
+
                return true;
        }
 
index 9960494..8639420 100644 (file)
@@ -183,6 +183,11 @@ struct luminance_data {
        int dm_max_decrease_from_nominal;
 };
 
+enum dc_drr_trigger_mode {
+       DRR_TRIGGER_ON_FLIP = 0,
+       DRR_TRIGGER_ON_FLIP_AND_CURSOR,
+};
+
 struct dc_stream_state {
        // sink is deprecated, new code should not reference
        // this pointer
@@ -316,6 +321,8 @@ struct dc_stream_state {
        bool scaler_sharpener_update;
        bool sharpening_required;
 
+       enum dc_drr_trigger_mode drr_trigger_mode;
+
        struct dc_update_scratch_space *update_scratch;
 };
 
@@ -366,6 +373,8 @@ struct dc_stream_update {
        bool *hw_cursor_req;
        bool *scaler_sharpener_update;
        bool *sharpening_required;
+
+       enum dc_drr_trigger_mode *drr_trigger_mode;
 };
 
 bool dc_is_stream_unchanged(