mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/amd/display: Implementing ramless idle mouse trigger
[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>
This commit is contained in:
parent
c6e2639cdc
commit
63b7f58265
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user