Skip to content

Commit 2e1da46

Browse files
Ivan Lipskialexdeucher
authored andcommitted
drm/amd/display: Improve HDMI info retrieval
[WHY & HOW] Make a dedicated function to read HDMI-related monitor info, including monitor's SCDC support. Fixes: 3471b9a ("drm/amd/display: Rework HDMI data channel reads") Suggested-by: Fangzhi Zuo <jerry.zuo@amd.com> Reviewed-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit c78e31b)
1 parent cf32644 commit 2e1da46

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,9 @@ int amdgpu_dm_update_plane_color_mgmt(struct dm_crtc_state *crtc,
10631063
void amdgpu_dm_update_connector_after_detect(
10641064
struct amdgpu_dm_connector *aconnector);
10651065

1066+
void populate_hdmi_info_from_connector(struct drm_hdmi_info *info,
1067+
struct dc_edid_caps *edid_caps);
1068+
10661069
extern const struct drm_encoder_helper_funcs amdgpu_dm_encoder_helper_funcs;
10671070

10681071
int amdgpu_dm_process_dmub_aux_transfer_sync(struct dc_context *ctx, unsigned int link_index,

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
139139

140140
edid_caps->edid_hdmi = connector->display_info.is_hdmi;
141141

142+
if (edid_caps->edid_hdmi)
143+
populate_hdmi_info_from_connector(&connector->display_info.hdmi, edid_caps);
144+
142145
apply_edid_quirks(dev, edid_buf, edid_caps);
143146

144147
sad_count = drm_edid_to_sad((struct edid *) edid->raw_edid, &sads);
@@ -990,6 +993,11 @@ dm_helpers_read_acpi_edid(struct amdgpu_dm_connector *aconnector)
990993
return drm_edid_read_custom(connector, dm_helpers_probe_acpi_edid, connector);
991994
}
992995

996+
void populate_hdmi_info_from_connector(struct drm_hdmi_info *hdmi, struct dc_edid_caps *edid_caps)
997+
{
998+
edid_caps->scdc_present = hdmi->scdc.supported;
999+
}
1000+
9931001
enum dc_edid_status dm_helpers_read_local_edid(
9941002
struct dc_context *ctx,
9951003
struct dc_link *link,

0 commit comments

Comments
 (0)