From: Yongqiang Sun <yongqiang....@amd.com>

[Why]
PSP version format is AB.CD.EF.GH, where CD and GH is the main version.
current psp version check for dmcub loading dmcu check 0x00110029, in
case of some psp version eg: 0x00110227 which main version should be
0x00110027, will result in unexpeceted dmcub loading dmcu FW.

[How]
Add psp version mask 0x00FF00FF for checking version.

Signed-off-by: Yongqiang Sun <yongqiang....@amd.com>
Reviewed-by: Tony Cheng <tony.ch...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c 
b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
index 3417100d51e4..3276944e6997 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
@@ -886,7 +886,7 @@ static void dcn21_dmcu_construct(
 
        if (!IS_FPGA_MAXIMUS_DC(ctx->dce_environment)) {
                psp_version = dm_read_reg(ctx, mmMP0_SMN_C2PMSG_58);
-               dmcu_dce->base.auto_load_dmcu = (psp_version > 0x00110029);
+               dmcu_dce->base.auto_load_dmcu = ((psp_version & 0x00FF00FF) > 
0x00110029);
                dmcu_dce->base.psp_version = psp_version;
        }
 }
-- 
2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to