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 (connector->display_info.is_hdmi) { 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 (connector->display_info.is_hdmi) { 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 connector->display_info.is_hdmi) { 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 (connector->display_info.is_hdmi) { 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()
204 connector->name); in radeon_get_monitor_bpc()
211 connector->name); in radeon_get_monitor_bpc()
216 connector->name, connector->display_info.bpc, bpc); in radeon_get_monitor_bpc()
222 radeon_connector_update_scratch_regs(struct drm_connector *connector, enum drm_connector_status sta… in radeon_connector_update_scratch_regs() argument
224 struct drm_device *dev = connector->dev; in radeon_connector_update_scratch_regs()
228 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_connector_update_scratch_regs()
231 best_encoder = connector_funcs->best_encoder(connector); in radeon_connector_update_scratch_regs()
233 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_connector_update_scratch_regs()
240 radeon_atombios_connected_scratch_regs(connector, encoder, connected); in radeon_connector_update_scratch_regs()
242 radeon_combios_connected_scratch_regs(connector, encoder, connected); in radeon_connector_update_scratch_regs()
246 static struct drm_encoder *radeon_find_encoder(struct drm_connector *connector, int encoder_type) in radeon_find_encoder() argument
250 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_find_encoder()
258 static void radeon_connector_get_edid(struct drm_connector *connector) in radeon_connector_get_edid() argument
260 struct drm_device *dev = connector->dev; in radeon_connector_get_edid()
262 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_get_edid()
271 if ((radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_connector_get_edid()
274 radeon_connector->edid = drm_get_edid(connector, in radeon_connector_get_edid()
276 } else if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) || in radeon_connector_get_edid()
277 (connector->connector_type == DRM_MODE_CONNECTOR_eDP)) { in radeon_connector_get_edid()
289 connector->connector_type == DRM_MODE_CONNECTOR_LVDS && in radeon_connector_get_edid()
307 if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) || in radeon_connector_get_edid()
308 (connector->connector_type == DRM_MODE_CONNECTOR_eDP))) in radeon_connector_get_edid()
317 static void radeon_connector_free_edid(struct drm_connector *connector) in radeon_connector_free_edid() argument
319 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_free_edid()
325 static int radeon_ddc_get_modes(struct drm_connector *connector) in radeon_ddc_get_modes() argument
327 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_ddc_get_modes()
331 drm_connector_update_edid_property(connector, radeon_connector->edid); in radeon_ddc_get_modes()
332 ret = drm_add_edid_modes(connector, radeon_connector->edid); in radeon_ddc_get_modes()
335 drm_connector_update_edid_property(connector, NULL); in radeon_ddc_get_modes()
339 static struct drm_encoder *radeon_best_single_encoder(struct drm_connector *connector) in radeon_best_single_encoder() argument
344 drm_connector_for_each_possible_encoder(connector, encoder) in radeon_best_single_encoder()
350 static void radeon_get_native_mode(struct drm_connector *connector) in radeon_get_native_mode() argument
352 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_get_native_mode()
360 if (!list_empty(&connector->probed_modes)) { in radeon_get_native_mode()
362 list_first_entry(&connector->probed_modes, in radeon_get_native_mode()
378 radeon_connector_analog_encoder_conflict_solve(struct drm_connector *connector, in radeon_connector_analog_encoder_conflict_solve() argument
383 struct drm_device *dev = connector->dev; in radeon_connector_analog_encoder_conflict_solve()
390 if (conflict == connector) in radeon_connector_analog_encoder_conflict_solve()
408 connector->name); in radeon_connector_analog_encoder_conflict_solve()
413 connector->name); in radeon_connector_analog_encoder_conflict_solve()
461 static void radeon_add_common_modes(struct drm_encoder *encoder, struct drm_connector *connector) in radeon_add_common_modes() argument
511 drm_mode_probed_add(connector, mode); in radeon_add_common_modes()
515 static int radeon_connector_set_property(struct drm_connector *connector, struct drm_property *prop… in radeon_connector_set_property() argument
518 struct drm_device *dev = connector->dev; in radeon_connector_set_property()
527 /* need to find digital encoder on connector */ in radeon_connector_set_property()
528 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
546 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_set_property()
547 /* need to find digital encoder on connector */ in radeon_connector_set_property()
548 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 /* need to find digital encoder on connector */ in radeon_connector_set_property()
577 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
590 /* need to find digital encoder on connector */ in radeon_connector_set_property()
591 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
604 /* need to find digital encoder on connector */ in radeon_connector_set_property()
605 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
618 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TVDAC); in radeon_connector_set_property()
620 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_DAC); in radeon_connector_set_property()
643 to_radeon_connector(connector); in radeon_connector_set_property()
654 /* need to find digital encoder on connector */ in radeon_connector_set_property()
655 encoder = radeon_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in radeon_connector_set_property()
680 if (connector->encoder) in radeon_connector_set_property()
681 radeon_encoder = to_radeon_encoder(connector->encoder); in radeon_connector_set_property()
683 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_connector_set_property()
684 radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); in radeon_connector_set_property()
707 if (connector->encoder) in radeon_connector_set_property()
708 radeon_encoder = to_radeon_encoder(connector->encoder); in radeon_connector_set_property()
710 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_connector_set_property()
711 radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); in radeon_connector_set_property()
719 if (connector->encoder && connector->encoder->crtc) { in radeon_connector_set_property()
720 struct drm_crtc *crtc = connector->encoder->crtc; in radeon_connector_set_property()
737 struct drm_connector *connector) in radeon_fixup_lvds_native_mode() argument
744 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in radeon_fixup_lvds_native_mode()
754 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in radeon_fixup_lvds_native_mode()
771 static int radeon_lvds_get_modes(struct drm_connector *connector) in radeon_lvds_get_modes() argument
777 radeon_connector_get_edid(connector); in radeon_lvds_get_modes()
778 ret = radeon_ddc_get_modes(connector); in radeon_lvds_get_modes()
780 encoder = radeon_best_single_encoder(connector); in radeon_lvds_get_modes()
782 radeon_fixup_lvds_native_mode(encoder, connector); in radeon_lvds_get_modes()
784 radeon_add_common_modes(encoder, connector); in radeon_lvds_get_modes()
789 encoder = radeon_best_single_encoder(connector); in radeon_lvds_get_modes()
797 drm_mode_probed_add(connector, mode); in radeon_lvds_get_modes()
799 connector->display_info.width_mm = mode->width_mm; in radeon_lvds_get_modes()
800 connector->display_info.height_mm = mode->height_mm; in radeon_lvds_get_modes()
802 radeon_add_common_modes(encoder, connector); in radeon_lvds_get_modes()
808 static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector, in radeon_lvds_mode_valid() argument
811 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_lvds_mode_valid()
839 radeon_lvds_detect(struct drm_connector *connector, bool force) in radeon_lvds_detect() argument
841 struct drm_device *dev = connector->dev; in radeon_lvds_detect()
843 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_lvds_detect()
844 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_lvds_detect()
849 r = pm_runtime_get_sync(connector->dev->dev); in radeon_lvds_detect()
851 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_lvds_detect()
871 radeon_connector_get_edid(connector); in radeon_lvds_detect()
876 radeon_connector_update_scratch_regs(connector, ret); in radeon_lvds_detect()
879 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_lvds_detect()
880 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_lvds_detect()
886 static void radeon_connector_unregister(struct drm_connector *connector) in radeon_connector_unregister() argument
888 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_unregister()
896 static void radeon_connector_destroy(struct drm_connector *connector) in radeon_connector_destroy() argument
898 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_destroy()
900 radeon_connector_free_edid(connector); in radeon_connector_destroy()
902 drm_connector_unregister(connector); in radeon_connector_destroy()
903 drm_connector_cleanup(connector); in radeon_connector_destroy()
904 kfree(connector); in radeon_connector_destroy()
907 static int radeon_lvds_set_property(struct drm_connector *connector, in radeon_lvds_set_property() argument
911 struct drm_device *dev = connector->dev; in radeon_lvds_set_property()
919 if (connector->encoder) in radeon_lvds_set_property()
920 radeon_encoder = to_radeon_encoder(connector->encoder); in radeon_lvds_set_property()
922 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in radeon_lvds_set_property()
923 radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector)); in radeon_lvds_set_property()
958 static int radeon_vga_get_modes(struct drm_connector *connector) in radeon_vga_get_modes() argument
962 radeon_connector_get_edid(connector); in radeon_vga_get_modes()
963 ret = radeon_ddc_get_modes(connector); in radeon_vga_get_modes()
965 radeon_get_native_mode(connector); in radeon_vga_get_modes()
970 static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector, in radeon_vga_mode_valid() argument
973 struct drm_device *dev = connector->dev; in radeon_vga_mode_valid()
985 radeon_vga_detect(struct drm_connector *connector, bool force) in radeon_vga_detect() argument
987 struct drm_device *dev = connector->dev; in radeon_vga_detect()
989 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_vga_detect()
997 r = pm_runtime_get_sync(connector->dev->dev); in radeon_vga_detect()
999 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_vga_detect()
1004 encoder = radeon_best_single_encoder(connector); in radeon_vga_detect()
1012 radeon_connector_free_edid(connector); in radeon_vga_detect()
1013 radeon_connector_get_edid(connector); in radeon_vga_detect()
1017 connector->name); in radeon_vga_detect()
1027 radeon_connector_free_edid(connector); in radeon_vga_detect()
1041 ret = connector->status; in radeon_vga_detect()
1047 ret = encoder_funcs->detect(encoder, connector); in radeon_vga_detect()
1054 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true); in radeon_vga_detect()
1066 radeon_connector_update_scratch_regs(connector, ret); in radeon_vga_detect()
1070 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_vga_detect()
1071 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_vga_detect()
1092 static int radeon_tv_get_modes(struct drm_connector *connector) in radeon_tv_get_modes() argument
1094 struct drm_device *dev = connector->dev; in radeon_tv_get_modes()
1099 encoder = radeon_best_single_encoder(connector); in radeon_tv_get_modes()
1106 radeon_add_common_modes(encoder, connector); in radeon_tv_get_modes()
1113 drm_mode_probed_add(connector, tv_mode); in radeon_tv_get_modes()
1118 static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector, in radeon_tv_mode_valid() argument
1127 radeon_tv_detect(struct drm_connector *connector, bool force) in radeon_tv_detect() argument
1131 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_tv_detect()
1139 r = pm_runtime_get_sync(connector->dev->dev); in radeon_tv_detect()
1141 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_tv_detect()
1146 encoder = radeon_best_single_encoder(connector); in radeon_tv_detect()
1151 ret = encoder_funcs->detect(encoder, connector); in radeon_tv_detect()
1154 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, false); in radeon_tv_detect()
1155 radeon_connector_update_scratch_regs(connector, ret); in radeon_tv_detect()
1158 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_tv_detect()
1159 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_tv_detect()
1180 static bool radeon_check_hpd_status_unchanged(struct drm_connector *connector) in radeon_check_hpd_status_unchanged() argument
1182 struct drm_device *dev = connector->dev; in radeon_check_hpd_status_unchanged()
1184 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_check_hpd_status_unchanged()
1194 if (connector->status == status) in radeon_check_hpd_status_unchanged()
1206 * we need to find the DAC encoder object for this connector.
1210 * if its shared we have to set the other connector to disconnected.
1213 radeon_dvi_detect(struct drm_connector *connector, bool force) in radeon_dvi_detect() argument
1215 struct drm_device *dev = connector->dev; in radeon_dvi_detect()
1217 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_detect()
1225 r = pm_runtime_get_sync(connector->dev->dev); in radeon_dvi_detect()
1227 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dvi_detect()
1237 if (!force && radeon_check_hpd_status_unchanged(connector)) { in radeon_dvi_detect()
1238 ret = connector->status; in radeon_dvi_detect()
1250 connector->status != connector_status_connected) { in radeon_dvi_detect()
1261 connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) { in radeon_dvi_detect()
1270 radeon_connector_free_edid(connector); in radeon_dvi_detect()
1271 radeon_connector_get_edid(connector); in radeon_dvi_detect()
1275 connector->name); in radeon_dvi_detect()
1282 connector->name); in radeon_dvi_detect()
1296 radeon_connector_free_edid(connector); in radeon_dvi_detect()
1310 if (connector == list_connector) in radeon_dvi_detect()
1320 radeon_connector_free_edid(connector); in radeon_dvi_detect()
1334 if ((connector->connector_type == DRM_MODE_CONNECTOR_DVID) || in radeon_dvi_detect()
1335 (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)) in radeon_dvi_detect()
1344 ret = connector->status; in radeon_dvi_detect()
1350 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_dvi_detect()
1360 ret = encoder_funcs->detect(encoder, connector); in radeon_dvi_detect()
1371 lret = encoder_funcs->detect(encoder, connector); in radeon_dvi_detect()
1383 ret = radeon_connector_analog_encoder_conflict_solve(connector, encoder, ret, true); in radeon_dvi_detect()
1401 radeon_connector_update_scratch_regs(connector, ret); in radeon_dvi_detect()
1405 connector->helper_private; in radeon_dvi_detect()
1407 encoder = connector_funcs->best_encoder(connector); in radeon_dvi_detect()
1409 radeon_connector_get_edid(connector); in radeon_dvi_detect()
1410 radeon_audio_detect(connector, encoder, ret); in radeon_dvi_detect()
1416 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_dvi_detect()
1417 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dvi_detect()
1424 static struct drm_encoder *radeon_dvi_encoder(struct drm_connector *connector) in radeon_dvi_encoder() argument
1426 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_encoder()
1429 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_dvi_encoder()
1444 drm_connector_for_each_possible_encoder(connector, encoder) in radeon_dvi_encoder()
1450 static void radeon_dvi_force(struct drm_connector *connector) in radeon_dvi_force() argument
1452 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_force()
1453 if (connector->force == DRM_FORCE_ON) in radeon_dvi_force()
1455 if (connector->force == DRM_FORCE_ON_DIGITAL) in radeon_dvi_force()
1459 static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector, in radeon_dvi_mode_valid() argument
1462 struct drm_device *dev = connector->dev; in radeon_dvi_mode_valid()
1464 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dvi_mode_valid()
1479 else if (ASIC_IS_DCE6(rdev) && connector->display_info.is_hdmi) { in radeon_dvi_mode_valid()
1513 static int radeon_dp_get_modes(struct drm_connector *connector) in radeon_dp_get_modes() argument
1515 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dp_get_modes()
1517 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_dp_get_modes()
1520 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in radeon_dp_get_modes()
1521 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in radeon_dp_get_modes()
1524 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { in radeon_dp_get_modes()
1526 atombios_set_edp_panel_power(connector, in radeon_dp_get_modes()
1528 radeon_connector_get_edid(connector); in radeon_dp_get_modes()
1529 ret = radeon_ddc_get_modes(connector); in radeon_dp_get_modes()
1531 atombios_set_edp_panel_power(connector, in radeon_dp_get_modes()
1535 if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_dp_get_modes()
1540 radeon_connector_get_edid(connector); in radeon_dp_get_modes()
1541 ret = radeon_ddc_get_modes(connector); in radeon_dp_get_modes()
1546 radeon_fixup_lvds_native_mode(encoder, connector); in radeon_dp_get_modes()
1548 radeon_add_common_modes(encoder, connector); in radeon_dp_get_modes()
1560 drm_mode_probed_add(connector, mode); in radeon_dp_get_modes()
1562 connector->display_info.width_mm = mode->width_mm; in radeon_dp_get_modes()
1563 connector->display_info.height_mm = mode->height_mm; in radeon_dp_get_modes()
1565 radeon_add_common_modes(encoder, connector); in radeon_dp_get_modes()
1569 if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_dp_get_modes()
1574 radeon_connector_get_edid(connector); in radeon_dp_get_modes()
1575 ret = radeon_ddc_get_modes(connector); in radeon_dp_get_modes()
1577 radeon_get_native_mode(connector); in radeon_dp_get_modes()
1583 u16 radeon_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector) in radeon_connector_encoder_get_dp_bridge_encoder_id() argument
1588 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_connector_encoder_get_dp_bridge_encoder_id()
1603 static bool radeon_connector_encoder_is_hbr2(struct drm_connector *connector) in radeon_connector_encoder_is_hbr2() argument
1609 drm_connector_for_each_possible_encoder(connector, encoder) { in radeon_connector_encoder_is_hbr2()
1618 bool radeon_connector_is_dp12_capable(struct drm_connector *connector) in radeon_connector_is_dp12_capable() argument
1620 struct drm_device *dev = connector->dev; in radeon_connector_is_dp12_capable()
1625 radeon_connector_encoder_is_hbr2(connector)) { in radeon_connector_is_dp12_capable()
1633 radeon_dp_detect(struct drm_connector *connector, bool force) in radeon_dp_detect() argument
1635 struct drm_device *dev = connector->dev; in radeon_dp_detect()
1637 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dp_detect()
1640 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_dp_detect()
1644 r = pm_runtime_get_sync(connector->dev->dev); in radeon_dp_detect()
1646 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dp_detect()
1651 if (!force && radeon_check_hpd_status_unchanged(connector)) { in radeon_dp_detect()
1652 ret = connector->status; in radeon_dp_detect()
1656 radeon_connector_free_edid(connector); in radeon_dp_detect()
1658 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in radeon_dp_detect()
1659 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in radeon_dp_detect()
1676 atombios_set_edp_panel_power(connector, in radeon_dp_detect()
1681 atombios_set_edp_panel_power(connector, in radeon_dp_detect()
1683 } else if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != in radeon_dp_detect()
1698 ret = encoder_funcs->detect(encoder, connector); in radeon_dp_detect()
1719 radeon_connector_update_scratch_regs(connector, ret); in radeon_dp_detect()
1722 radeon_connector_get_edid(connector); in radeon_dp_detect()
1723 radeon_audio_detect(connector, encoder, ret); in radeon_dp_detect()
1728 pm_runtime_mark_last_busy(connector->dev->dev); in radeon_dp_detect()
1729 pm_runtime_put_autosuspend(connector->dev->dev); in radeon_dp_detect()
1735 static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector, in radeon_dp_mode_valid() argument
1738 struct drm_device *dev = connector->dev; in radeon_dp_mode_valid()
1740 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_dp_mode_valid()
1745 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in radeon_dp_mode_valid()
1746 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in radeon_dp_mode_valid()
1747 struct drm_encoder *encoder = radeon_best_single_encoder(connector); in radeon_dp_mode_valid()
1773 return radeon_dp_mode_valid_helper(connector, mode); in radeon_dp_mode_valid()
1775 if (ASIC_IS_DCE6(rdev) && connector->display_info.is_hdmi) { in radeon_dp_mode_valid()
1790 radeon_connector_late_register(struct drm_connector *connector) in radeon_connector_late_register() argument
1792 struct radeon_connector *radeon_connector = to_radeon_connector(connector); in radeon_connector_late_register()
1854 struct drm_connector *connector; in radeon_add_atom_connector() local
1868 /* if the user selected tv=0 don't try and add the connector */ in radeon_add_atom_connector()
1876 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in radeon_add_atom_connector()
1877 radeon_connector = to_radeon_connector(connector); in radeon_add_atom_connector()
1914 connector = &radeon_connector->base; in radeon_add_atom_connector()
1954 connector->interlace_allowed = true; in radeon_add_atom_connector()
1955 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2009 connector->interlace_allowed = true; in radeon_add_atom_connector()
2011 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2013 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2033 connector->interlace_allowed = false; in radeon_add_atom_connector()
2034 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2066 connector->interlace_allowed = true; in radeon_add_atom_connector()
2067 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2096 connector->interlace_allowed = true; in radeon_add_atom_connector()
2097 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2155 connector->interlace_allowed = true; in radeon_add_atom_connector()
2157 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2159 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2211 connector->interlace_allowed = true; in radeon_add_atom_connector()
2213 connector->doublescan_allowed = true; in radeon_add_atom_connector()
2215 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2268 connector->interlace_allowed = true; in radeon_add_atom_connector()
2270 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2296 connector->interlace_allowed = false; in radeon_add_atom_connector()
2297 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2316 connector->interlace_allowed = false; in radeon_add_atom_connector()
2317 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2341 connector->interlace_allowed = false; in radeon_add_atom_connector()
2342 connector->doublescan_allowed = false; in radeon_add_atom_connector()
2349 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in radeon_add_atom_connector()
2353 connector->polled = DRM_CONNECTOR_POLL_HPD; in radeon_add_atom_connector()
2355 connector->display_info.subpixel_order = subpixel_order; in radeon_add_atom_connector()
2356 drm_connector_register(connector); in radeon_add_atom_connector()
2364 drm_connector_cleanup(connector); in radeon_add_atom_connector()
2365 kfree(connector); in radeon_add_atom_connector()
2378 struct drm_connector *connector; in radeon_add_legacy_connector() local
2386 /* if the user selected tv=0 don't try and add the connector */ in radeon_add_legacy_connector()
2394 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in radeon_add_legacy_connector()
2395 radeon_connector = to_radeon_connector(connector); in radeon_add_legacy_connector()
2406 connector = &radeon_connector->base; in radeon_add_legacy_connector()
2433 connector->interlace_allowed = true; in radeon_add_legacy_connector()
2434 connector->doublescan_allowed = true; in radeon_add_legacy_connector()
2455 connector->interlace_allowed = true; in radeon_add_legacy_connector()
2456 connector->doublescan_allowed = true; in radeon_add_legacy_connector()
2479 connector->interlace_allowed = true; in radeon_add_legacy_connector()
2481 connector->doublescan_allowed = true; in radeon_add_legacy_connector()
2483 connector->doublescan_allowed = false; in radeon_add_legacy_connector()
2509 connector->interlace_allowed = false; in radeon_add_legacy_connector()
2510 connector->doublescan_allowed = false; in radeon_add_legacy_connector()
2529 connector->interlace_allowed = false; in radeon_add_legacy_connector()
2530 connector->doublescan_allowed = false; in radeon_add_legacy_connector()
2536 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in radeon_add_legacy_connector()
2540 connector->polled = DRM_CONNECTOR_POLL_HPD; in radeon_add_legacy_connector()
2542 connector->display_info.subpixel_order = subpixel_order; in radeon_add_legacy_connector()
2543 drm_connector_register(connector); in radeon_add_legacy_connector()