Lines Matching full:connector

43 void amdgpu_connector_hotplug(struct drm_connector *connector)  in amdgpu_connector_hotplug()  argument
45 struct drm_device *dev = connector->dev; in amdgpu_connector_hotplug()
47 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_hotplug()
49 /* bail if the connector does not have hpd pin, e.g., in amdgpu_connector_hotplug()
57 /* if the connector is already off, don't turn it back on */ in amdgpu_connector_hotplug()
58 if (connector->dpms != DRM_MODE_DPMS_ON) in amdgpu_connector_hotplug()
62 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in amdgpu_connector_hotplug()
82 /* Turn the connector off and back on immediately, which in amdgpu_connector_hotplug()
85 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); in amdgpu_connector_hotplug()
86 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); in amdgpu_connector_hotplug()
101 int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) in amdgpu_connector_get_monitor_bpc() argument
103 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_get_monitor_bpc()
108 switch (connector->connector_type) { in amdgpu_connector_get_monitor_bpc()
112 if (connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
113 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
114 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
120 if (connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
121 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
122 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
129 connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
130 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
131 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
136 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
137 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
140 connector->helper_private; in amdgpu_connector_get_monitor_bpc()
141 struct drm_encoder *encoder = connector_funcs->best_encoder(connector); in amdgpu_connector_get_monitor_bpc()
153 if (connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
162 connector->name, bpc); in amdgpu_connector_get_monitor_bpc()
167 if (connector->display_info.max_tmds_clock > 0) { in amdgpu_connector_get_monitor_bpc()
168 /* mode_clock is clock in kHz for mode to be modeset on this connector */ in amdgpu_connector_get_monitor_bpc()
172 max_tmds_clock = connector->display_info.max_tmds_clock; in amdgpu_connector_get_monitor_bpc()
175 connector->name, mode_clock, max_tmds_clock); in amdgpu_connector_get_monitor_bpc()
179 if ((connector->display_info.edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30) && in amdgpu_connector_get_monitor_bpc()
186 connector->name, bpc); in amdgpu_connector_get_monitor_bpc()
192 connector->name, bpc); in amdgpu_connector_get_monitor_bpc()
197 connector->name); in amdgpu_connector_get_monitor_bpc()
204 connector->name); in amdgpu_connector_get_monitor_bpc()
209 connector->name, connector->display_info.bpc, bpc); in amdgpu_connector_get_monitor_bpc()
215 amdgpu_connector_update_scratch_regs(struct drm_connector *connector, in amdgpu_connector_update_scratch_regs() argument
220 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_update_scratch_regs()
223 best_encoder = connector_funcs->best_encoder(connector); in amdgpu_connector_update_scratch_regs()
225 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_update_scratch_regs()
231 amdgpu_atombios_encoder_set_bios_scratch_regs(connector, encoder, connected); in amdgpu_connector_update_scratch_regs()
236 amdgpu_connector_find_encoder(struct drm_connector *connector, in amdgpu_connector_find_encoder() argument
241 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_find_encoder()
255 static void amdgpu_connector_get_edid(struct drm_connector *connector) in amdgpu_connector_get_edid() argument
257 struct drm_device *dev = connector->dev; in amdgpu_connector_get_edid()
259 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_get_edid()
268 if ((amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_get_edid()
271 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
273 } else if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) || in amdgpu_connector_get_edid()
274 (connector->connector_type == DRM_MODE_CONNECTOR_eDP)) { in amdgpu_connector_get_edid()
280 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
283 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
286 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
292 if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) || in amdgpu_connector_get_edid()
293 (connector->connector_type == DRM_MODE_CONNECTOR_eDP))) { in amdgpu_connector_get_edid()
295 drm_connector_update_edid_property(connector, amdgpu_connector->edid); in amdgpu_connector_get_edid()
300 static void amdgpu_connector_free_edid(struct drm_connector *connector) in amdgpu_connector_free_edid() argument
302 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_free_edid()
308 static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector) in amdgpu_connector_ddc_get_modes() argument
310 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_ddc_get_modes()
314 drm_connector_update_edid_property(connector, amdgpu_connector->edid); in amdgpu_connector_ddc_get_modes()
315 ret = drm_add_edid_modes(connector, amdgpu_connector->edid); in amdgpu_connector_ddc_get_modes()
318 drm_connector_update_edid_property(connector, NULL); in amdgpu_connector_ddc_get_modes()
323 amdgpu_connector_best_single_encoder(struct drm_connector *connector) in amdgpu_connector_best_single_encoder() argument
328 drm_connector_for_each_possible_encoder(connector, encoder) in amdgpu_connector_best_single_encoder()
334 static void amdgpu_get_native_mode(struct drm_connector *connector) in amdgpu_get_native_mode() argument
336 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_get_native_mode()
344 if (!list_empty(&connector->probed_modes)) { in amdgpu_get_native_mode()
346 list_first_entry(&connector->probed_modes, in amdgpu_get_native_mode()
394 struct drm_connector *connector) in amdgpu_connector_add_common_modes() argument
444 drm_mode_probed_add(connector, mode); in amdgpu_connector_add_common_modes()
448 static int amdgpu_connector_set_property(struct drm_connector *connector, in amdgpu_connector_set_property() argument
452 struct drm_device *dev = connector->dev; in amdgpu_connector_set_property()
461 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
462 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
480 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_set_property()
481 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
482 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
495 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_set_property()
496 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
497 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
510 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
511 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
524 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
525 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
538 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
539 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
553 to_amdgpu_connector(connector); in amdgpu_connector_set_property()
564 if (connector->encoder) { in amdgpu_connector_set_property()
565 amdgpu_encoder = to_amdgpu_encoder(connector->encoder); in amdgpu_connector_set_property()
567 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_set_property()
569 amdgpu_encoder = to_amdgpu_encoder(connector_funcs->best_encoder(connector)); in amdgpu_connector_set_property()
605 struct drm_connector *connector) in amdgpu_connector_fixup_lcd_native_mode() argument
612 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in amdgpu_connector_fixup_lcd_native_mode()
622 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in amdgpu_connector_fixup_lcd_native_mode()
639 static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector) in amdgpu_connector_lvds_get_modes() argument
645 amdgpu_connector_get_edid(connector); in amdgpu_connector_lvds_get_modes()
646 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_lvds_get_modes()
648 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_get_modes()
650 amdgpu_connector_fixup_lcd_native_mode(encoder, connector); in amdgpu_connector_lvds_get_modes()
652 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_lvds_get_modes()
657 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_get_modes()
665 drm_mode_probed_add(connector, mode); in amdgpu_connector_lvds_get_modes()
667 connector->display_info.width_mm = mode->width_mm; in amdgpu_connector_lvds_get_modes()
668 connector->display_info.height_mm = mode->height_mm; in amdgpu_connector_lvds_get_modes()
670 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_lvds_get_modes()
676 static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector, in amdgpu_connector_lvds_mode_valid() argument
679 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_mode_valid()
707 amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force) in amdgpu_connector_lvds_detect() argument
709 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_lvds_detect()
710 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_detect()
715 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_lvds_detect()
717 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_lvds_detect()
733 amdgpu_connector_get_edid(connector); in amdgpu_connector_lvds_detect()
738 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_lvds_detect()
741 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_lvds_detect()
742 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_lvds_detect()
748 static void amdgpu_connector_unregister(struct drm_connector *connector) in amdgpu_connector_unregister() argument
750 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_unregister()
758 static void amdgpu_connector_destroy(struct drm_connector *connector) in amdgpu_connector_destroy() argument
760 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_destroy()
762 amdgpu_connector_free_edid(connector); in amdgpu_connector_destroy()
764 drm_connector_unregister(connector); in amdgpu_connector_destroy()
765 drm_connector_cleanup(connector); in amdgpu_connector_destroy()
766 kfree(connector); in amdgpu_connector_destroy()
769 static int amdgpu_connector_set_lcd_property(struct drm_connector *connector, in amdgpu_connector_set_lcd_property() argument
773 struct drm_device *dev = connector->dev; in amdgpu_connector_set_lcd_property()
781 if (connector->encoder) in amdgpu_connector_set_lcd_property()
782 amdgpu_encoder = to_amdgpu_encoder(connector->encoder); in amdgpu_connector_set_lcd_property()
784 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_set_lcd_property()
786 amdgpu_encoder = to_amdgpu_encoder(connector_funcs->best_encoder(connector)); in amdgpu_connector_set_lcd_property()
830 static int amdgpu_connector_vga_get_modes(struct drm_connector *connector) in amdgpu_connector_vga_get_modes() argument
834 amdgpu_connector_get_edid(connector); in amdgpu_connector_vga_get_modes()
835 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_vga_get_modes()
836 amdgpu_get_native_mode(connector); in amdgpu_connector_vga_get_modes()
841 static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector, in amdgpu_connector_vga_mode_valid() argument
844 struct drm_device *dev = connector->dev; in amdgpu_connector_vga_mode_valid()
856 amdgpu_connector_vga_detect(struct drm_connector *connector, bool force) in amdgpu_connector_vga_detect() argument
858 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_vga_detect()
866 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_vga_detect()
868 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_vga_detect()
873 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_vga_detect()
881 amdgpu_connector_free_edid(connector); in amdgpu_connector_vga_detect()
882 amdgpu_connector_get_edid(connector); in amdgpu_connector_vga_detect()
886 connector->name); in amdgpu_connector_vga_detect()
896 amdgpu_connector_free_edid(connector); in amdgpu_connector_vga_detect()
910 ret = connector->status; in amdgpu_connector_vga_detect()
916 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_vga_detect()
922 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_vga_detect()
926 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_vga_detect()
927 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_vga_detect()
949 amdgpu_connector_check_hpd_status_unchanged(struct drm_connector *connector) in amdgpu_connector_check_hpd_status_unchanged() argument
951 struct drm_device *dev = connector->dev; in amdgpu_connector_check_hpd_status_unchanged()
953 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_check_hpd_status_unchanged()
961 if (connector->status == status) in amdgpu_connector_check_hpd_status_unchanged()
969 struct drm_connector *connector, in amdgpu_connector_shared_ddc() argument
975 struct drm_device *dev = connector->dev; in amdgpu_connector_shared_ddc()
982 if (connector == list_connector) in amdgpu_connector_shared_ddc()
993 amdgpu_connector_free_edid(connector); in amdgpu_connector_shared_ddc()
1008 * we need to find the DAC encoder object for this connector.
1012 * if its shared we have to set the other connector to disconnected.
1015 amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force) in amdgpu_connector_dvi_detect() argument
1017 struct drm_device *dev = connector->dev; in amdgpu_connector_dvi_detect()
1019 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_detect()
1026 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_dvi_detect()
1028 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dvi_detect()
1038 if (!force && amdgpu_connector_check_hpd_status_unchanged(connector)) { in amdgpu_connector_dvi_detect()
1039 ret = connector->status; in amdgpu_connector_dvi_detect()
1062 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1063 amdgpu_connector_get_edid(connector); in amdgpu_connector_dvi_detect()
1067 connector->name); in amdgpu_connector_dvi_detect()
1078 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1089 amdgpu_connector_shared_ddc(&ret, connector, amdgpu_connector); in amdgpu_connector_dvi_detect()
1097 if ((connector->connector_type == DRM_MODE_CONNECTOR_DVID) || in amdgpu_connector_dvi_detect()
1098 (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)) in amdgpu_connector_dvi_detect()
1107 ret = connector->status; in amdgpu_connector_dvi_detect()
1115 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_dvi_detect()
1125 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dvi_detect()
1136 lret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dvi_detect()
1149 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_dvi_detect()
1153 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_dvi_detect()
1154 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dvi_detect()
1162 amdgpu_connector_dvi_encoder(struct drm_connector *connector) in amdgpu_connector_dvi_encoder() argument
1164 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_encoder()
1167 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_dvi_encoder()
1182 drm_connector_for_each_possible_encoder(connector, encoder) in amdgpu_connector_dvi_encoder()
1188 static void amdgpu_connector_dvi_force(struct drm_connector *connector) in amdgpu_connector_dvi_force() argument
1190 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_force()
1192 if (connector->force == DRM_FORCE_ON) in amdgpu_connector_dvi_force()
1194 if (connector->force == DRM_FORCE_ON_DIGITAL) in amdgpu_connector_dvi_force()
1198 static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector, in amdgpu_connector_dvi_mode_valid() argument
1201 struct drm_device *dev = connector->dev; in amdgpu_connector_dvi_mode_valid()
1203 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_mode_valid()
1212 } else if (connector->display_info.is_hdmi) { in amdgpu_connector_dvi_mode_valid()
1246 static int amdgpu_connector_dp_get_modes(struct drm_connector *connector) in amdgpu_connector_dp_get_modes() argument
1248 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_get_modes()
1250 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_get_modes()
1253 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_get_modes()
1254 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_get_modes()
1257 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { in amdgpu_connector_dp_get_modes()
1259 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_get_modes()
1261 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1262 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1264 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_get_modes()
1268 if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_get_modes()
1273 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1274 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1279 amdgpu_connector_fixup_lcd_native_mode(encoder, connector); in amdgpu_connector_dp_get_modes()
1281 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_dp_get_modes()
1293 drm_mode_probed_add(connector, mode); in amdgpu_connector_dp_get_modes()
1295 connector->display_info.width_mm = mode->width_mm; in amdgpu_connector_dp_get_modes()
1296 connector->display_info.height_mm = mode->height_mm; in amdgpu_connector_dp_get_modes()
1298 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_dp_get_modes()
1302 if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_get_modes()
1307 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1308 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1310 amdgpu_get_native_mode(connector); in amdgpu_connector_dp_get_modes()
1316 u16 amdgpu_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector) in amdgpu_connector_encoder_get_dp_bridge_encoder_id() argument
1321 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_encoder_get_dp_bridge_encoder_id()
1336 static bool amdgpu_connector_encoder_is_hbr2(struct drm_connector *connector) in amdgpu_connector_encoder_is_hbr2() argument
1342 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_encoder_is_hbr2()
1351 bool amdgpu_connector_is_dp12_capable(struct drm_connector *connector) in amdgpu_connector_is_dp12_capable() argument
1353 struct drm_device *dev = connector->dev; in amdgpu_connector_is_dp12_capable()
1357 amdgpu_connector_encoder_is_hbr2(connector)) { in amdgpu_connector_is_dp12_capable()
1365 amdgpu_connector_dp_detect(struct drm_connector *connector, bool force) in amdgpu_connector_dp_detect() argument
1367 struct drm_device *dev = connector->dev; in amdgpu_connector_dp_detect()
1369 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_detect()
1372 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_detect()
1376 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_dp_detect()
1378 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dp_detect()
1383 if (!force && amdgpu_connector_check_hpd_status_unchanged(connector)) { in amdgpu_connector_dp_detect()
1384 ret = connector->status; in amdgpu_connector_dp_detect()
1388 amdgpu_connector_free_edid(connector); in amdgpu_connector_dp_detect()
1390 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_detect()
1391 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_detect()
1403 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_detect()
1408 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_detect()
1410 } else if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_detect()
1427 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dp_detect()
1450 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_dp_detect()
1453 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_dp_detect()
1454 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dp_detect()
1457 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort || in amdgpu_connector_dp_detect()
1458 connector->connector_type == DRM_MODE_CONNECTOR_eDP) in amdgpu_connector_dp_detect()
1466 static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector, in amdgpu_connector_dp_mode_valid() argument
1469 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_mode_valid()
1474 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_mode_valid()
1475 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_mode_valid()
1476 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_mode_valid()
1503 return amdgpu_atombios_dp_mode_valid_helper(connector, mode); in amdgpu_connector_dp_mode_valid()
1505 if (connector->display_info.is_hdmi) { in amdgpu_connector_dp_mode_valid()
1520 amdgpu_connector_late_register(struct drm_connector *connector) in amdgpu_connector_late_register() argument
1522 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_late_register()
1572 struct drm_connector *connector; in amdgpu_connector_add() local
1589 drm_for_each_connector_iter(connector, &iter) { in amdgpu_connector_add()
1590 amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_add()
1629 connector = &amdgpu_connector->base; in amdgpu_connector_add()
1668 connector->interlace_allowed = true; in amdgpu_connector_add()
1669 connector->doublescan_allowed = true; in amdgpu_connector_add()
1715 connector->interlace_allowed = true; in amdgpu_connector_add()
1717 connector->doublescan_allowed = true; in amdgpu_connector_add()
1719 connector->doublescan_allowed = false; in amdgpu_connector_add()
1739 connector->interlace_allowed = false; in amdgpu_connector_add()
1740 connector->doublescan_allowed = false; in amdgpu_connector_add()
1767 connector->interlace_allowed = true; in amdgpu_connector_add()
1768 connector->doublescan_allowed = true; in amdgpu_connector_add()
1792 connector->interlace_allowed = true; in amdgpu_connector_add()
1793 connector->doublescan_allowed = true; in amdgpu_connector_add()
1845 connector->interlace_allowed = true; in amdgpu_connector_add()
1847 connector->doublescan_allowed = true; in amdgpu_connector_add()
1849 connector->doublescan_allowed = false; in amdgpu_connector_add()
1894 connector->interlace_allowed = true; in amdgpu_connector_add()
1896 connector->doublescan_allowed = true; in amdgpu_connector_add()
1898 connector->doublescan_allowed = false; in amdgpu_connector_add()
1944 connector->interlace_allowed = true; in amdgpu_connector_add()
1946 connector->doublescan_allowed = false; in amdgpu_connector_add()
1971 connector->interlace_allowed = false; in amdgpu_connector_add()
1972 connector->doublescan_allowed = false; in amdgpu_connector_add()
1995 connector->interlace_allowed = false; in amdgpu_connector_add()
1996 connector->doublescan_allowed = false; in amdgpu_connector_add()
2003 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in amdgpu_connector_add()
2007 connector->polled = DRM_CONNECTOR_POLL_HPD; in amdgpu_connector_add()
2009 connector->display_info.subpixel_order = subpixel_order; in amdgpu_connector_add()
2022 drm_connector_cleanup(connector); in amdgpu_connector_add()
2023 kfree(connector); in amdgpu_connector_add()