FAILED: patch "[PATCH] drm/amd/display: Set minimum requirement for using PSR-SU on" failed to apply to 6.1-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x c35b6ea8f2ecfa9d775530b70d4e727869099a9c
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023072121-defective-shucking-1c34@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^..
Possible dependencies:
c35b6ea8f2ec ("drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt") 268182606f26 ("drm/amd/display: Update correct DCN314 register header")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From c35b6ea8f2ecfa9d775530b70d4e727869099a9c Mon Sep 17 00:00:00 2001
From: Mario Limonciello <[email protected]>
Date: Fri, 23 Jun 2023 10:05:20 -0500
Subject: [PATCH] drm/amd/display: Set minimum requirement for using PSR-SU on
Rembrandt
A number of parade TCONs are causing system hangs when utilized with older DMUB firmware and PSR-SU. Some changes have been introduced into DMUB firmware to add resilience against these failures.
Don't allow running PSR-SU unless on the newer firmware.
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c +2 -1
@@ -24,6 +24,7 @@*/ #include "amdgpu_dm_psr.h" +#include "dc_dmub_srv.h" #include "dc.h" #include "dm_helpers.h" #include "amdgpu_dm.h"
@@ -50,7 +51,7 @@ static bool link_supports_psrsu(struct dc_link *link) !link->dpcd_caps.psr_info.psr2_su_y_granularity_cap)return false; -return true; +return dc_dmub_check_min_version (dc->ctx->dmub_srv->dmub); }/*
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +7 -0
@@ -1011,3 +1011,10 @@ void dc_send_update_cursor_info_to_dmu(dm_execute_dmub_cmd_list (pCtx->stream->ctx,2 , cmd,DM_DMUB_WAIT_TYPE_WAIT ); } } + +bool dc_dmub_check_min_version (struct dmub_srv *srv) +{ +if (!srv->hw_funcs.is_psrsu_supported) +return true; +return srv->hw_funcs.is_psrsu_supported (srv); +}
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +1 -0
@@ -86,4 +86,5 @@ void dc_dmub_setup_subvp_dmub_command(struct dc *dc, struct dc_state *context, bvoid dc_dmub_srv_log_diagnostic_data (struct dc_dmub_srv *dc_dmub_srv);void dc_send_update_cursor_info_to_dmu (struct pipe_ctx *pCtx,uint8_t pipe_idx); +bool dc_dmub_check_min_version (struct dmub_srv *srv);#endif /* _DMUB_DC_SRV_H_ */
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +2 -0
@@ -367,6 +367,8 @@ struct dmub_srv_hw_funcs {bool (*is_supported)(struct dmub_srv *dmub); +bool (*is_psrsu_supported)(struct dmub_srv *dmub); +bool (*is_hw_init)(struct dmub_srv *dmub); void (*enable_dmub_boot_options)(struct dmub_srv *dmub,
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +5 -0
@@ -302,6 +302,11 @@ bool dmub_dcn31_is_supported(struct dmub_srv *dmub)return supported; } +bool dmub_dcn31_is_psrsu_supported (struct dmub_srv *dmub) +{ +return dmub->fw_version >=DMUB_FW_VERSION (4 ,0 ,59 ); +} +void dmub_dcn31_set_gpint (struct dmub_srv *dmub,union dmub_gpint_data_register reg) {
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h +2 -0
@@ -221,6 +221,8 @@ bool dmub_dcn31_is_hw_init(struct dmub_srv *dmub);bool dmub_dcn31_is_supported (struct dmub_srv *dmub); +bool dmub_dcn31_is_psrsu_supported (struct dmub_srv *dmub); +void dmub_dcn31_set_gpint (struct dmub_srv *dmub,union dmub_gpint_data_register reg);
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +6 -4
@@ -226,14 +226,16 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)case DMUB_ASIC_DCN314 :case DMUB_ASIC_DCN315 :case DMUB_ASIC_DCN316 : -if (asic ==DMUB_ASIC_DCN314 ) +if (asic ==DMUB_ASIC_DCN314 ) { dmub->regs_dcn31 = &dmub_srv_dcn314_regs; -else if (asic ==DMUB_ASIC_DCN315 ) + }else if (asic ==DMUB_ASIC_DCN315 ) { dmub->regs_dcn31 = &dmub_srv_dcn315_regs; -else if (asic ==DMUB_ASIC_DCN316 ) + }else if (asic ==DMUB_ASIC_DCN316 ) { dmub->regs_dcn31 = &dmub_srv_dcn316_regs; -else + }else { dmub->regs_dcn31 = &dmub_srv_dcn31_regs; + funcs->is_psrsu_supported = dmub_dcn31_is_psrsu_supported; + } funcs->reset = dmub_dcn31_reset; funcs->reset_release = dmub_dcn31_reset_release; funcs->backdoor_load = dmub_dcn31_backdoor_load;