diff options
| author | Wenjing Liu <wenjing.liu@amd.com> | 2023-02-02 00:07:35 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2023-02-15 00:06:28 +0300 |
| commit | 5ca38a18b5a47017d0e9a016661dad12322767fa (patch) | |
| tree | 858aa9202442aefdffa9ddd64b6559c4f797c625 /drivers/gpu/drm/amd/display/dc/link/link_resource.c | |
| parent | 9b0f51e8449f6f76170fda6a8dd9c417a43ce270 (diff) | |
| download | linux-5ca38a18b5a47017d0e9a016661dad12322767fa.tar.xz | |
drm/amd/display: move public dc link function implementation to dc_link_exports
[why]
Link is a subcomponent in dc. DM should be aware of dc link structure
as one of the abstracted objects maintained by dc. However it should
have no idea of the existence of a link component in dc dedicated to
maintain the states of dc link structure. As such we are moving link interfaces
out of dc_link.h and directly added to dc.h. We are grandually fading out
the explicit inclusion of dc_link header and eventually delete it.
On dc side, since link is a subcomponent behind dc interfaces, it is not
a good idea to implement dc interfaces in each individual subcomponent
of link which is already a subcomponent of dc. So we are decoupling it
by implementing a dc_link_exports in dc. This file will be a thin
translation layer that breaks the dependency so link is able to make
interface changes without breaking DM.
Reviewed-by: Jun Lei <Jun.Lei@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Wenjing Liu <wenjing.liu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/link/link_resource.c')
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/link/link_resource.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_resource.c b/drivers/gpu/drm/amd/display/dc/link/link_resource.c index 0027a7206073..bd42bb273c0c 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_resource.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_resource.c @@ -29,7 +29,7 @@ #include "link_resource.h" #include "protocols/link_dp_capability.h" -void dc_link_get_cur_link_res(const struct dc_link *link, +void link_get_cur_link_res(const struct dc_link *link, struct link_resource *link_res) { int i; @@ -49,24 +49,7 @@ void dc_link_get_cur_link_res(const struct dc_link *link, } -/** - * dc_get_cur_link_res_map() - take a snapshot of current link resource allocation state - * @dc: pointer to dc of the dm calling this - * @map: a dc link resource snapshot defined internally to dc. - * - * DM needs to capture a snapshot of current link resource allocation mapping - * and store it in its persistent storage. - * - * Some of the link resource is using first come first serve policy. - * The allocation mapping depends on original hotplug order. This information - * is lost after driver is loaded next time. The snapshot is used in order to - * restore link resource to its previous state so user will get consistent - * link capability allocation across reboot. - * - * Return: none (void function) - * - */ -void dc_get_cur_link_res_map(const struct dc *dc, uint32_t *map) +void link_get_cur_res_map(const struct dc *dc, uint32_t *map) { struct dc_link *link; uint32_t i; @@ -89,25 +72,7 @@ void dc_get_cur_link_res_map(const struct dc *dc, uint32_t *map) } } -/** - * dc_restore_link_res_map() - restore link resource allocation state from a snapshot - * @dc: pointer to dc of the dm calling this - * @map: a dc link resource snapshot defined internally to dc. - * - * DM needs to call this function after initial link detection on boot and - * before first commit streams to restore link resource allocation state - * from previous boot session. - * - * Some of the link resource is using first come first serve policy. - * The allocation mapping depends on original hotplug order. This information - * is lost after driver is loaded next time. The snapshot is used in order to - * restore link resource to its previous state so user will get consistent - * link capability allocation across reboot. - * - * Return: none (void function) - * - */ -void dc_restore_link_res_map(const struct dc *dc, uint32_t *map) +void link_restore_res_map(const struct dc *dc, uint32_t *map) { struct dc_link *link; uint32_t i; |
