Commit b7066693 authored by Dale Zhao's avatar Dale Zhao Committed by Alex Deucher

drm/amd/display: handle active dongle port type is DP++ or DP case

[Why]:
Some active dongles have DP++ port and DP port at the same time. Current
code doesn't cover DP++ case and processes as default DVI case, in which
audio is disabled. Because of dual mode, DP case is also treat as DVI case
for the other port.

[How]:
According DP 1.4 spec, add DP++ procedure similar with HDMI case. Also
add None dongle type for DP case.
Signed-off-by: default avatarDale Zhao <dale.zhao@amd.com>
Reviewed-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b791f9dc
...@@ -2247,8 +2247,8 @@ static void get_active_converter_info( ...@@ -2247,8 +2247,8 @@ static void get_active_converter_info(
case DOWNSTREAM_VGA: case DOWNSTREAM_VGA:
link->dpcd_caps.dongle_type = DISPLAY_DONGLE_DP_VGA_CONVERTER; link->dpcd_caps.dongle_type = DISPLAY_DONGLE_DP_VGA_CONVERTER;
break; break;
case DOWNSTREAM_DVI_HDMI: case DOWNSTREAM_DVI_HDMI_DP_PLUS_PLUS:
/* At this point we don't know is it DVI or HDMI, /* At this point we don't know is it DVI or HDMI or DP++,
* assume DVI.*/ * assume DVI.*/
link->dpcd_caps.dongle_type = DISPLAY_DONGLE_DP_DVI_CONVERTER; link->dpcd_caps.dongle_type = DISPLAY_DONGLE_DP_DVI_CONVERTER;
break; break;
...@@ -2265,6 +2265,10 @@ static void get_active_converter_info( ...@@ -2265,6 +2265,10 @@ static void get_active_converter_info(
det_caps, sizeof(det_caps)); det_caps, sizeof(det_caps));
switch (port_caps->bits.DWN_STRM_PORTX_TYPE) { switch (port_caps->bits.DWN_STRM_PORTX_TYPE) {
/*Handle DP case as DONGLE_NONE*/
case DOWN_STREAM_DETAILED_DP:
link->dpcd_caps.dongle_type = DISPLAY_DONGLE_NONE;
break;
case DOWN_STREAM_DETAILED_VGA: case DOWN_STREAM_DETAILED_VGA:
link->dpcd_caps.dongle_type = link->dpcd_caps.dongle_type =
DISPLAY_DONGLE_DP_VGA_CONVERTER; DISPLAY_DONGLE_DP_VGA_CONVERTER;
...@@ -2274,6 +2278,8 @@ static void get_active_converter_info( ...@@ -2274,6 +2278,8 @@ static void get_active_converter_info(
DISPLAY_DONGLE_DP_DVI_CONVERTER; DISPLAY_DONGLE_DP_DVI_CONVERTER;
break; break;
case DOWN_STREAM_DETAILED_HDMI: case DOWN_STREAM_DETAILED_HDMI:
case DOWN_STREAM_DETAILED_DP_PLUS_PLUS:
/*Handle DP++ active converter case, process DP++ case as HDMI case according DP1.4 spec*/
link->dpcd_caps.dongle_type = link->dpcd_caps.dongle_type =
DISPLAY_DONGLE_DP_HDMI_CONVERTER; DISPLAY_DONGLE_DP_HDMI_CONVERTER;
...@@ -2289,14 +2295,18 @@ static void get_active_converter_info( ...@@ -2289,14 +2295,18 @@ static void get_active_converter_info(
link->dpcd_caps.dongle_caps.is_dp_hdmi_s3d_converter = link->dpcd_caps.dongle_caps.is_dp_hdmi_s3d_converter =
hdmi_caps.bits.FRAME_SEQ_TO_FRAME_PACK; hdmi_caps.bits.FRAME_SEQ_TO_FRAME_PACK;
link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr422_pass_through = /*YCBCR capability only for HDMI case*/
hdmi_caps.bits.YCrCr422_PASS_THROUGH; if (port_caps->bits.DWN_STRM_PORTX_TYPE
link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr420_pass_through = == DOWN_STREAM_DETAILED_HDMI) {
hdmi_caps.bits.YCrCr420_PASS_THROUGH; link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr422_pass_through =
link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr422_converter = hdmi_caps.bits.YCrCr422_PASS_THROUGH;
hdmi_caps.bits.YCrCr422_CONVERSION; link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr420_pass_through =
link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr420_converter = hdmi_caps.bits.YCrCr420_PASS_THROUGH;
hdmi_caps.bits.YCrCr420_CONVERSION; link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr422_converter =
hdmi_caps.bits.YCrCr422_CONVERSION;
link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr420_converter =
hdmi_caps.bits.YCrCr420_CONVERSION;
}
link->dpcd_caps.dongle_caps.dp_hdmi_max_bpc = link->dpcd_caps.dongle_caps.dp_hdmi_max_bpc =
translate_dpcd_max_bpc( translate_dpcd_max_bpc(
......
...@@ -43,7 +43,7 @@ enum dpcd_revision { ...@@ -43,7 +43,7 @@ enum dpcd_revision {
enum dpcd_downstream_port_type { enum dpcd_downstream_port_type {
DOWNSTREAM_DP = 0, DOWNSTREAM_DP = 0,
DOWNSTREAM_VGA, DOWNSTREAM_VGA,
DOWNSTREAM_DVI_HDMI, DOWNSTREAM_DVI_HDMI_DP_PLUS_PLUS,/* DVI, HDMI, DP++ */
DOWNSTREAM_NONDDC /* has no EDID (TV,CV) */ DOWNSTREAM_NONDDC /* has no EDID (TV,CV) */
}; };
......
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