Commit 0023b7ee authored by Bhawanpreet Lakha's avatar Bhawanpreet Lakha Committed by Alex Deucher

drm/amd/display: Fix incorrect HDCP caps for dongle

[Why]
Previously we used link signal type to get the caps. We should use the
sink signal type

[How]
Use sink signal type instead of link signal type
Signed-off-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b56e90ea
...@@ -859,8 +859,8 @@ static int hdcp_sink_capability_show(struct seq_file *m, void *data) ...@@ -859,8 +859,8 @@ static int hdcp_sink_capability_show(struct seq_file *m, void *data)
seq_printf(m, "%s:%d HDCP version: ", connector->name, connector->base.id); seq_printf(m, "%s:%d HDCP version: ", connector->name, connector->base.id);
hdcp_cap = dc_link_is_hdcp14(aconnector->dc_link); hdcp_cap = dc_link_is_hdcp14(aconnector->dc_link, aconnector->dc_sink->sink_signal);
hdcp2_cap = dc_link_is_hdcp22(aconnector->dc_link); hdcp2_cap = dc_link_is_hdcp22(aconnector->dc_link, aconnector->dc_sink->sink_signal);
if (hdcp_cap) if (hdcp_cap)
......
...@@ -521,11 +521,11 @@ static void link_disconnect_remap(struct dc_sink *prev_sink, struct dc_link *lin ...@@ -521,11 +521,11 @@ static void link_disconnect_remap(struct dc_sink *prev_sink, struct dc_link *lin
} }
#if defined(CONFIG_DRM_AMD_DC_HDCP) #if defined(CONFIG_DRM_AMD_DC_HDCP)
bool dc_link_is_hdcp14(struct dc_link *link) bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal)
{ {
bool ret = false; bool ret = false;
switch (link->connector_signal) { switch (signal) {
case SIGNAL_TYPE_DISPLAY_PORT: case SIGNAL_TYPE_DISPLAY_PORT:
case SIGNAL_TYPE_DISPLAY_PORT_MST: case SIGNAL_TYPE_DISPLAY_PORT_MST:
ret = link->hdcp_caps.bcaps.bits.HDCP_CAPABLE; ret = link->hdcp_caps.bcaps.bits.HDCP_CAPABLE;
...@@ -545,11 +545,11 @@ bool dc_link_is_hdcp14(struct dc_link *link) ...@@ -545,11 +545,11 @@ bool dc_link_is_hdcp14(struct dc_link *link)
return ret; return ret;
} }
bool dc_link_is_hdcp22(struct dc_link *link) bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal)
{ {
bool ret = false; bool ret = false;
switch (link->connector_signal) { switch (signal) {
case SIGNAL_TYPE_DISPLAY_PORT: case SIGNAL_TYPE_DISPLAY_PORT:
case SIGNAL_TYPE_DISPLAY_PORT_MST: case SIGNAL_TYPE_DISPLAY_PORT_MST:
ret = (link->hdcp_caps.bcaps.bits.HDCP_CAPABLE && ret = (link->hdcp_caps.bcaps.bits.HDCP_CAPABLE &&
......
...@@ -312,8 +312,8 @@ bool dc_link_detect_sink(struct dc_link *link, enum dc_connection_type *type); ...@@ -312,8 +312,8 @@ bool dc_link_detect_sink(struct dc_link *link, enum dc_connection_type *type);
*/ */
#ifdef CONFIG_DRM_AMD_DC_HDCP #ifdef CONFIG_DRM_AMD_DC_HDCP
bool dc_link_is_hdcp14(struct dc_link *link); bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal);
bool dc_link_is_hdcp22(struct dc_link *link); bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal);
#endif #endif
void dc_link_set_drive_settings(struct dc *dc, void dc_link_set_drive_settings(struct dc *dc,
struct link_training_settings *lt_settings, struct link_training_settings *lt_settings,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment