Skip to content

Commit a67c187

Browse files
Nicholas Kazlauskasgregkh
authored andcommitted
drm/amd/display: Remove min_dst_y_next_start check for Z8
commit 0844881 upstream. [Why] Flickering occurs on DRR supported panels when engaged in DRR due to min_dst_y_next becoming larger than the frame size itself. [How] In general, we should be able to enter Z8 when this is engaged but it might be a net power loss even if the calculation wasn't bugged. Don't support enabling Z8 during the DRR region. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Syed Hassan <syed.hassan@amd.com> Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 33ed892 commit a67c187

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -948,10 +948,8 @@ static enum dcn_zstate_support_state decide_zstate_support(struct dc *dc, struc
948948
{
949949
int plane_count;
950950
int i;
951-
unsigned int min_dst_y_next_start_us;
952951

953952
plane_count = 0;
954-
min_dst_y_next_start_us = 0;
955953
for (i = 0; i < dc->res_pool->pipe_count; i++) {
956954
if (context->res_ctx.pipe_ctx[i].plane_state)
957955
plane_count++;
@@ -973,26 +971,15 @@ static enum dcn_zstate_support_state decide_zstate_support(struct dc *dc, struc
973971
else if (context->stream_count == 1 && context->streams[0]->signal == SIGNAL_TYPE_EDP) {
974972
struct dc_link *link = context->streams[0]->sink->link;
975973
struct dc_stream_status *stream_status = &context->stream_status[0];
976-
struct dc_stream_state *current_stream = context->streams[0];
977974
int minmum_z8_residency = dc->debug.minimum_z8_residency_time > 0 ? dc->debug.minimum_z8_residency_time : 1000;
978975
bool allow_z8 = context->bw_ctx.dml.vba.StutterPeriod > (double)minmum_z8_residency;
979976
bool is_pwrseq0 = link->link_index == 0;
980-
bool isFreesyncVideo;
981-
982-
isFreesyncVideo = current_stream->adjust.v_total_min == current_stream->adjust.v_total_max;
983-
isFreesyncVideo = isFreesyncVideo && current_stream->timing.v_total < current_stream->adjust.v_total_min;
984-
for (i = 0; i < dc->res_pool->pipe_count; i++) {
985-
if (context->res_ctx.pipe_ctx[i].stream == current_stream && isFreesyncVideo) {
986-
min_dst_y_next_start_us = context->res_ctx.pipe_ctx[i].dlg_regs.min_dst_y_next_start_us;
987-
break;
988-
}
989-
}
990977

991978
/* Don't support multi-plane configurations */
992979
if (stream_status->plane_count > 1)
993980
return DCN_ZSTATE_SUPPORT_DISALLOW;
994981

995-
if (is_pwrseq0 && (context->bw_ctx.dml.vba.StutterPeriod > 5000.0 || min_dst_y_next_start_us > 5000))
982+
if (is_pwrseq0 && context->bw_ctx.dml.vba.StutterPeriod > 5000.0)
996983
return DCN_ZSTATE_SUPPORT_ALLOW;
997984
else if (is_pwrseq0 && link->psr_settings.psr_version == DC_PSR_VERSION_1 && !link->panel_config.psr.disable_psr)
998985
return allow_z8 ? DCN_ZSTATE_SUPPORT_ALLOW_Z8_Z10_ONLY : DCN_ZSTATE_SUPPORT_ALLOW_Z10_ONLY;

0 commit comments

Comments
 (0)