]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: unhard code link to phy idx mapping in dc link and clean up
authorWenjing Liu <wenjing.liu@amd.com>
Mon, 13 Dec 2021 23:29:27 +0000 (18:29 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 7 Jan 2022 22:21:20 +0000 (17:21 -0500)
commit86e41558c46ad0849ff2641f833f21fdbe00ed9f
tree8cdf0e74e3cd8fa3db7cf05162d23129c6fff466
parentd61f99956e6fe9718fe288a4df102de6b023bbb8
drm/amd/display: unhard code link to phy idx mapping in dc link and clean up

[why]
1. Current code hard codes link to PHY mapping in dc link level per asic
per revision.
This is not scalable. In long term the mapping will be obatined from
DMUB and store in dc resource.

2. Depending on DCN revision and endpoint type, the definition of
dio_output_idx dio_output_type and phy_idx are not  consistent. We need
to unify the meaning of these hardware indices across different system
configuration.

[how]
1. Temporarly move the hardcoded mapping to dc_resource level, which
should have full awareness of asic specific configuration and add a TODO
comment to move the mapping to DMUB.

2. populate dio_output_idx/phy_idx for all configuration, define
usb4_enabled bit instead of dio_output_type as an external enum.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Eric Yang <Eric.Yang2@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dm_cp_psp.h
drivers/gpu/drm/amd/display/dc/inc/resource.h
drivers/gpu/drm/amd/display/modules/inc/mod_hdcp.h