From: Joshua Aberback Date: Thu, 30 May 2024 20:38:18 +0000 (-0400) Subject: drm/amd/display: DCN401 full power down in HW init if any link enabled X-Git-Tag: io_uring-6.11-20240722~49^2~18^2~50 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=52971387a05aa012eb73db78f39ae6c6dd47e080;p=linux-block.git drm/amd/display: DCN401 full power down in HW init if any link enabled [Why] During HW init, certain operations the driver performs are invalid on enabled hardware in an unknown state (for example, setting all clock values to minimum when the GPU is actively driving a display). There is already code present to call HWSS->power_down during init when any link is enabled in HW, but that function pointer is unpopulated for most asics. We want to enable this codepath for DCN401, as it resolves the issue with being unable to drive certain display configs on adapter re-enable, and we can restore boot optimizations. [How] - add power_down HWSS function for DCN401 - remove debug bit to disable boot optimizations for DCN401 Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Joshua Aberback Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c index dabad7feff03..1cf0608e1980 100644 --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn401/dcn401_init.c @@ -98,6 +98,7 @@ static const struct hw_sequencer_funcs dcn401_funcs = { .fams2_global_control_lock = dcn401_fams2_global_control_lock, .fams2_update_config = dcn401_fams2_update_config, .fams2_global_control_lock_fast = dcn401_fams2_global_control_lock_fast, + .power_down = dce110_power_down, }; static const struct hwseq_private_funcs dcn401_private_funcs = { diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c index ea803df8645e..7781a0342d67 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c @@ -733,7 +733,6 @@ static const struct dc_debug_options debug_defaults_drv = { .force_cositing = CHROMA_COSITING_TOPLEFT + 1, .disable_idle_power_optimizations = true, .edp_oled_no_backlight_enable = true, - .disable_boot_optimizations = true, }; static struct dce_aux *dcn401_aux_engine_create(