drm/amd/display: Update idle optimization handling
[How] - use dc interface instead of hwss interface in cursor functions, to keep dc->idle_optimizations_allowed updated - add dc interface to check if idle optimizations might apply to a plane Signed-off-by: Joshua Aberback <joshua.aberback@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
0825d9658b
commit
4b675aad96
@ -3039,4 +3039,10 @@ void dc_lock_memory_clock_frequency(struct dc *dc)
|
||||
if (dc->current_state->res_ctx.pipe_ctx[i].plane_state)
|
||||
core_link_enable_stream(dc->current_state, &dc->current_state->res_ctx.pipe_ctx[i]);
|
||||
}
|
||||
|
||||
bool dc_is_plane_eligible_for_idle_optimizaitons(struct dc *dc,
|
||||
struct dc_plane_state *plane)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -298,7 +298,7 @@ bool dc_stream_set_cursor_attributes(
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
|
||||
/* disable idle optimizations while updating cursor */
|
||||
if (dc->idle_optimizations_allowed) {
|
||||
dc->hwss.apply_idle_power_optimizations(dc, false);
|
||||
dc_allow_idle_optimizations(dc, false);
|
||||
reset_idle_optimizations = true;
|
||||
}
|
||||
|
||||
@ -326,7 +326,7 @@ bool dc_stream_set_cursor_attributes(
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
|
||||
/* re-enable idle optimizations if necessary */
|
||||
if (reset_idle_optimizations)
|
||||
dc->hwss.apply_idle_power_optimizations(dc, true);
|
||||
dc_allow_idle_optimizations(dc, true);
|
||||
|
||||
#endif
|
||||
return true;
|
||||
@ -359,9 +359,8 @@ bool dc_stream_set_cursor_position(
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
|
||||
|
||||
/* disable idle optimizations if enabling cursor */
|
||||
if (dc->idle_optimizations_allowed &&
|
||||
!stream->cursor_position.enable && position->enable) {
|
||||
dc->hwss.apply_idle_power_optimizations(dc, false);
|
||||
if (dc->idle_optimizations_allowed && !stream->cursor_position.enable && position->enable) {
|
||||
dc_allow_idle_optimizations(dc, false);
|
||||
reset_idle_optimizations = true;
|
||||
}
|
||||
|
||||
@ -392,7 +391,7 @@ bool dc_stream_set_cursor_position(
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
|
||||
/* re-enable idle optimizations if necessary */
|
||||
if (reset_idle_optimizations)
|
||||
dc->hwss.apply_idle_power_optimizations(dc, true);
|
||||
dc_allow_idle_optimizations(dc, true);
|
||||
|
||||
#endif
|
||||
return true;
|
||||
|
@ -1250,6 +1250,9 @@ enum dc_status dc_set_clock(struct dc *dc, enum dc_clock_type clock_type, uint32
|
||||
void dc_get_clock(struct dc *dc, enum dc_clock_type clock_type, struct dc_clock_config *clock_cfg);
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
|
||||
|
||||
bool dc_is_plane_eligible_for_idle_optimizations(struct dc *dc,
|
||||
struct dc_plane_state *plane);
|
||||
|
||||
void dc_allow_idle_optimizations(struct dc *dc, bool allow);
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user