From cc4521807b5aa129e150d5b067cf5cb7809fd720 Mon Sep 17 00:00:00 2001 From: jsg Date: Tue, 13 Jun 2023 03:50:21 +0000 Subject: [PATCH] drm/amd/display: Add debug option to skip PSR CRTC disable From Nicholas Kazlauskas 18225134088453e386b7aade107b3026d7aca76d in linux-6.1.y/6.1.29 00812bfc7bcb02faf127ee05f6ac27a5581eb701 in mainline linux --- sys/dev/pci/drm/amd/display/dc/core/dc_link.c | 2 +- sys/dev/pci/drm/amd/display/dc/dc.h | 1 + sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_link.c b/sys/dev/pci/drm/amd/display/dc/core/dc_link.c index 444a9999f6d..5f285c5ea69 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/dc_link.c +++ b/sys/dev/pci/drm/amd/display/dc/core/dc_link.c @@ -3381,7 +3381,7 @@ bool dc_link_setup_psr(struct dc_link *link, case FAMILY_YELLOW_CARP: case AMDGPU_FAMILY_GC_10_3_6: case AMDGPU_FAMILY_GC_11_0_1: - if (dc->debug.disable_z10) + if (dc->debug.disable_z10 || dc->debug.psr_skip_crtc_disable) psr_context->psr_level.bits.SKIP_CRTC_DISABLE = true; break; default: diff --git a/sys/dev/pci/drm/amd/display/dc/dc.h b/sys/dev/pci/drm/amd/display/dc/dc.h index 0c219463fcc..d57761cac66 100644 --- a/sys/dev/pci/drm/amd/display/dc/dc.h +++ b/sys/dev/pci/drm/amd/display/dc/dc.h @@ -829,6 +829,7 @@ struct dc_debug_options { int crb_alloc_policy_min_disp_count; bool disable_z10; bool enable_z9_disable_interface; + bool psr_skip_crtc_disable; union dpia_debug_options dpia_debug; bool disable_fixed_vs_aux_timeout_wa; bool force_disable_subvp; diff --git a/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c b/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c index 94a90c8f3ab..58931df853f 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn314/dcn314_resource.c @@ -884,6 +884,7 @@ static const struct dc_plane_cap plane_cap = { static const struct dc_debug_options debug_defaults_drv = { .disable_z10 = false, .enable_z9_disable_interface = true, + .psr_skip_crtc_disable = true, .disable_dmcu = true, .force_abm_enable = false, .timing_trace = false, -- 2.20.1