Skip to content

Commit

Permalink
drm/amd/display: Fix VPG instancing for dcn314 HPO
Browse files Browse the repository at this point in the history
[Why]
An issue during VPG indexing offset generation causing
to use the incorrect VPG. HW team placed VPG instances
5 at end of list, making it VPG 9 in register headers.

[How]
Correct VPG instance for HPO encoders.

Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Duncan Ma <duncan.ma@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
  • Loading branch information
Duncan Ma authored and Asher Song committed Aug 9, 2022
1 parent 27438be commit d1b6819
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/display/dc/dcn314/dcn314_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ static struct stream_encoder *dcn314_stream_encoder_create(
int afmt_inst;

/* Mapping of VPG, AFMT, DME register blocks to DIO block instance */
if (eng_id <= ENGINE_ID_DIGF) {
if (eng_id < ENGINE_ID_DIGF) {
vpg_inst = eng_id;
afmt_inst = eng_id;
} else
Expand Down Expand Up @@ -1301,7 +1301,8 @@ static struct hpo_dp_stream_encoder *dcn31_hpo_dp_stream_encoder_create(
* VPG[8] -> HPO_DP[2]
* VPG[9] -> HPO_DP[3]
*/
vpg_inst = hpo_dp_inst + 6;
//Uses offset index 5-8, but actually maps to vpg_inst 6-9
vpg_inst = hpo_dp_inst + 5;

/* Mapping of APG register blocks to HPO DP block instance:
* APG[0] -> HPO_DP[0]
Expand Down

0 comments on commit d1b6819

Please sign in to comment.