Skip to content

Commit 1bb8df6

Browse files
Alvin Leealexdeucher
authored andcommitted
drm/amd/display: SW cursor fallback for SubVP
[Description] Leverage SW cursor fall back for SubVP when the cursor is too big. We want to take advantage of being able to fallback to SW cursor when possible because it's not worth it to disable MCLK switching because the cursor is slightly too big. Tested-by: Daniel Wheeler <[email protected]> Reviewed-by: Aurabindo Pillai <[email protected]> Acked-by: Pavle Kotarac <[email protected]> Signed-off-by: Alvin Lee <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6acc619 commit 1bb8df6

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ bool dc_stream_set_cursor_attributes(
328328
}
329329

330330
dc = stream->ctx->dc;
331+
332+
if (dc->debug.allow_sw_cursor_fallback && attributes->height * attributes->width * 4 > 16384)
333+
if (stream->mall_stream_config.type == SUBVP_MAIN)
334+
return false;
335+
331336
stream->cursor_attributes = *attributes;
332337

333338
dc_z10_restore(dc);

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ struct dc_debug_options {
745745
bool disable_fixed_vs_aux_timeout_wa;
746746
bool force_disable_subvp;
747747
bool force_subvp_mclk_switch;
748+
bool allow_sw_cursor_fallback;
748749
bool force_usr_allow;
749750
/* uses value at boot and disables switch */
750751
bool disable_dtb_ref_clk_switch;

drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ static const struct dc_debug_options debug_defaults_drv = {
871871
.exit_idle_opt_for_cursor_updates = true,
872872
.enable_single_display_2to1_odm_policy = true,
873873
.enable_dp_dig_pixel_rate_div_policy = 1,
874+
.allow_sw_cursor_fallback = false,
874875
};
875876

876877
static const struct dc_debug_options debug_defaults_diags = {

drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -872,6 +872,7 @@ static const struct dc_debug_options debug_defaults_drv = {
872872
.exit_idle_opt_for_cursor_updates = true,
873873
.enable_single_display_2to1_odm_policy = true,
874874
.enable_dp_dig_pixel_rate_div_policy = 1,
875+
.allow_sw_cursor_fallback = false,
875876
};
876877

877878
static const struct dc_debug_options debug_defaults_diags = {

0 commit comments

Comments
 (0)