Add checks for enabling PSR-SU
Subsystems (3)
cover Add checks for enabling PSR-SU
There have been a number of field reports of hangs tied to PSR-SU specifically to Parade TCONs. These hangs are fixed by changes in DMCUB firmware for both Rembrandt and Phoenix. Add checks to ensure that PSR-SU is only enabled when the newer DMCUB firmware is present.
Mario Limonciello (4):
drm/amd/display: Correct DMUB_FW_VERSION macro drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 4 +++- drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 11 +++++++---- .../gpu/drm/amd/display/modules/power/power_helpers.c | 2 -- 10 files changed, 34 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/4 drm/amd/display: Correct `DMUB_FW_VERSION` macro
The DMUB_FW_VERSION macro has a mistake in that the revision field is off by one byte. The last byte is typically used for other purposes and not a revision.
--- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1 -1
@@ -492,7 +492,7 @@ struct dmub_notification {* of a firmware to know if feature or functionality is supported or present. */ #define DMUB_FW_VERSION (major, minor, revision) \ - ((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | ((revision) & 0xFFFF)) + ((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | (((revision) & 0xFF) << 8))/** * dmub_srv_create() - creates the DMUB service.
Signature · 1 line
2.34.1
Re: [PATCH 1/4] drm/amd/display: Correct `DMUB_FW_VERSION` macro
Quoted 9 lines · Mario Limonciello
The
DMUB_FW_VERSIONmacro has a mistake in that the revision field is off by one byte. The last byte is typically used for other purposes and not a revision.Cc Sean Wang <[email protected]>Cc Marc Rossi <[email protected]>Cc Hamza Mahfooz <[email protected]>Cc Tsung-hua (Ryan) Lin <[email protected]>Signed-off-by Mario Limonciello <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dmub/dmub_srv.h +1
-1@@ -492,7 +492,7 @@ struct dmub_notification {* of a firmware to know if feature or functionality is supported or present. */ #define DMUB_FW_VERSION (major, minor, revision) \ - ((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | ((revision) & 0xFFFF)) + ((((major) & 0xFF) << 24) | (((minor) & 0xFF) << 16) | (((revision) & 0xFF) << 8))/** * dmub_srv_create() - creates the DMUB service.
PATCH 2/4 drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt
In reply to Mario LimoncielloA 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 | 3 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 10 ++++++---- 7 files changed, 25 insertions(+), 5 deletions(-)
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 ,58 ); +} +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 ) + funcs->is_psrsu_supported = dmub_dcn314_is_psrsu_supported; + }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->reset = dmub_dcn31_reset; funcs->reset_release = dmub_dcn31_reset_release; funcs->backdoor_load = dmub_dcn31_backdoor_load;
Signature · 1 line
2.34.1
Leo Li
maintainerRe: [PATCH 2/4] drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt
Quoted 122 lines · Mario Limonciello
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.
Cc Sean Wang <[email protected]>Cc Marc Rossi <[email protected]>Cc Hamza Mahfooz <[email protected]>Cc Tsung-hua (Ryan) Lin <[email protected]>Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 10 ++++++---- 7 files changed, 25 insertions(+), 5 deletions(-)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 ,58 ); +} +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 +1
-2@@ -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 )
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) · line 238
Quoted 10 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +5
-2+ funcs->is_psrsu_supported = dmub_dcn314_is_psrsu_supported; + }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; + }
Should these hunks be rolled into 3/4? dmub_dcn314_is_psrsu_supported is defined there.
Thanks,
Leo
Quoted 3 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +0
-0funcs->reset = dmub_dcn31_reset; funcs->reset_release = dmub_dcn31_reset_release; funcs->backdoor_load = dmub_dcn31_backdoor_load;
RE: [PATCH 2/4] drm/amd/display: Set minimum requirement for using PSR-SU on Rembrandt
[AMD Official Use Only - General]
Quoted 163 lines
-----Original Message-----
From: Li, Sun peng (Leo) <[email protected]>
Sent: Friday, June 23, 2023 2:27 PM
To: Limonciello, Mario <[email protected]>; amd- [email protected]
Cc: Lin, Tsung-hua (Ryan) <[email protected]>; Rossi, Marc <[email protected]>; Wang, Sean <[email protected]>; Mahfooz, Hamza <[email protected]>
Subject: Re: [PATCH 2/4] drm/amd/display: Set minimum requirement for using PSR-SU on RembrandtQuoted 22 lines · Mario Limonciello
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.
Cc Sean Wang <[email protected]>Cc Marc Rossi <[email protected]>Cc Hamza Mahfooz <[email protected]>Cc Tsung-hua (Ryan) Lin <[email protected]>Signed-off-by Mario Limonciello <[email protected]>--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c | 3 ++- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 7 +++++++ drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h | 1 + drivers/gpu/drm/amd/display/dmub/dmub_srv.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 10 ++++++---- 7 files changed, 25 insertions(+), 5 deletions(-)Review
Quoted 1 line
(quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.cReview
Quoted 21 lines
index
d647f68fd563..4f61d4f257cd100644drivers/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); }/* (quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.cdrivers/gpu/drm/amd/display/dc/dc_dmub_srv.c void dc_send_update_cursor_info_to_dmu( · line 1011
Quoted 5 lines
index
c52c40b16387..c753c6f30dd7100644drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +0
-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);Review
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +7
-0} } + +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); +}(quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.hdrivers/gpu/drm/amd/display/dc/dc_dmub_srv.h void dc_dmub_setup_subvp_dmub_command(struct
Quoted 4 lines
index
a5196a9292b3..099f94b6107c100644drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +0
-0@@ -86,4 +86,5 @@ void dc_dmub_setup_subvp_dmub_command(structdc *dc, struct
dc_state*context, bdrivers/gpu/drm/amd/display/dc/dc_dmub_srv.h void dc_dmub_setup_subvp_dmub_command(struct · line 86
Quoted 1 line
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +0
-0void dc_dmub_srv_log_diagnostic_data(struct dc_dmub_srv
*dc_dmub_srv);drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h void dc_dmub_setup_subvp_dmub_command(struct · line 87
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +0
-0void dc_send_update_cursor_info_to_dmu(struct pipe_ctx *pCtx, uint8_t
pipe_idx);Review
Quoted 3 lines
drivers/gpu/drm/amd/display/dc/dc_dmub_srv.h +1
-0+bool dc_dmub_check_min_version (struct dmub_srv *srv);#endif /* _DMUB_DC_SRV_H_ */ (quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/dmub/dmub_srv.hReview
Quoted 13 lines
index
2a66a305679a..4585e0419da6100644drivers/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,(quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.cdrivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c bool dmub_dcn31_is_supported(struct dmub_srv
Quoted 4 lines
index
ebf7aeec4029..c8445d474107100644drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +0
-0@@ -302,6 +302,11 @@ bool dmub_dcn31_is_supported(struct dmub_srv*dmub)
Review
Quoted 12 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.c +5
-0return supported; } +bool dmub_dcn31_is_psrsu_supported (struct dmub_srv *dmub) +{ +return dmub->fw_version >=DMUB_FW_VERSION (4 ,0 ,58 ); +} +void dmub_dcn31_set_gpint (struct dmub_srv *dmub,union dmub_gpint_data_register reg) {(quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.hdrivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h bool dmub_dcn31_is_hw_init(struct dmub_srv
Quoted 4 lines
index
7d5c10ee539b..89c5a948b67d100644drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h +0
-0@@ -221,6 +221,8 @@ bool dmub_dcn31_is_hw_init(struct dmub_srv*dmub);
Review
Quoted 9 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn31.h +2
-0bool 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);(quoted diff) +0
-0
b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.cdrivers/gpu/drm/amd/display/dmub/src/dmub_srv.c static bool dmub_srv_hw_setup(struct
Quoted 4 lines
index
9e9a6a44a7ac..fd5b043dd32d100644drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +0
-0@@ -226,14 +226,16 @@ static bool dmub_srv_hw_setup(struct
dmub_srv*dmub, enumdmub_asicasic)drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic)
Quoted 8 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +2
-2case 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 ) + funcs->is_psrsu_supported =
dmub_dcn314_is_psrsu_supported;drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) · line 238
Quoted 9 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +4
-2+ }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; + }
Quoted 3 lines
Should these hunks be rolled into 3/4?
dmub_dcn314_is_psrsu_supportedis defined there.
Ah yup; I mixed the two up when I split the patch in half. Will fix, thanks.
Quoted 5 lines
Thanks,
LeoQuoted 3 lines
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +0
-0funcs->reset = dmub_dcn31_reset; funcs->reset_release = dmub_dcn31_reset_release; funcs->backdoor_load = dmub_dcn31_backdoor_load;
PATCH 3/4 drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix
In reply to Mario LimoncielloThe same parade TCON issue can potentially happen on Phoenix, and the same PSR resilience changes have been ported into the DMUB firmware.
Don't allow running PSR-SU unless on the newer firmware.
--- drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.c | 5 +++++ drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.h | 2 ++ drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 1 + 3 files changed, 8 insertions(+)
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.c +5 -0
@@ -60,3 +60,8 @@ const struct dmub_srv_dcn31_regs dmub_srv_dcn314_regs = { { DMUB_DCN31_FIELDS() },#undef DMUB_SF }; + +bool dmub_dcn314_is_psrsu_supported (struct dmub_srv *dmub) +{ +return dmub->fw_version >=DMUB_FW_VERSION (8 ,0 ,16 ); +}
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn314.h +2 -0
@@ -30,4 +30,6 @@extern const struct dmub_srv_dcn31_regs dmub_srv_dcn314_regs; +bool dmub_dcn314_is_psrsu_supported (struct dmub_srv *dmub); +#endif /* _DMUB_DCN314_H_ */
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +1 -0
@@ -235,6 +235,7 @@ static bool dmub_srv_hw_setup(struct dmub_srv *dmub, enum dmub_asic asic) dmub->regs_dcn31 = &dmub_srv_dcn316_regs; }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;
Signature · 1 line
2.34.1
PATCH 4/4 Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"
In reply to Mario LimoncielloThis reverts commit 33eec907ce0eb50a56dca621aa7310f7fa904b93. This is no longer necessary when using newer DMUB F/W.
--- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/display/modules/power/power_helpers.c +0 -2
@@ -839,8 +839,6 @@ bool is_psr_su_specific_panel(struct dc_link *link) ((dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x08) || (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x07))) isPSRSUSupported = false; - else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x03) - isPSRSUSupported = false; else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1) isPSRSUSupported = true; }
Signature · 1 line
2.34.1
Re: [PATCH 4/4] Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"
Quoted 8 lines · Mario Limonciello
This reverts commit
33eec907ce0eb50a56dca621aa7310f7fa904b93. This is no longer necessary when using newer DMUB F/W.Cc Sean Wang <[email protected]>Cc Marc Rossi <[email protected]>Cc Hamza Mahfooz <[email protected]>Cc Tsung-hua (Ryan) Lin <[email protected]>Signed-off-by Mario Limonciello <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/amd/display/modules/power/power_helpers.c +0
-2@@ -839,8 +839,6 @@ bool is_psr_su_specific_panel(struct dc_link *link) ((dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x08) || (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x07))) isPSRSUSupported = false; - else if (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x03) - isPSRSUSupported = false; else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1) isPSRSUSupported = true; }