Skip to content

Commit d27a1e9

Browse files
Rodrigo Siqueiraalexdeucher
authored andcommitted
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 <[email protected]> Signed-off-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Roman Li <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent c905aa6 commit d27a1e9

File tree

14 files changed

+15
-11
lines changed

14 files changed

+15
-11
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_surface.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,17 +291,8 @@ void dc_plane_force_dcc_and_tiling_disable(struct dc_plane_state *plane_state,
291291
continue;
292292

293293
if (dc->ctx->dce_version >= DCE_VERSION_MAX) {
294-
struct hubp *hubp = pipe_ctx->plane_res.hubp;
295-
if (!hubp)
296-
continue;
297-
/* if framebuffer is tiled, disable tiling */
298-
if (clear_tiling && hubp->funcs->hubp_clear_tiling)
299-
hubp->funcs->hubp_clear_tiling(hubp);
300-
301-
/* force page flip to see the new content of the framebuffer */
302-
hubp->funcs->hubp_program_surface_flip_and_addr(hubp,
303-
&plane_state->address,
304-
true);
294+
if (dc->hwss.clear_surface_dcc_and_tiling)
295+
dc->hwss.clear_surface_dcc_and_tiling(pipe_ctx, plane_state, clear_tiling);
305296
} else {
306297
struct mem_input *mi = pipe_ctx->plane_res.mi;
307298
if (!mi)

drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static const struct hw_sequencer_funcs dcn10_funcs = {
4040
.update_plane_addr = dcn10_update_plane_addr,
4141
.update_dchub = dcn10_update_dchub,
4242
.update_pending_status = dcn10_update_pending_status,
43+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4344
.program_output_csc = dcn10_program_output_csc,
4445
.enable_accelerated_mode = dce110_enable_accelerated_mode,
4546
.enable_timing_synchronization = dcn10_enable_timing_synchronization,

drivers/gpu/drm/amd/display/dc/hwss/dcn20/dcn20_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static const struct hw_sequencer_funcs dcn20_funcs = {
3636
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
3737
.apply_ctx_for_surface = NULL,
3838
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
39+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
3940
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4041
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4142
.update_plane_addr = dcn20_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn201/dcn201_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ static const struct hw_sequencer_funcs dcn201_funcs = {
3636
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
3737
.apply_ctx_for_surface = NULL,
3838
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
39+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
3940
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4041
.post_unlock_program_front_end = dcn10_post_unlock_program_front_end,
4142
.update_plane_addr = dcn201_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn21/dcn21_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static const struct hw_sequencer_funcs dcn21_funcs = {
3737
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
3838
.apply_ctx_for_surface = NULL,
3939
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
40+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4041
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4142
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4243
.update_plane_addr = dcn20_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn30/dcn30_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ static const struct hw_sequencer_funcs dcn30_funcs = {
3737
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
3838
.apply_ctx_for_surface = NULL,
3939
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
40+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4041
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4142
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4243
.update_plane_addr = dcn20_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static const struct hw_sequencer_funcs dcn301_funcs = {
3939
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
4040
.apply_ctx_for_surface = NULL,
4141
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
42+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4243
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4344
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4445
.update_plane_addr = dcn20_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn31/dcn31_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
4040
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
4141
.apply_ctx_for_surface = NULL,
4242
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
43+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4344
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4445
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4546
.update_plane_addr = dcn20_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn314/dcn314_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
4242
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
4343
.apply_ctx_for_surface = NULL,
4444
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
45+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4546
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4647
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4748
.update_plane_addr = dcn20_update_plane_addr,

drivers/gpu/drm/amd/display/dc/hwss/dcn32/dcn32_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static const struct hw_sequencer_funcs dcn32_funcs = {
3939
.apply_ctx_to_hw = dce110_apply_ctx_to_hw,
4040
.apply_ctx_for_surface = NULL,
4141
.program_front_end_for_ctx = dcn20_program_front_end_for_ctx,
42+
.clear_surface_dcc_and_tiling = dcn10_reset_surface_dcc_and_tiling,
4243
.wait_for_pending_cleared = dcn10_wait_for_pending_cleared,
4344
.post_unlock_program_front_end = dcn20_post_unlock_program_front_end,
4445
.update_plane_addr = dcn20_update_plane_addr,

0 commit comments

Comments
 (0)