From: Alvin Lee <[email protected]>

[Description]
DP HPO uses APG instance 5 - 8. In total their are 9 APG instances
for DCN6.

Cc: Charlene Liu <[email protected]>
Signed-off-by: Alvin Lee <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
---
 .../dc/resource/dcn60/dcn60_resource.c        | 26 +++++++++++--------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c 
b/drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
index f192c95952ab..d068d5682619 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn60/dcn60_resource.c
@@ -291,7 +291,7 @@ static const struct dcn31_vpg_mask vpg_mask = {
 #define apg_regs_init(id)\
        APG_DCN31_REG_LIST_RI(id)
 
-static struct dcn31_apg_registers apg_regs[5];
+static struct dcn31_apg_registers apg_regs[9];
 
 static const struct dcn31_apg_shift apg_shift = {
        DCN31_APG_MASK_SH_LIST(__SHIFT)
@@ -1394,7 +1394,11 @@ static struct apg *dcn60_apg_create(
        apg_regs_init(1),
        apg_regs_init(2),
        apg_regs_init(3),
-       apg_regs_init(4);
+       apg_regs_init(4),
+       apg_regs_init(5),
+       apg_regs_init(6),
+       apg_regs_init(7),
+       apg_regs_init(8);
 
        apg31_construct(apg60, ctx, inst,
                        &apg_regs[inst],
@@ -1525,20 +1529,20 @@ static struct hpo_dp_stream_encoder 
*dcn60_hpo_dp_stream_encoder_create(
        hpo_dp_inst = eng_id - ENGINE_ID_HPO_DP_0;
 
        /* Mapping of VPG register blocks to HPO DP block instance:
-        * VPG[6] -> HPO_DP[0]
-        * VPG[7] -> HPO_DP[1]
-        * VPG[8] -> HPO_DP[2]
-        * VPG[9] -> HPO_DP[3]
+        * VPG[5] -> HPO_DP[0]
+        * VPG[6] -> HPO_DP[1]
+        * VPG[7] -> HPO_DP[2]
+        * VPG[8] -> HPO_DP[3]
         */
        vpg_inst = hpo_dp_inst + 5;
 
        /* Mapping of APG register blocks to HPO DP block instance:
-        * APG[0] -> HPO_DP[0]
-        * APG[1] -> HPO_DP[1]
-        * APG[2] -> HPO_DP[2]
-        * APG[3] -> HPO_DP[3]
+        * APG[5] -> HPO_DP[0]
+        * APG[6] -> HPO_DP[1]
+        * APG[7] -> HPO_DP[2]
+        * APG[8] -> HPO_DP[3]
         */
-       apg_inst = hpo_dp_inst;
+       apg_inst = hpo_dp_inst + 5;
 
        /* allocate HPO stream encoder and create VPG sub-block */
        hpo_dp_enc60 = kzalloc(sizeof(struct dcn31_hpo_dp_stream_encoder), 
GFP_KERNEL);
-- 
2.43.0

Reply via email to