mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd/display: convert link.h functions to function pointer style
[Why & How] All dc subcomponents should call another dc component via function pointers stored in a component structure. This is part of dc coding convention since the beginning. The reason behind this is to improve encapsulation and polymorphism. The function contract is extracted into a single link service structure defined in link.h header file and implemented only in link_factory.c instead of spreading across multiple files in link component file structure. 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>
This commit is contained in:
committed by
Alex Deucher
parent
98ef341862
commit
98ce7d32e2
@@ -7184,13 +7184,14 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
|
||||
struct edid *edid = amdgpu_dm_connector->edid;
|
||||
struct dc_link_settings *verified_link_cap =
|
||||
&amdgpu_dm_connector->dc_link->verified_link_cap;
|
||||
const struct dc *dc = amdgpu_dm_connector->dc_link->dc;
|
||||
|
||||
encoder = amdgpu_dm_connector_to_encoder(connector);
|
||||
|
||||
if (!drm_edid_is_valid(edid)) {
|
||||
amdgpu_dm_connector->num_modes =
|
||||
drm_add_modes_noedid(connector, 640, 480);
|
||||
if (link_dp_get_encoding_format(verified_link_cap) == DP_128b_132b_ENCODING)
|
||||
if (dc->link_srv->dp_get_encoding_format(verified_link_cap) == DP_128b_132b_ENCODING)
|
||||
amdgpu_dm_connector->num_modes +=
|
||||
drm_add_modes_noedid(connector, 1920, 1080);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user