Rev 5271 | Rev 6321 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5271 | Rev 6104 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | */ |
25 | */ |
26 | #include |
26 | #include |
27 | #include |
27 | #include |
28 | #include |
28 | #include |
29 | #include |
29 | #include |
- | 30 | #include |
|
30 | #include |
31 | #include |
31 | #include "radeon.h" |
32 | #include "radeon.h" |
- | 33 | #include "radeon_audio.h" |
|
32 | #include "atom.h" |
34 | #include "atom.h" |
Line -... | Line 35... | ||
- | 35 | ||
Line -... | Line 36... | ||
- | 36 | #include |
|
- | 37 | ||
- | 38 | static int radeon_dp_handle_hpd(struct drm_connector *connector) |
|
- | 39 | { |
|
Line -... | Line 40... | ||
- | 40 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
|
- | 41 | int ret; |
|
- | 42 | ||
- | 43 | ret = radeon_dp_mst_check_status(radeon_connector); |
|
- | 44 | if (ret == -EINVAL) |
|
33 | 45 | return 1; |
|
34 | 46 | return 0; |
|
35 | 47 | } |
|
36 | void radeon_connector_hotplug(struct drm_connector *connector) |
48 | void radeon_connector_hotplug(struct drm_connector *connector) |
37 | { |
49 | { |
Line -... | Line 50... | ||
- | 50 | struct drm_device *dev = connector->dev; |
|
- | 51 | struct radeon_device *rdev = dev->dev_private; |
|
- | 52 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
|
- | 53 | ||
- | 54 | if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { |
|
- | 55 | struct radeon_connector_atom_dig *dig_connector = |
|
- | 56 | radeon_connector->con_priv; |
|
- | 57 | ||
- | 58 | if (radeon_connector->is_mst_connector) |
|
- | 59 | return; |
|
- | 60 | if (dig_connector->is_mst) { |
|
38 | struct drm_device *dev = connector->dev; |
61 | radeon_dp_handle_hpd(connector); |
39 | struct radeon_device *rdev = dev->dev_private; |
62 | return; |
40 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
63 | } |
41 | 64 | } |
|
42 | /* bail if the connector does not have hpd pin, e.g., |
65 | /* bail if the connector does not have hpd pin, e.g., |
Line 70... | Line 93... | ||
70 | int saved_dpms = connector->dpms; |
93 | int saved_dpms = connector->dpms; |
71 | /* Only turn off the display if it's physically disconnected */ |
94 | /* Only turn off the display if it's physically disconnected */ |
72 | if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
95 | if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
73 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); |
96 | drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); |
74 | } else if (radeon_dp_needs_link_train(radeon_connector)) { |
97 | } else if (radeon_dp_needs_link_train(radeon_connector)) { |
- | 98 | /* Don't try to start link training before we |
|
- | 99 | * have the dpcd */ |
|
- | 100 | if (!radeon_dp_getdpcd(radeon_connector)) |
|
- | 101 | return; |
|
- | 102 | ||
75 | /* set it to OFF so that drm_helper_connector_dpms() |
103 | /* set it to OFF so that drm_helper_connector_dpms() |
76 | * won't return immediately since the current state |
104 | * won't return immediately since the current state |
77 | * is ON at this point. |
105 | * is ON at this point. |
78 | */ |
106 | */ |
79 | connector->dpms = DRM_MODE_DPMS_OFF; |
107 | connector->dpms = DRM_MODE_DPMS_OFF; |
Line 132... | Line 160... | ||
132 | case DRM_MODE_CONNECTOR_eDP: |
160 | case DRM_MODE_CONNECTOR_eDP: |
133 | case DRM_MODE_CONNECTOR_LVDS: |
161 | case DRM_MODE_CONNECTOR_LVDS: |
134 | if (connector->display_info.bpc) |
162 | if (connector->display_info.bpc) |
135 | bpc = connector->display_info.bpc; |
163 | bpc = connector->display_info.bpc; |
136 | else if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) { |
164 | else if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) { |
137 | struct drm_connector_helper_funcs *connector_funcs = |
165 | const struct drm_connector_helper_funcs *connector_funcs = |
138 | connector->helper_private; |
166 | connector->helper_private; |
139 | struct drm_encoder *encoder = connector_funcs->best_encoder(connector); |
167 | struct drm_encoder *encoder = connector_funcs->best_encoder(connector); |
140 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
168 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
141 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
169 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
Line 222... | Line 250... | ||
222 | { |
250 | { |
223 | struct drm_device *dev = connector->dev; |
251 | struct drm_device *dev = connector->dev; |
224 | struct radeon_device *rdev = dev->dev_private; |
252 | struct radeon_device *rdev = dev->dev_private; |
225 | struct drm_encoder *best_encoder = NULL; |
253 | struct drm_encoder *best_encoder = NULL; |
226 | struct drm_encoder *encoder = NULL; |
254 | struct drm_encoder *encoder = NULL; |
227 | struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
255 | const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
228 | bool connected; |
256 | bool connected; |
229 | int i; |
257 | int i; |
Line 230... | Line 258... | ||
230 | 258 | ||
Line 699... | Line 727... | ||
699 | enum radeon_rmx_type rmx_type; |
727 | enum radeon_rmx_type rmx_type; |
Line 700... | Line 728... | ||
700 | 728 | ||
701 | if (connector->encoder) |
729 | if (connector->encoder) |
702 | radeon_encoder = to_radeon_encoder(connector->encoder); |
730 | radeon_encoder = to_radeon_encoder(connector->encoder); |
703 | else { |
731 | else { |
704 | struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
732 | const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
705 | radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); |
733 | radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); |
Line 706... | Line 734... | ||
706 | } |
734 | } |
707 | 735 | ||
Line 722... | Line 750... | ||
722 | radeon_encoder->rmx_type = rmx_type; |
750 | radeon_encoder->rmx_type = rmx_type; |
Line 723... | Line 751... | ||
723 | 751 | ||
724 | radeon_property_change_mode(&radeon_encoder->base); |
752 | radeon_property_change_mode(&radeon_encoder->base); |
Line -... | Line 753... | ||
- | 753 | } |
|
- | 754 | ||
- | 755 | if (property == rdev->mode_info.output_csc_property) { |
|
- | 756 | if (connector->encoder) |
|
- | 757 | radeon_encoder = to_radeon_encoder(connector->encoder); |
|
- | 758 | else { |
|
- | 759 | const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
|
- | 760 | radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); |
|
- | 761 | } |
|
- | 762 | ||
- | 763 | if (radeon_encoder->output_csc == val) |
|
- | 764 | return 0; |
|
- | 765 | ||
- | 766 | radeon_encoder->output_csc = val; |
|
- | 767 | ||
- | 768 | if (connector->encoder->crtc) { |
|
- | 769 | struct drm_crtc *crtc = connector->encoder->crtc; |
|
- | 770 | const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; |
|
- | 771 | struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc); |
|
- | 772 | ||
- | 773 | radeon_crtc->output_csc = radeon_encoder->output_csc; |
|
- | 774 | ||
- | 775 | (*crtc_funcs->load_lut)(crtc); |
|
- | 776 | } |
|
725 | } |
777 | } |
726 | 778 | ||
Line 727... | Line 779... | ||
727 | return 0; |
779 | return 0; |
728 | } |
780 | } |
Line 843... | Line 895... | ||
843 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; |
895 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; |
Line 844... | Line 896... | ||
844 | 896 | ||
845 | /* check if panel is valid */ |
897 | /* check if panel is valid */ |
846 | if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240) |
898 | if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240) |
- | 899 | ret = connector_status_connected; |
|
- | 900 | /* don't fetch the edid from the vbios if ddc fails and runpm is |
|
847 | ret = connector_status_connected; |
901 | * enabled so we report disconnected. |
- | 902 | */ |
|
- | 903 | if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0)) |
|
848 | 904 | ret = connector_status_disconnected; |
|
Line 849... | Line 905... | ||
849 | } |
905 | } |
850 | 906 | ||
851 | /* check for edid as well */ |
907 | /* check for edid as well */ |
Line 882... | Line 938... | ||
882 | return 0; |
938 | return 0; |
Line 883... | Line 939... | ||
883 | 939 | ||
884 | if (connector->encoder) |
940 | if (connector->encoder) |
885 | radeon_encoder = to_radeon_encoder(connector->encoder); |
941 | radeon_encoder = to_radeon_encoder(connector->encoder); |
886 | else { |
942 | else { |
887 | struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
943 | const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; |
888 | radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); |
944 | radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); |
Line 889... | Line 945... | ||
889 | } |
945 | } |
890 | 946 | ||
Line 950... | Line 1006... | ||
950 | { |
1006 | { |
951 | struct drm_device *dev = connector->dev; |
1007 | struct drm_device *dev = connector->dev; |
952 | struct radeon_device *rdev = dev->dev_private; |
1008 | struct radeon_device *rdev = dev->dev_private; |
953 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
1009 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
954 | struct drm_encoder *encoder; |
1010 | struct drm_encoder *encoder; |
955 | struct drm_encoder_helper_funcs *encoder_funcs; |
1011 | const struct drm_encoder_helper_funcs *encoder_funcs; |
956 | bool dret = false; |
1012 | bool dret = false; |
957 | enum drm_connector_status ret = connector_status_disconnected; |
1013 | enum drm_connector_status ret = connector_status_disconnected; |
Line 958... | Line 1014... | ||
958 | 1014 | ||
959 | encoder = radeon_best_single_encoder(connector); |
1015 | encoder = radeon_best_single_encoder(connector); |
Line 1072... | Line 1128... | ||
1072 | 1128 | ||
1073 | static enum drm_connector_status |
1129 | static enum drm_connector_status |
1074 | radeon_tv_detect(struct drm_connector *connector, bool force) |
1130 | radeon_tv_detect(struct drm_connector *connector, bool force) |
1075 | { |
1131 | { |
1076 | struct drm_encoder *encoder; |
1132 | struct drm_encoder *encoder; |
1077 | struct drm_encoder_helper_funcs *encoder_funcs; |
1133 | const struct drm_encoder_helper_funcs *encoder_funcs; |
1078 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
1134 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
1079 | enum drm_connector_status ret = connector_status_disconnected; |
1135 | enum drm_connector_status ret = connector_status_disconnected; |
Line 1080... | Line 1136... | ||
1080 | int r; |
1136 | int r; |
Line 1146... | Line 1202... | ||
1146 | { |
1202 | { |
1147 | struct drm_device *dev = connector->dev; |
1203 | struct drm_device *dev = connector->dev; |
1148 | struct radeon_device *rdev = dev->dev_private; |
1204 | struct radeon_device *rdev = dev->dev_private; |
1149 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
1205 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
1150 | struct drm_encoder *encoder = NULL; |
1206 | struct drm_encoder *encoder = NULL; |
1151 | struct drm_encoder_helper_funcs *encoder_funcs; |
1207 | const struct drm_encoder_helper_funcs *encoder_funcs; |
1152 | int i, r; |
1208 | int i, r; |
1153 | enum drm_connector_status ret = connector_status_disconnected; |
1209 | enum drm_connector_status ret = connector_status_disconnected; |
1154 | bool dret = false, broken_edid = false; |
1210 | bool dret = false, broken_edid = false; |
Line 1155... | Line 1211... | ||
1155 | 1211 | ||
1156 | 1212 | ||
1157 | if (!force && radeon_check_hpd_status_unchanged(connector)) { |
1213 | if (!force && radeon_check_hpd_status_unchanged(connector)) { |
1158 | ret = connector->status; |
1214 | ret = connector->status; |
Line 1159... | Line 1215... | ||
1159 | goto exit; |
1215 | goto exit; |
1160 | } |
1216 | } |
- | 1217 | ||
1161 | 1218 | if (radeon_connector->ddc_bus) { |
|
1162 | if (radeon_connector->ddc_bus) |
1219 | dret = radeon_ddc_probe(radeon_connector, false); |
1163 | dret = radeon_ddc_probe(radeon_connector, false); |
1220 | } |
1164 | if (dret) { |
1221 | if (dret) { |
Line 1302... | Line 1359... | ||
1302 | } |
1359 | } |
Line 1303... | Line 1360... | ||
1303 | 1360 | ||
1304 | /* updated in get modes as well since we need to know if it's analog or digital */ |
1361 | /* updated in get modes as well since we need to know if it's analog or digital */ |
Line -... | Line 1362... | ||
- | 1362 | radeon_connector_update_scratch_regs(connector, ret); |
|
- | 1363 | ||
- | 1364 | if ((radeon_audio != 0) && radeon_connector->use_digital) { |
|
- | 1365 | const struct drm_connector_helper_funcs *connector_funcs = |
|
- | 1366 | connector->helper_private; |
|
- | 1367 | ||
- | 1368 | encoder = connector_funcs->best_encoder(connector); |
|
- | 1369 | if (encoder && (encoder->encoder_type == DRM_MODE_ENCODER_TMDS)) { |
|
- | 1370 | radeon_connector_get_edid(connector); |
|
- | 1371 | radeon_audio_detect(connector, encoder, ret); |
|
- | 1372 | } |
|
1305 | radeon_connector_update_scratch_regs(connector, ret); |
1373 | } |
1306 | 1374 | ||
1307 | exit: |
1375 | exit: |
Line 1308... | Line 1376... | ||
1308 | return ret; |
1376 | return ret; |
Line 1548... | Line 1616... | ||
1548 | enum drm_connector_status ret = connector_status_disconnected; |
1616 | enum drm_connector_status ret = connector_status_disconnected; |
1549 | struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; |
1617 | struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv; |
1550 | struct drm_encoder *encoder = radeon_best_single_encoder(connector); |
1618 | struct drm_encoder *encoder = radeon_best_single_encoder(connector); |
1551 | int r; |
1619 | int r; |
Line -... | Line 1620... | ||
- | 1620 | ||
- | 1621 | if (radeon_dig_connector->is_mst) |
|
Line 1552... | Line 1622... | ||
1552 | 1622 | return connector_status_disconnected; |
|
1553 | 1623 | ||
1554 | if (!force && radeon_check_hpd_status_unchanged(connector)) { |
1624 | if (!force && radeon_check_hpd_status_unchanged(connector)) { |
1555 | ret = connector->status; |
1625 | ret = connector->status; |
Line 1565... | Line 1635... | ||
1565 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; |
1635 | struct drm_display_mode *native_mode = &radeon_encoder->native_mode; |
Line 1566... | Line 1636... | ||
1566 | 1636 | ||
1567 | /* check if panel is valid */ |
1637 | /* check if panel is valid */ |
1568 | if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240) |
1638 | if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240) |
- | 1639 | ret = connector_status_connected; |
|
- | 1640 | /* don't fetch the edid from the vbios if ddc fails and runpm is |
|
- | 1641 | * enabled so we report disconnected. |
|
- | 1642 | */ |
|
- | 1643 | if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0)) |
|
1569 | ret = connector_status_connected; |
1644 | ret = connector_status_disconnected; |
1570 | } |
1645 | } |
1571 | /* eDP is always DP */ |
1646 | /* eDP is always DP */ |
1572 | radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT; |
1647 | radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT; |
1573 | if (!radeon_dig_connector->edp_on) |
1648 | if (!radeon_dig_connector->edp_on) |
Line 1590... | Line 1665... | ||
1590 | radeon_atom_ext_encoder_setup_ddc(encoder); |
1665 | radeon_atom_ext_encoder_setup_ddc(encoder); |
1591 | /* bridge chips are always aux */ |
1666 | /* bridge chips are always aux */ |
1592 | if (radeon_ddc_probe(radeon_connector, true)) /* try DDC */ |
1667 | if (radeon_ddc_probe(radeon_connector, true)) /* try DDC */ |
1593 | ret = connector_status_connected; |
1668 | ret = connector_status_connected; |
1594 | else if (radeon_connector->dac_load_detect) { /* try load detection */ |
1669 | else if (radeon_connector->dac_load_detect) { /* try load detection */ |
1595 | struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; |
1670 | const struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; |
1596 | ret = encoder_funcs->detect(encoder, connector); |
1671 | ret = encoder_funcs->detect(encoder, connector); |
1597 | } |
1672 | } |
1598 | } |
1673 | } |
1599 | } else { |
1674 | } else { |
1600 | radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); |
1675 | radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector); |
1601 | if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
1676 | if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { |
1602 | ret = connector_status_connected; |
1677 | ret = connector_status_connected; |
1603 | if (radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) |
1678 | if (radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { |
1604 | radeon_dp_getdpcd(radeon_connector); |
1679 | radeon_dp_getdpcd(radeon_connector); |
- | 1680 | r = radeon_dp_mst_probe(radeon_connector); |
|
- | 1681 | if (r == 1) |
|
- | 1682 | ret = connector_status_disconnected; |
|
- | 1683 | } |
|
1605 | } else { |
1684 | } else { |
1606 | if (radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { |
1685 | if (radeon_dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { |
1607 | if (radeon_dp_getdpcd(radeon_connector)) |
1686 | if (radeon_dp_getdpcd(radeon_connector)) { |
- | 1687 | r = radeon_dp_mst_probe(radeon_connector); |
|
- | 1688 | if (r == 1) |
|
- | 1689 | ret = connector_status_disconnected; |
|
- | 1690 | else |
|
1608 | ret = connector_status_connected; |
1691 | ret = connector_status_connected; |
- | 1692 | } |
|
1609 | } else { |
1693 | } else { |
1610 | /* try non-aux ddc (DP to DVI/HDMI/etc. adapter) */ |
1694 | /* try non-aux ddc (DP to DVI/HDMI/etc. adapter) */ |
1611 | if (radeon_ddc_probe(radeon_connector, false)) |
1695 | if (radeon_ddc_probe(radeon_connector, false)) |
1612 | ret = connector_status_connected; |
1696 | ret = connector_status_connected; |
1613 | } |
1697 | } |
1614 | } |
1698 | } |
1615 | } |
1699 | } |
Line 1616... | Line 1700... | ||
1616 | 1700 | ||
- | 1701 | radeon_connector_update_scratch_regs(connector, ret); |
|
- | 1702 | ||
- | 1703 | if ((radeon_audio != 0) && encoder) { |
|
- | 1704 | radeon_connector_get_edid(connector); |
|
- | 1705 | radeon_audio_detect(connector, encoder, ret); |
|
- | 1706 | } |
|
1617 | radeon_connector_update_scratch_regs(connector, ret); |
1707 | |
1618 | out: |
1708 | out: |
1619 | return ret; |
1709 | return ret; |
Line 1620... | Line 1710... | ||
1620 | } |
1710 | } |
Line 1820... | Line 1910... | ||
1820 | rdev->mode_info.load_detect_property, |
1910 | rdev->mode_info.load_detect_property, |
1821 | 1); |
1911 | 1); |
1822 | drm_object_attach_property(&radeon_connector->base.base, |
1912 | drm_object_attach_property(&radeon_connector->base.base, |
1823 | dev->mode_config.scaling_mode_property, |
1913 | dev->mode_config.scaling_mode_property, |
1824 | DRM_MODE_SCALE_NONE); |
1914 | DRM_MODE_SCALE_NONE); |
- | 1915 | if (ASIC_IS_DCE5(rdev)) |
|
- | 1916 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 1917 | rdev->mode_info.output_csc_property, |
|
- | 1918 | RADEON_OUTPUT_CSC_BYPASS); |
|
1825 | break; |
1919 | break; |
1826 | case DRM_MODE_CONNECTOR_DVII: |
1920 | case DRM_MODE_CONNECTOR_DVII: |
1827 | case DRM_MODE_CONNECTOR_DVID: |
1921 | case DRM_MODE_CONNECTOR_DVID: |
1828 | case DRM_MODE_CONNECTOR_HDMIA: |
1922 | case DRM_MODE_CONNECTOR_HDMIA: |
1829 | case DRM_MODE_CONNECTOR_HDMIB: |
1923 | case DRM_MODE_CONNECTOR_HDMIB: |
Line 1852... | Line 1946... | ||
1852 | 1946 | ||
1853 | if (radeon_audio != 0) |
1947 | if (radeon_audio != 0) |
1854 | drm_object_attach_property(&radeon_connector->base.base, |
1948 | drm_object_attach_property(&radeon_connector->base.base, |
1855 | rdev->mode_info.audio_property, |
1949 | rdev->mode_info.audio_property, |
- | 1950 | RADEON_AUDIO_AUTO); |
|
- | 1951 | if (ASIC_IS_DCE5(rdev)) |
|
- | 1952 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 1953 | rdev->mode_info.output_csc_property, |
|
Line 1856... | Line 1954... | ||
1856 | RADEON_AUDIO_AUTO); |
1954 | RADEON_OUTPUT_CSC_BYPASS); |
1857 | 1955 | ||
1858 | subpixel_order = SubPixelHorizontalRGB; |
1956 | subpixel_order = SubPixelHorizontalRGB; |
1859 | connector->interlace_allowed = true; |
1957 | connector->interlace_allowed = true; |
Line 1898... | Line 1996... | ||
1898 | 1); |
1996 | 1); |
1899 | if (ASIC_IS_AVIVO(rdev)) |
1997 | if (ASIC_IS_AVIVO(rdev)) |
1900 | drm_object_attach_property(&radeon_connector->base.base, |
1998 | drm_object_attach_property(&radeon_connector->base.base, |
1901 | dev->mode_config.scaling_mode_property, |
1999 | dev->mode_config.scaling_mode_property, |
1902 | DRM_MODE_SCALE_NONE); |
2000 | DRM_MODE_SCALE_NONE); |
- | 2001 | if (ASIC_IS_DCE5(rdev)) |
|
- | 2002 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 2003 | rdev->mode_info.output_csc_property, |
|
- | 2004 | RADEON_OUTPUT_CSC_BYPASS); |
|
1903 | /* no HPD on analog connectors */ |
2005 | /* no HPD on analog connectors */ |
1904 | radeon_connector->hpd.hpd = RADEON_HPD_NONE; |
2006 | radeon_connector->hpd.hpd = RADEON_HPD_NONE; |
1905 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; |
2007 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; |
1906 | connector->interlace_allowed = true; |
2008 | connector->interlace_allowed = true; |
1907 | connector->doublescan_allowed = true; |
2009 | connector->doublescan_allowed = true; |
Line 1920... | Line 2022... | ||
1920 | 1); |
2022 | 1); |
1921 | if (ASIC_IS_AVIVO(rdev)) |
2023 | if (ASIC_IS_AVIVO(rdev)) |
1922 | drm_object_attach_property(&radeon_connector->base.base, |
2024 | drm_object_attach_property(&radeon_connector->base.base, |
1923 | dev->mode_config.scaling_mode_property, |
2025 | dev->mode_config.scaling_mode_property, |
1924 | DRM_MODE_SCALE_NONE); |
2026 | DRM_MODE_SCALE_NONE); |
- | 2027 | if (ASIC_IS_DCE5(rdev)) |
|
- | 2028 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 2029 | rdev->mode_info.output_csc_property, |
|
- | 2030 | RADEON_OUTPUT_CSC_BYPASS); |
|
1925 | /* no HPD on analog connectors */ |
2031 | /* no HPD on analog connectors */ |
1926 | radeon_connector->hpd.hpd = RADEON_HPD_NONE; |
2032 | radeon_connector->hpd.hpd = RADEON_HPD_NONE; |
1927 | connector->interlace_allowed = true; |
2033 | connector->interlace_allowed = true; |
1928 | connector->doublescan_allowed = true; |
2034 | connector->doublescan_allowed = true; |
1929 | break; |
2035 | break; |
Line 1971... | Line 2077... | ||
1971 | radeon_connector->dac_load_detect = true; |
2077 | radeon_connector->dac_load_detect = true; |
1972 | drm_object_attach_property(&radeon_connector->base.base, |
2078 | drm_object_attach_property(&radeon_connector->base.base, |
1973 | rdev->mode_info.load_detect_property, |
2079 | rdev->mode_info.load_detect_property, |
1974 | 1); |
2080 | 1); |
1975 | } |
2081 | } |
- | 2082 | if (ASIC_IS_DCE5(rdev)) |
|
- | 2083 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 2084 | rdev->mode_info.output_csc_property, |
|
- | 2085 | RADEON_OUTPUT_CSC_BYPASS); |
|
1976 | connector->interlace_allowed = true; |
2086 | connector->interlace_allowed = true; |
1977 | if (connector_type == DRM_MODE_CONNECTOR_DVII) |
2087 | if (connector_type == DRM_MODE_CONNECTOR_DVII) |
1978 | connector->doublescan_allowed = true; |
2088 | connector->doublescan_allowed = true; |
1979 | else |
2089 | else |
1980 | connector->doublescan_allowed = false; |
2090 | connector->doublescan_allowed = false; |
Line 2016... | Line 2126... | ||
2016 | if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) { |
2126 | if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) { |
2017 | drm_object_attach_property(&radeon_connector->base.base, |
2127 | drm_object_attach_property(&radeon_connector->base.base, |
2018 | rdev->mode_info.audio_property, |
2128 | rdev->mode_info.audio_property, |
2019 | RADEON_AUDIO_AUTO); |
2129 | RADEON_AUDIO_AUTO); |
2020 | } |
2130 | } |
- | 2131 | if (ASIC_IS_DCE5(rdev)) |
|
- | 2132 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 2133 | rdev->mode_info.output_csc_property, |
|
- | 2134 | RADEON_OUTPUT_CSC_BYPASS); |
|
2021 | subpixel_order = SubPixelHorizontalRGB; |
2135 | subpixel_order = SubPixelHorizontalRGB; |
2022 | connector->interlace_allowed = true; |
2136 | connector->interlace_allowed = true; |
2023 | if (connector_type == DRM_MODE_CONNECTOR_HDMIB) |
2137 | if (connector_type == DRM_MODE_CONNECTOR_HDMIB) |
2024 | connector->doublescan_allowed = true; |
2138 | connector->doublescan_allowed = true; |
2025 | else |
2139 | else |
Line 2064... | Line 2178... | ||
2064 | if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) { |
2178 | if (ASIC_IS_DCE2(rdev) && (radeon_audio != 0)) { |
2065 | drm_object_attach_property(&radeon_connector->base.base, |
2179 | drm_object_attach_property(&radeon_connector->base.base, |
2066 | rdev->mode_info.audio_property, |
2180 | rdev->mode_info.audio_property, |
2067 | RADEON_AUDIO_AUTO); |
2181 | RADEON_AUDIO_AUTO); |
2068 | } |
2182 | } |
- | 2183 | if (ASIC_IS_DCE5(rdev)) |
|
- | 2184 | drm_object_attach_property(&radeon_connector->base.base, |
|
- | 2185 | rdev->mode_info.output_csc_property, |
|
- | 2186 | RADEON_OUTPUT_CSC_BYPASS); |
|
2069 | connector->interlace_allowed = true; |
2187 | connector->interlace_allowed = true; |
2070 | /* in theory with a DP to VGA converter... */ |
2188 | /* in theory with a DP to VGA converter... */ |
2071 | connector->doublescan_allowed = false; |
2189 | connector->doublescan_allowed = false; |
2072 | break; |
2190 | break; |
2073 | case DRM_MODE_CONNECTOR_eDP: |
2191 | case DRM_MODE_CONNECTOR_eDP: |
Line 2300... | Line 2418... | ||
2300 | } else |
2418 | } else |
2301 | connector->polled = DRM_CONNECTOR_POLL_HPD; |
2419 | connector->polled = DRM_CONNECTOR_POLL_HPD; |
2302 | connector->display_info.subpixel_order = subpixel_order; |
2420 | connector->display_info.subpixel_order = subpixel_order; |
2303 | drm_connector_register(connector); |
2421 | drm_connector_register(connector); |
2304 | }>>>>>>->>>>>>>>>=> |
2422 | } |
- | 2423 | ||
- | 2424 | void radeon_setup_mst_connector(struct drm_device *dev) |
|
- | 2425 | { |
|
- | 2426 | struct radeon_device *rdev = dev->dev_private; |
|
- | 2427 | struct drm_connector *connector; |
|
- | 2428 | struct radeon_connector *radeon_connector; |
|
- | 2429 | ||
- | 2430 | if (!ASIC_IS_DCE5(rdev)) |
|
- | 2431 | return; |
|
- | 2432 | ||
- | 2433 | if (radeon_mst == 0) |
|
- | 2434 | return; |
|
- | 2435 | ||
- | 2436 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
|
- | 2437 | int ret; |
|
- | 2438 | ||
- | 2439 | radeon_connector = to_radeon_connector(connector); |
|
- | 2440 | ||
- | 2441 | if (connector->connector_type != DRM_MODE_CONNECTOR_DisplayPort) |
|
- | 2442 | continue; |
|
- | 2443 | ||
- | 2444 | ret = radeon_dp_mst_init(radeon_connector); |
|
- | 2445 | } |
|
- | 2446 | }>>>>>>->>>>>>>>>=> |