diff options
author | Charlene Liu <charlene.liu@amd.com> | 2017-04-21 17:15:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:06:35 -0400 |
commit | 03f5c686c3900f74853539cdebe4c25190106402 (patch) | |
tree | 12add7de10d41b52c212e326ea69d641995ca36f | |
parent | 6c626ffb1bfa2705e71376fe20bcdc6b89aace85 (diff) |
drm/amd/display: USB-c DP-HDMI dongle shows garbage on Sony TV
Signed-off-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_dp_types.h | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_types.h | 20 |
4 files changed, 47 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 4ef3fec44d2d..953e201dc6bc 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | |||
@@ -1951,14 +1951,33 @@ static void get_active_converter_info( | |||
1951 | link->dpcd_caps.dongle_type = | 1951 | link->dpcd_caps.dongle_type = |
1952 | DISPLAY_DONGLE_DP_HDMI_CONVERTER; | 1952 | DISPLAY_DONGLE_DP_HDMI_CONVERTER; |
1953 | 1953 | ||
1954 | link->dpcd_caps.dongle_caps.dongle_type = link->dpcd_caps.dongle_type; | ||
1954 | if (ds_port.fields.DETAILED_CAPS) { | 1955 | if (ds_port.fields.DETAILED_CAPS) { |
1955 | 1956 | ||
1956 | union dwnstream_port_caps_byte3_hdmi | 1957 | union dwnstream_port_caps_byte3_hdmi |
1957 | hdmi_caps = {.raw = det_caps[3] }; | 1958 | hdmi_caps = {.raw = det_caps[3] }; |
1959 | union dwnstream_port_caps_byte1 | ||
1960 | hdmi_color_caps = {.raw = det_caps[2] }; | ||
1961 | link->dpcd_caps.dongle_caps.dp_hdmi_max_pixel_clk = | ||
1962 | det_caps[1] * 25000; | ||
1958 | 1963 | ||
1959 | link->dpcd_caps.is_dp_hdmi_s3d_converter = | 1964 | link->dpcd_caps.dongle_caps.is_dp_hdmi_s3d_converter = |
1960 | hdmi_caps.bits.FRAME_SEQ_TO_FRAME_PACK; | 1965 | hdmi_caps.bits.FRAME_SEQ_TO_FRAME_PACK; |
1966 | link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr422_pass_through = | ||
1967 | hdmi_caps.bits.YCrCr422_PASS_THROUGH; | ||
1968 | link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr420_pass_through = | ||
1969 | hdmi_caps.bits.YCrCr420_PASS_THROUGH; | ||
1970 | link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr422_converter = | ||
1971 | hdmi_caps.bits.YCrCr422_CONVERSION; | ||
1972 | link->dpcd_caps.dongle_caps.is_dp_hdmi_ycbcr420_converter = | ||
1973 | hdmi_caps.bits.YCrCr420_CONVERSION; | ||
1974 | |||
1975 | link->dpcd_caps.dongle_caps.dp_hdmi_max_bpc = | ||
1976 | hdmi_color_caps.bits.MAX_BITS_PER_COLOR_COMPONENT; | ||
1977 | |||
1978 | link->dpcd_caps.dongle_caps.extendedCapValid = true; | ||
1961 | } | 1979 | } |
1980 | |||
1962 | break; | 1981 | break; |
1963 | } | 1982 | } |
1964 | } | 1983 | } |
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 1b3fd79ce624..d35fa01024f8 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h | |||
@@ -623,7 +623,7 @@ struct dpcd_caps { | |||
623 | union sink_count sink_count; | 623 | union sink_count sink_count; |
624 | /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER, | 624 | /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER, |
625 | indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/ | 625 | indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/ |
626 | bool is_dp_hdmi_s3d_converter; | 626 | struct dc_dongle_caps dongle_caps; |
627 | 627 | ||
628 | bool allow_invalid_MSA_timing_param; | 628 | bool allow_invalid_MSA_timing_param; |
629 | bool panel_mode_edp; | 629 | bool panel_mode_edp; |
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h index cd2323a71760..77e2de69cca3 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dp_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_dp_types.h | |||
@@ -255,7 +255,7 @@ enum dpcd_downstream_port_detailed_type { | |||
255 | DOWN_STREAM_DETAILED_DP_PLUS_PLUS | 255 | DOWN_STREAM_DETAILED_DP_PLUS_PLUS |
256 | }; | 256 | }; |
257 | 257 | ||
258 | union dwnstream_port_caps_byte2 { | 258 | union dwnstream_port_caps_byte1 { |
259 | struct { | 259 | struct { |
260 | uint8_t MAX_BITS_PER_COLOR_COMPONENT:2; | 260 | uint8_t MAX_BITS_PER_COLOR_COMPONENT:2; |
261 | uint8_t RESERVED:6; | 261 | uint8_t RESERVED:6; |
@@ -287,7 +287,11 @@ union dwnstream_port_caps_byte3_dvi { | |||
287 | union dwnstream_port_caps_byte3_hdmi { | 287 | union dwnstream_port_caps_byte3_hdmi { |
288 | struct { | 288 | struct { |
289 | uint8_t FRAME_SEQ_TO_FRAME_PACK:1; | 289 | uint8_t FRAME_SEQ_TO_FRAME_PACK:1; |
290 | uint8_t RESERVED:7; | 290 | uint8_t YCrCr422_PASS_THROUGH:1; |
291 | uint8_t YCrCr420_PASS_THROUGH:1; | ||
292 | uint8_t YCrCr422_CONVERSION:1; | ||
293 | uint8_t YCrCr420_CONVERSION:1; | ||
294 | uint8_t RESERVED:3; | ||
291 | } bits; | 295 | } bits; |
292 | uint8_t raw; | 296 | uint8_t raw; |
293 | }; | 297 | }; |
diff --git a/drivers/gpu/drm/amd/display/dc/dc_types.h b/drivers/gpu/drm/amd/display/dc/dc_types.h index e0436e317341..2ba02b50bc18 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_types.h +++ b/drivers/gpu/drm/amd/display/dc/dc_types.h | |||
@@ -338,6 +338,26 @@ enum { | |||
338 | LAYER_INDEX_PRIMARY = -1, | 338 | LAYER_INDEX_PRIMARY = -1, |
339 | }; | 339 | }; |
340 | 340 | ||
341 | enum dpcd_downstream_port_max_bpc { | ||
342 | DOWN_STREAM_MAX_8BPC = 0, | ||
343 | DOWN_STREAM_MAX_10BPC, | ||
344 | DOWN_STREAM_MAX_12BPC, | ||
345 | DOWN_STREAM_MAX_16BPC | ||
346 | }; | ||
347 | struct dc_dongle_caps { | ||
348 | /* dongle type (DP converter, CV smart dongle) */ | ||
349 | enum display_dongle_type dongle_type; | ||
350 | bool extendedCapValid; | ||
351 | /* If dongle_type == DISPLAY_DONGLE_DP_HDMI_CONVERTER, | ||
352 | indicates 'Frame Sequential-to-lllFrame Pack' conversion capability.*/ | ||
353 | bool is_dp_hdmi_s3d_converter; | ||
354 | bool is_dp_hdmi_ycbcr422_pass_through; | ||
355 | bool is_dp_hdmi_ycbcr420_pass_through; | ||
356 | bool is_dp_hdmi_ycbcr422_converter; | ||
357 | bool is_dp_hdmi_ycbcr420_converter; | ||
358 | uint32_t dp_hdmi_max_bpc; | ||
359 | uint32_t dp_hdmi_max_pixel_clk; | ||
360 | }; | ||
341 | /* Scaling format */ | 361 | /* Scaling format */ |
342 | enum scaling_transformation { | 362 | enum scaling_transformation { |
343 | SCALING_TRANSFORMATION_UNINITIALIZED, | 363 | SCALING_TRANSFORMATION_UNINITIALIZED, |