From: Charlene Liu <[email protected]>

[Why & How]
The vbios version of the dmubfw lacks driver feature support such as
HWFLIPQ, PSR/PSRSU/Replay/IPS, etc. Allowing the driver to use the
vbios version of dmubfw risks a deadlock and system hang.

Reviewed-by: Roman Li <[email protected]>
Signed-off-by: Charlene Liu <[email protected]>
Signed-off-by: Ray Wu <[email protected]>
---
 drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c 
b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c
index 53e70c682a77..3ef9a0152058 100644
--- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c
+++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c
@@ -384,10 +384,18 @@ bool dmub_dcn42_is_hw_init(struct dmub_srv *dmub)
 {
        union dmub_fw_boot_status status;
        uint32_t is_hw_init;
+       uint32_t fw_version;
+       bool is_vbios_fw;
 
        status.all = REG_READ(DMCUB_SCRATCH0);
        REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_hw_init);
 
+       fw_version = REG_READ(DMCUB_SCRATCH1);
+       is_vbios_fw = ((fw_version >> 6) & 0x01) ? true : false;
+       if (is_vbios_fw) {
+               dm_output_to_console("\n: DMU started with VBIOS FW, fw_version 
= 0x%x\n", fw_version);
+               return false;
+       }
        return is_hw_init != 0 && status.bits.dal_fw;
 }
 
-- 
2.43.0

Reply via email to