Lines Matching full:connector
40 void radeon_connector_hotplug(struct drm_connector *connector) in radeon_connector_hotplug() argument
42 struct drm_device *dev = connector->dev; in radeon_connector_hotplug()
44 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_hotplug()
46 /* bail if the connector does not have hpd pin, e.g., in radeon_connector_hotplug()
54 /* if the connector is already off, don't turn it back on */ in radeon_connector_hotplug()
56 if (connector->dpms != DRM_MODE_DPMS_ON) in radeon_connector_hotplug()
60 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in radeon_connector_hotplug()
80 /* Turn the connector off and back on immediately, which in radeon_connector_hotplug()
83 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); in radeon_connector_hotplug()
84 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); in radeon_connector_hotplug()
99 int radeon_get_monitor_bpc(struct drm_connector *connector) in radeon_get_monitor_bpc() argument
101 struct drm_device *dev = connector->dev; in radeon_get_monitor_bpc()
103 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_get_monitor_bpc()
108 switch (connector->connector_type) { in radeon_get_monitor_bpc()
112 if (drm_detect_hdmi_monitor(radeon_connector_edid(connector))) { in radeon_get_monitor_bpc()
113 if (connector->display_info.bpc) in radeon_get_monitor_bpc()
114 bpc = connector->display_info.bpc; in radeon_get_monitor_bpc()
120 if (drm_detect_hdmi_monitor(radeon_connector_edid(connector))) { in radeon_get_monitor_bpc()
121 if (connector->display_info.bpc) in radeon_get_monitor_bpc()
122 bpc = connector->display_info.bpc; in radeon_get_monitor_bpc()
129 drm_detect_hdmi_monitor(radeon_connector_edid(connector))) { in radeon_get_monitor_bpc()
130 if (connector->display_info.bpc) in radeon_get_monitor_bpc()
131 bpc = connector->display_info.bpc; in radeon_get_monitor_bpc()
136 if (connector->display_info.bpc) in radeon_get_monitor_bpc()
137 bpc = connector->display_info.bpc; in radeon_get_monitor_bpc()
140 connector->helper_private; in radeon_get_monitor_bpc()
141 struct drm_encoder *encoder = connector_funcs->best_encoder(connector); in radeon_get_monitor_bpc()
153 if (drm_detect_hdmi_monitor(radeon_connector_edid(connector))) { in radeon_get_monitor_bpc()
157 connector->name, bpc); in radeon_get_monitor_bpc()
169 connector->name, bpc); in radeon_get_monitor_bpc()
174 if (connector->display_info.max_tmds_clock > 0) { in radeon_get_monitor_bpc()
175 /* mode_clock is clock in kHz for mode to be modeset on this connector */ in radeon_get_monitor_bpc()
179 max_tmds_clock = connector->display_info.max_tmds_clock; in radeon_get_monitor_bpc()
182 connector->name, mode_clock, max_tmds_clock); in radeon_get_monitor_bpc()
186 if ((connector->display_info.edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30) && in radeon_get_monitor_bpc()
193 connector->name, bpc); in radeon_get_monitor_bpc()
199 connector->name, bpc); in radeon_get_monitor_bpc()
205 connector->name); in radeon_get_monitor_bpc()
212 connector->name); in radeon_get_monitor_bpc()
217 connector->name, connector->display_info.bpc, bpc); in radeon_get_monitor_bpc()
223 radeon_connector_update_scratch_regs(struct drm_connector *connector, enum drm_connector_status sta… in radeon_connector_update_scratch_regs() argument
225 struct drm_device *dev = connector->dev; in radeon_connector_update_scratch_regs()
229 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_connector_update_scratch_regs()
232 best_encoder = connector_funcs->best_encoder(connector); in radeon_connector_update_scratch_regs()
234 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_connector_update_scratch_regs()
241 radeon_atombios_connected_scratch_regs(connector, encoder, connected); in radeon_connector_update_scratch_regs()
243 radeon_combios_connected_scratch_regs(connector, encoder, connected); in radeon_connector_update_scratch_regs()
247 static struct drm_encoder *radeon_find_encoder(struct drm_connector *connector, int encoder_type) in radeon_find_encoder() argument
251 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_find_encoder()
259 struct edid *radeon_connector_edid(struct drm_connector *connector) in radeon_connector_edid() argument
261 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_edid()
262 struct drm_property_blob *edid_blob = connector->edid_blob_ptr; in radeon_connector_edid()
274 static void radeon_connector_get_edid(struct drm_connector *connector) in radeon_connector_get_edid() argument
276 struct drm_device *dev = connector->dev; in radeon_connector_get_edid()
278 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_get_edid()
287 if ((radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_connector_get_edid()
290 radeon_connector->edid = drm_get_edid(connector, in radeon_connector_get_edid()
292 } else if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) || in radeon_connector_get_edid()
293 (connector->connector_type == DRM_MODE_CONNECTOR_eDP)) { in radeon_connector_get_edid()
305 connector->connector_type == DRM_MODE_CONNECTOR_LVDS && in radeon_connector_get_edid()
323 if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) || in radeon_connector_get_edid()
324 (connector->connector_type == DRM_MODE_CONNECTOR_eDP))) in radeon_connector_get_edid()
333 static void radeon_connector_free_edid(struct drm_connector *connector) in radeon_connector_free_edid() argument
335 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_free_edid()
343 static int radeon_ddc_get_modes(struct drm_connector *connector) in radeon_ddc_get_modes() argument
345 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_ddc_get_modes()
349 drm_connector_update_edid_property(connector, radeon_connector->edid); in radeon_ddc_get_modes()
350 ret = drm_add_edid_modes(connector, radeon_connector->edid); in radeon_ddc_get_modes()
353 drm_connector_update_edid_property(connector, NULL); in radeon_ddc_get_modes()
357 static struct drm_encoder *radeon_best_single_encoder(struct drm_connector *connector) in radeon_best_single_encoder() argument
362 drm_connector_for_each_possible_encoder(connector, encoder) in radeon_best_single_encoder()
368 static void radeon_get_native_mode(struct drm_connector *connector) in radeon_get_native_mode() argument
370 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_get_native_mode()
378 if (!list_empty(&connector->probed_modes)) { in radeon_get_native_mode()
380 list_first_entry(&connector->probed_modes, in radeon_get_native_mode()
396 radeon_connector_analog_encoder_conflict_solve(struct drm_connector *connector, in radeon_connector_analog_encoder_conflict_solve() argument
401 struct drm_device *dev = connector->dev; in radeon_connector_analog_encoder_conflict_solve()
408 if (conflict == connector) in radeon_connector_analog_encoder_conflict_solve()
426 connector->name); in radeon_connector_analog_encoder_conflict_solve()
431 connector->name); in radeon_connector_analog_encoder_conflict_solve()
479 static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_connector *connector) in radeon_add_common_modes() argument
526 drm_mode_probed_add(connector, mode); in radeon_add_common_modes()
530 static int radeon_connector_set_property(struct drm_connector *connector, struct drm_property *prop… in radeon_connector_set_property() argument
533 struct drm_device *dev = connector->dev; in radeon_connector_set_property()
542 /* need to find digital encoder on connector */ in radeon_connector_set_property()
543 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
561 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_set_property()
562 /* need to find digital encoder on connector */ in radeon_connector_set_property()
563 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
576 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_set_property()
577 /* need to find digital encoder on connector */ in radeon_connector_set_property()
578 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
591 /* need to find digital encoder on connector */ in radeon_connector_set_property()
592 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
605 /* need to find digital encoder on connector */ in radeon_connector_set_property()
606 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
619 /* need to find digital encoder on connector */ in radeon_connector_set_property()
620 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
633 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TVDAC); in radeon_connector_set_property()
635 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_DAC); in radeon_connector_set_property()
658 to_radeon_connector(connector); in radeon_connector_set_property()
669 /* need to find digital encoder on connector */ in radeon_connector_set_property()
670 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
695 if (connector->encoder) in radeon_connector_set_property()
696 radeon_encoder = to_radeon_encoder(connector->encoder); in radeon_connector_set_property()
698 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_connector_set_property()
699 radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); in radeon_connector_set_property()
722 if (connector->encoder) in radeon_connector_set_property()
723 radeon_encoder = to_radeon_encoder(connector->encoder); in radeon_connector_set_property()
725 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_connector_set_property()
726 radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); in radeon_connector_set_property()
734 if (connector->encoder && connector->encoder->crtc) { in radeon_connector_set_property()
735 struct drm_crtc *crtc = connector->encoder->crtc; in radeon_connector_set_property()
752 struct drm_connector *connector) in radeon_fixup_lvds_native_mode() argument
759 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in radeon_fixup_lvds_native_mode()
769 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in radeon_fixup_lvds_native_mode()
786 static int radeon_lvds_get_modes(struct drm_connector *connector) in radeon_lvds_get_modes() argument
792 radeon_connector_get_edid(connector); in radeon_lvds_get_modes()
793 ret = radeon_ddc_get_modes(connector); in radeon_lvds_get_modes()
795 encoder = radeon_best_single_encoder(connector); in radeon_lvds_get_modes()
797 radeon_fixup_lvds_native_mode(encoder, connector); in radeon_lvds_get_modes()
799 radeon_add_common_modes(encoder, connector); in radeon_lvds_get_modes()
804 encoder = radeon_best_single_encoder(connector); in radeon_lvds_get_modes()
812 drm_mode_probed_add(connector, mode); in radeon_lvds_get_modes()
814 connector->display_info.width_mm = mode->width_mm; in radeon_lvds_get_modes()
815 connector->display_info.height_mm = mode->height_mm; in radeon_lvds_get_modes()
817 radeon_add_common_modes(encoder, connector); in radeon_lvds_get_modes()
823 static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector, in radeon_lvds_mode_valid() argument
826 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_lvds_mode_valid()
854 radeon_lvds_detect(struct drm_connector *connector, bool force) in radeon_lvds_detect() argument
856 struct drm_device *dev = connector->dev; in radeon_lvds_detect()
858 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_lvds_detect()
859 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_lvds_detect()
864 r = pm_runtime_get_sync(connector->dev->dev); in radeon_lvds_detect()
866 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_lvds_detect()
886 radeon_connector_get_edid(connector); in radeon_lvds_detect()
891 radeon_connector_update_scratch_regs(connector, ret); in radeon_lvds_detect()
894 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_lvds_detect()
895 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_lvds_detect()
901 static void radeon_connector_unregister(struct drm_connector *connector) in radeon_connector_unregister() argument
903 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_unregister()
911 static void radeon_connector_destroy(struct drm_connector *connector) in radeon_connector_destroy() argument
913 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_destroy()
915 radeon_connector_free_edid(connector); in radeon_connector_destroy()
917 drm_connector_unregister(connector); in radeon_connector_destroy()
918 drm_connector_cleanup(connector); in radeon_connector_destroy()
919 kfree(connector); in radeon_connector_destroy()
922 static int radeon_lvds_set_property(struct drm_connector *connector, in radeon_lvds_set_property() argument
926 struct drm_device *dev = connector->dev; in radeon_lvds_set_property()
934 if (connector->encoder) in radeon_lvds_set_property()
935 radeon_encoder = to_radeon_encoder(connector->encoder); in radeon_lvds_set_property()
937 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_lvds_set_property()
938 radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); in radeon_lvds_set_property()
973 static int radeon_vga_get_modes(struct drm_connector *connector) in radeon_vga_get_modes() argument
977 radeon_connector_get_edid(connector); in radeon_vga_get_modes()
978 ret = radeon_ddc_get_modes(connector); in radeon_vga_get_modes()
980 radeon_get_native_mode(connector); in radeon_vga_get_modes()
985 static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector, in radeon_vga_mode_valid() argument
988 struct drm_device *dev = connector->dev; in radeon_vga_mode_valid()
1000 radeon_vga_detect(struct drm_connector *connector, bool force) in radeon_vga_detect() argument
1002 struct drm_device *dev = connector->dev; in radeon_vga_detect()
1004 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_vga_detect()
1012 r = pm_runtime_get_sync(connector->dev->dev); in radeon_vga_detect()
1014 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_vga_detect()
1019 encoder = radeon_best_single_encoder(connector); in radeon_vga_detect()
1027 radeon_connector_free_edid(connector); in radeon_vga_detect()
1028 radeon_connector_get_edid(connector); in radeon_vga_detect()
1032 connector->name); in radeon_vga_detect()
1042 radeon_connector_free_edid(connector); in radeon_vga_detect()
1056 ret = connector->status; in radeon_vga_detect()
1062 ret = encoder_funcs->detect(encoder, connector); in radeon_vga_detect()
1069 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true); in radeon_vga_detect()
1081 radeon_connector_update_scratch_regs(connector, ret); in radeon_vga_detect()
1085 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_vga_detect()
1086 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_vga_detect()
1107 static int radeon_tv_get_modes(struct drm_connector *connector) in radeon_tv_get_modes() argument
1109 struct drm_device *dev = connector->dev; in radeon_tv_get_modes()
1114 encoder = radeon_best_single_encoder(connector); in radeon_tv_get_modes()
1121 radeon_add_common_modes(encoder, connector); in radeon_tv_get_modes()
1126 drm_mode_probed_add(connector, tv_mode); in radeon_tv_get_modes()
1131 static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector, in radeon_tv_mode_valid() argument
1140 radeon_tv_detect(struct drm_connector *connector, bool force) in radeon_tv_detect() argument
1144 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_tv_detect()
1152 r = pm_runtime_get_sync(connector->dev->dev); in radeon_tv_detect()
1154 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_tv_detect()
1159 encoder = radeon_best_single_encoder(connector); in radeon_tv_detect()
1164 ret = encoder_funcs->detect(encoder, connector); in radeon_tv_detect()
1167 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, false); in radeon_tv_detect()
1168 radeon_connector_update_scratch_regs(connector, ret); in radeon_tv_detect()
1171 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_tv_detect()
1172 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_tv_detect()
1193 static bool radeon_check_hpd_status_unchanged(struct drm_connector *connector) in radeon_check_hpd_status_unchanged() argument
1195 struct drm_device *dev = connector->dev; in radeon_check_hpd_status_unchanged()
1197 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_check_hpd_status_unchanged()
1207 if (connector->status == status) in radeon_check_hpd_status_unchanged()
1219 * we need to find the DAC encoder object for this connector.
1223 * if its shared we have to set the other connector to disconnected.
1226 radeon_dvi_detect(struct drm_connector *connector, bool force) in radeon_dvi_detect() argument
1228 struct drm_device *dev = connector->dev; in radeon_dvi_detect()
1230 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_detect()
1238 r = pm_runtime_get_sync(connector->dev->dev); in radeon_dvi_detect()
1240 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dvi_detect()
1250 if (!force && radeon_check_hpd_status_unchanged(connector)) { in radeon_dvi_detect()
1251 ret = connector->status; in radeon_dvi_detect()
1263 connector->status != connector_status_connected) { in radeon_dvi_detect()
1273 radeon_connector_free_edid(connector); in radeon_dvi_detect()
1274 radeon_connector_get_edid(connector); in radeon_dvi_detect()
1278 connector->name); in radeon_dvi_detect()
1285 connector->name); in radeon_dvi_detect()
1299 radeon_connector_free_edid(connector); in radeon_dvi_detect()
1313 if (connector == list_connector) in radeon_dvi_detect()
1323 radeon_connector_free_edid(connector); in radeon_dvi_detect()
1337 if ((connector->connector_type == DRM_MODE_CONNECTOR_DVID) || in radeon_dvi_detect()
1338 (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)) in radeon_dvi_detect()
1347 ret = connector->status; in radeon_dvi_detect()
1353 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_dvi_detect()
1363 ret = encoder_funcs->detect(encoder, connector); in radeon_dvi_detect()
1374 lret = encoder_funcs->detect(encoder, connector); in radeon_dvi_detect()
1386 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true); in radeon_dvi_detect()
1404 radeon_connector_update_scratch_regs(connector, ret); in radeon_dvi_detect()
1408 connector->helper_private; in radeon_dvi_detect()
1410 encoder = connector_funcs->best_encoder(connector); in radeon_dvi_detect()
1412 radeon_connector_get_edid(connector); in radeon_dvi_detect()
1413 radeon_audio_detect(connector, encoder, ret); in radeon_dvi_detect()
1419 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_dvi_detect()
1420 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dvi_detect()
1427 static struct drm_encoder *radeon_dvi_encoder(struct drm_connector *connector) in radeon_dvi_encoder() argument
1429 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_encoder()
1432 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_dvi_encoder()
1447 drm_connector_for_each_possible_encoder(connector, encoder) in radeon_dvi_encoder()
1453 static void radeon_dvi_force(struct drm_connector *connector) in radeon_dvi_force() argument
1455 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_force()
1456 if (connector->force == DRM_FORCE_ON) in radeon_dvi_force()
1458 if (connector->force == DRM_FORCE_ON_DIGITAL) in radeon_dvi_force()
1462 static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector, in radeon_dvi_mode_valid() argument
1465 struct drm_device *dev = connector->dev; in radeon_dvi_mode_valid()
1467 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_mode_valid()
1482 else if (ASIC_IS_DCE6(rdev) && drm_detect_hdmi_monitor(radeon_connector_edid(connector))) { in radeon_dvi_mode_valid()
1516 static int radeon_dp_get_modes(struct drm_connector *connector) in radeon_dp_get_modes() argument
1518 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dp_get_modes()
1520 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_dp_get_modes()
1523 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in radeon_dp_get_modes()
1524 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in radeon_dp_get_modes()
1527 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { in radeon_dp_get_modes()
1529 atombios_set_edp_panel_power(connector, in radeon_dp_get_modes()
1531 radeon_connector_get_edid(connector); in radeon_dp_get_modes()
1532 ret = radeon_ddc_get_modes(connector); in radeon_dp_get_modes()
1534 atombios_set_edp_panel_power(connector, in radeon_dp_get_modes()
1538 if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_dp_get_modes()
1543 radeon_connector_get_edid(connector); in radeon_dp_get_modes()
1544 ret = radeon_ddc_get_modes(connector); in radeon_dp_get_modes()
1549 radeon_fixup_lvds_native_mode(encoder, connector); in radeon_dp_get_modes()
1551 radeon_add_common_modes(encoder, connector); in radeon_dp_get_modes()
1563 drm_mode_probed_add(connector, mode); in radeon_dp_get_modes()
1565 connector->display_info.width_mm = mode->width_mm; in radeon_dp_get_modes()
1566 connector->display_info.height_mm = mode->height_mm; in radeon_dp_get_modes()
1568 radeon_add_common_modes(encoder, connector); in radeon_dp_get_modes()
1572 if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_dp_get_modes()
1577 radeon_connector_get_edid(connector); in radeon_dp_get_modes()
1578 ret = radeon_ddc_get_modes(connector); in radeon_dp_get_modes()
1580 radeon_get_native_mode(connector); in radeon_dp_get_modes()
1586 u16 radeon_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector) in radeon_connector_encoder_get_dp_bridge_encoder_id() argument
1591 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_connector_encoder_get_dp_bridge_encoder_id()
1606 static bool radeon_connector_encoder_is_hbr2(struct drm_connector *connector) in radeon_connector_encoder_is_hbr2() argument
1612 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_connector_encoder_is_hbr2()
1621 bool radeon_connector_is_dp12_capable(struct drm_connector *connector) in radeon_connector_is_dp12_capable() argument
1623 struct drm_device *dev = connector->dev; in radeon_connector_is_dp12_capable()
1628 radeon_connector_encoder_is_hbr2(connector)) { in radeon_connector_is_dp12_capable()
1636 radeon_dp_detect(struct drm_connector *connector, bool force) in radeon_dp_detect() argument
1638 struct drm_device *dev = connector->dev; in radeon_dp_detect()
1640 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dp_detect()
1643 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_dp_detect()
1647 r = pm_runtime_get_sync(connector->dev->dev); in radeon_dp_detect()
1649 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dp_detect()
1654 if (!force && radeon_check_hpd_status_unchanged(connector)) { in radeon_dp_detect()
1655 ret = connector->status; in radeon_dp_detect()
1659 radeon_connector_free_edid(connector); in radeon_dp_detect()
1661 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in radeon_dp_detect()
1662 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in radeon_dp_detect()
1679 atombios_set_edp_panel_power(connector, in radeon_dp_detect()
1684 atombios_set_edp_panel_power(connector, in radeon_dp_detect()
1686 } else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_dp_detect()
1701 ret = encoder_funcs->detect(encoder, connector); in radeon_dp_detect()
1722 radeon_connector_update_scratch_regs(connector, ret); in radeon_dp_detect()
1725 radeon_connector_get_edid(connector); in radeon_dp_detect()
1726 radeon_audio_detect(connector, encoder, ret); in radeon_dp_detect()
1731 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_dp_detect()
1732 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dp_detect()
1738 static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector, in radeon_dp_mode_valid() argument
1741 struct drm_device *dev = connector->dev; in radeon_dp_mode_valid()
1743 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dp_mode_valid()
1748 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in radeon_dp_mode_valid()
1749 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in radeon_dp_mode_valid()
1750 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_dp_mode_valid()
1776 return radeon_dp_mode_valid_helper(connector, mode); in radeon_dp_mode_valid()
1778 if (ASIC_IS_DCE6(rdev) && drm_detect_hdmi_monitor(radeon_connector_edid(connector))) { in radeon_dp_mode_valid()
1840 struct drm_connector *connector; in radeon_add_atom_connector() local
1854 /* if the user selected tv=0 don't try and add the connector */ in radeon_add_atom_connector()
1862 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in radeon_add_atom_connector()
1863 radeon_connector = to_radeon_connector(connector); in radeon_add_atom_connector()
1900 connector = &radeon_connector->base; in radeon_add_atom_connector()
1940 connector->interlace_allowed = true; in radeon_add_atom_connector()
1941 connector->doublescan_allowed = true; in radeon_add_atom_connector()
1995 connector->interlace_allowed = true; in radeon_add_atom_connector()
1997 connector->doublescan_allowed = true; in radeon_add_atom_connector()
1999 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2019 connector->interlace_allowed = false; in radeon_add_atom_connector()
2020 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2052 connector->interlace_allowed = true; in radeon_add_atom_connector()
2053 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2082 connector->interlace_allowed = true; in radeon_add_atom_connector()
2083 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2141 connector->interlace_allowed = true; in radeon_add_atom_connector()
2143 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2145 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2197 connector->interlace_allowed = true; in radeon_add_atom_connector()
2199 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2201 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2254 connector->interlace_allowed = true; in radeon_add_atom_connector()
2256 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2282 connector->interlace_allowed = false; in radeon_add_atom_connector()
2283 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2302 connector->interlace_allowed = false; in radeon_add_atom_connector()
2303 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2327 connector->interlace_allowed = false; in radeon_add_atom_connector()
2328 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2335 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in radeon_add_atom_connector()
2339 connector->polled = DRM_CONNECTOR_POLL_HPD; in radeon_add_atom_connector()
2341 connector->display_info.subpixel_order = subpixel_order; in radeon_add_atom_connector()
2342 drm_connector_register(connector); in radeon_add_atom_connector()
2350 drm_connector_cleanup(connector); in radeon_add_atom_connector()
2351 kfree(connector); in radeon_add_atom_connector()
2364 struct drm_connector *connector; in radeon_add_legacy_connector() local
2372 /* if the user selected tv=0 don't try and add the connector */ in radeon_add_legacy_connector()
2380 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in radeon_add_legacy_connector()
2381 radeon_connector = to_radeon_connector(connector); in radeon_add_legacy_connector()
2392 connector = &radeon_connector->base; in radeon_add_legacy_connector()
2419 connector->interlace_allowed = true; in radeon_add_legacy_connector()
2420 connector->doublescan_allowed = true; in radeon_add_legacy_connector()
2441 connector->interlace_allowed = true; in radeon_add_legacy_connector()
2442 connector->doublescan_allowed = true; in radeon_add_legacy_connector()
2465 connector->interlace_allowed = true; in radeon_add_legacy_connector()
2467 connector->doublescan_allowed = true; in radeon_add_legacy_connector()
2469 connector->doublescan_allowed = false; in radeon_add_legacy_connector()
2495 connector->interlace_allowed = false; in radeon_add_legacy_connector()
2496 connector->doublescan_allowed = false; in radeon_add_legacy_connector()
2515 connector->interlace_allowed = false; in radeon_add_legacy_connector()
2516 connector->doublescan_allowed = false; in radeon_add_legacy_connector()
2522 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in radeon_add_legacy_connector()
2526 connector->polled = DRM_CONNECTOR_POLL_HPD; in radeon_add_legacy_connector()
2528 connector->display_info.subpixel_order = subpixel_order; in radeon_add_legacy_connector()
2529 drm_connector_register(connector); in radeon_add_legacy_connector()