mirror of https://github.com/torvalds/linux.git
drm/amd/display: Add clear DCC and Tiling callback for DCN
Introduce the DCC and Tiling reset callback to all DCN versions that can call it. Reviewed-by: Alvin Lee <alvin.lee2@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Roman Li <roman.li@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
c905aa6856
commit
d27a1e93f2
|
|
@ -291,17 +291,8 @@ void dc_plane_force_dcc_and_tiling_disable(struct dc_plane_state *plane_state,
|
|||
continue;
|
||||
|
||||
if (dc->ctx->dce_version >= DCE_VERSION_MAX) {
|
||||
struct hubp *hubp = pipe_ctx->plane_res.hubp;
|
||||
if (!hubp)
|
||||
continue;
|
||||
/* if framebuffer is tiled, disable tiling */
|
||||
if (clear_tiling && hubp->funcs->hubp_clear_tiling)
|
||||
hubp->funcs->hubp_clear_tiling(hubp);
|
||||
|
||||
/* force page flip to see the new content of the framebuffer */
|
||||
hubp->funcs->hubp_program_surface_flip_and_addr(hubp,
|
||||
&plane_state->address,
|
||||
true);
|
||||
if (dc->hwss.clear_surface_dcc_and_tiling)
|
||||
dc->hwss.clear_surface_dcc_and_tiling(pipe_ctx, plane_state, clear_tiling);
|
||||
} else {
|
||||
struct mem_input *mi = pipe_ctx->plane_res.mi;
|
||||
if (!mi)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
|
|||
.update_plane_addr = dcn10_update_plane_addr,
|
||||
.update_dchub = dcn10_update_dchub,
|
||||
.update_pending_status = dcn10_update_pending_status,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.program_output_csc = dcn10_program_output_csc,
|
||||
.enable_accelerated_mode = dce110_enable_accelerated_mode,
|
||||
.enable_timing_synchronization = dcn10_enable_timing_synchronization,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ static const struct hw_sequencer_funcs dcn20_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ static const struct hw_sequencer_funcs dcn201_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn10_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn201_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ static const struct hw_sequencer_funcs dcn21_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static const struct hw_sequencer_funcs dcn301_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ static const struct hw_sequencer_funcs dcn35_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ static const struct hw_sequencer_funcs dcn351_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ static const struct hw_sequencer_funcs dcn401_funcs = {
|
|||
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
|
||||
.apply_ctx_for_surface = NULL,
|
||||
.program_front_end_for_ctx = dcn401_program_front_end_for_ctx,
|
||||
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
|
||||
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
|
||||
.post_unlock_program_front_end = dcn401_post_unlock_program_front_end,
|
||||
.update_plane_addr = dcn20_update_plane_addr,
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ struct hw_sequencer_funcs {
|
|||
struct pipe_ctx *pipe_ctx, bool enableTripleBuffer);
|
||||
void (*update_pending_status)(struct pipe_ctx *pipe_ctx);
|
||||
void (*update_dsc_pg)(struct dc *dc, struct dc_state *context, bool safe_to_disable);
|
||||
void (*clear_surface_dcc_and_tiling)(struct pipe_ctx *pipe_ctx, struct dc_plane_state *plane_state, bool clear_tiling);
|
||||
|
||||
/* Pipe Lock Related */
|
||||
void (*pipe_control_lock)(struct dc *dc,
|
||||
|
|
|
|||
Loading…
Reference in New Issue