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()
249 struct edid *amdgpu_connector_edid(struct drm_connector *connector) in amdgpu_connector_edid() argument
251 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_edid()
252 struct drm_property_blob *edid_blob = connector->edid_blob_ptr; in amdgpu_connector_edid()
281 static void amdgpu_connector_get_edid(struct drm_connector *connector) in amdgpu_connector_get_edid() argument
283 struct drm_device *dev = connector->dev; in amdgpu_connector_get_edid()
285 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_get_edid()
294 if ((amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_get_edid()
297 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
299 } else if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) || in amdgpu_connector_get_edid()
300 (connector->connector_type == DRM_MODE_CONNECTOR_eDP)) { in amdgpu_connector_get_edid()
306 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
309 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
312 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
318 if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) || in amdgpu_connector_get_edid()
319 (connector->connector_type == DRM_MODE_CONNECTOR_eDP))) { in amdgpu_connector_get_edid()
321 drm_connector_update_edid_property(connector, amdgpu_connector->edid); in amdgpu_connector_get_edid()
326 static void amdgpu_connector_free_edid(struct drm_connector *connector) in amdgpu_connector_free_edid() argument
328 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_free_edid()
334 static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector) in amdgpu_connector_ddc_get_modes() argument
336 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_ddc_get_modes()
340 drm_connector_update_edid_property(connector, amdgpu_connector->edid); in amdgpu_connector_ddc_get_modes()
341 ret = drm_add_edid_modes(connector, amdgpu_connector->edid); in amdgpu_connector_ddc_get_modes()
344 drm_connector_update_edid_property(connector, NULL); in amdgpu_connector_ddc_get_modes()
349 amdgpu_connector_best_single_encoder(struct drm_connector *connector) in amdgpu_connector_best_single_encoder() argument
354 drm_connector_for_each_possible_encoder(connector, encoder) in amdgpu_connector_best_single_encoder()
360 static void amdgpu_get_native_mode(struct drm_connector *connector) in amdgpu_get_native_mode() argument
362 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_get_native_mode()
370 if (!list_empty(&connector->probed_modes)) { in amdgpu_get_native_mode()
372 list_first_entry(&connector->probed_modes, in amdgpu_get_native_mode()
420 struct drm_connector *connector) in amdgpu_connector_add_common_modes() argument
467 drm_mode_probed_add(connector, mode); in amdgpu_connector_add_common_modes()
471 static int amdgpu_connector_set_property(struct drm_connector *connector, in amdgpu_connector_set_property() argument
475 struct drm_device *dev = connector->dev; in amdgpu_connector_set_property()
484 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
485 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
503 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_set_property()
504 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
505 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
518 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_set_property()
519 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
520 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
533 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
534 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
547 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
548 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
561 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
562 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
576 to_amdgpu_connector(connector); in amdgpu_connector_set_property()
587 if (connector->encoder) { in amdgpu_connector_set_property()
588 amdgpu_encoder = to_amdgpu_encoder(connector->encoder); in amdgpu_connector_set_property()
590 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_set_property()
591 amdgpu_encoder = to_amdgpu_encoder(connector_funcs->best_encoder(connector)); in amdgpu_connector_set_property()
627 struct drm_connector *connector) in amdgpu_connector_fixup_lcd_native_mode() argument
634 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in amdgpu_connector_fixup_lcd_native_mode()
644 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in amdgpu_connector_fixup_lcd_native_mode()
661 static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector) in amdgpu_connector_lvds_get_modes() argument
667 amdgpu_connector_get_edid(connector); in amdgpu_connector_lvds_get_modes()
668 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_lvds_get_modes()
670 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_get_modes()
672 amdgpu_connector_fixup_lcd_native_mode(encoder, connector); in amdgpu_connector_lvds_get_modes()
674 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_lvds_get_modes()
679 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_get_modes()
687 drm_mode_probed_add(connector, mode); in amdgpu_connector_lvds_get_modes()
689 connector->display_info.width_mm = mode->width_mm; in amdgpu_connector_lvds_get_modes()
690 connector->display_info.height_mm = mode->height_mm; in amdgpu_connector_lvds_get_modes()
692 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_lvds_get_modes()
698 static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector, in amdgpu_connector_lvds_mode_valid() argument
701 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_mode_valid()
729 amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force) in amdgpu_connector_lvds_detect() argument
731 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_lvds_detect()
732 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_detect()
737 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_lvds_detect()
739 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_lvds_detect()
755 amdgpu_connector_get_edid(connector); in amdgpu_connector_lvds_detect()
760 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_lvds_detect()
763 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_lvds_detect()
764 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_lvds_detect()
770 static void amdgpu_connector_unregister(struct drm_connector *connector) in amdgpu_connector_unregister() argument
772 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_unregister()
780 static void amdgpu_connector_destroy(struct drm_connector *connector) in amdgpu_connector_destroy() argument
782 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_destroy()
784 amdgpu_connector_free_edid(connector); in amdgpu_connector_destroy()
786 drm_connector_unregister(connector); in amdgpu_connector_destroy()
787 drm_connector_cleanup(connector); in amdgpu_connector_destroy()
788 kfree(connector); in amdgpu_connector_destroy()
791 static int amdgpu_connector_set_lcd_property(struct drm_connector *connector, in amdgpu_connector_set_lcd_property() argument
795 struct drm_device *dev = connector->dev; in amdgpu_connector_set_lcd_property()
803 if (connector->encoder) in amdgpu_connector_set_lcd_property()
804 amdgpu_encoder = to_amdgpu_encoder(connector->encoder); in amdgpu_connector_set_lcd_property()
806 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_set_lcd_property()
807 amdgpu_encoder = to_amdgpu_encoder(connector_funcs->best_encoder(connector)); in amdgpu_connector_set_lcd_property()
851 static int amdgpu_connector_vga_get_modes(struct drm_connector *connector) in amdgpu_connector_vga_get_modes() argument
855 amdgpu_connector_get_edid(connector); in amdgpu_connector_vga_get_modes()
856 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_vga_get_modes()
857 amdgpu_get_native_mode(connector); in amdgpu_connector_vga_get_modes()
862 static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector, in amdgpu_connector_vga_mode_valid() argument
865 struct drm_device *dev = connector->dev; in amdgpu_connector_vga_mode_valid()
877 amdgpu_connector_vga_detect(struct drm_connector *connector, bool force) in amdgpu_connector_vga_detect() argument
879 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_vga_detect()
887 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_vga_detect()
889 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_vga_detect()
894 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_vga_detect()
902 amdgpu_connector_free_edid(connector); in amdgpu_connector_vga_detect()
903 amdgpu_connector_get_edid(connector); in amdgpu_connector_vga_detect()
907 connector->name); in amdgpu_connector_vga_detect()
917 amdgpu_connector_free_edid(connector); in amdgpu_connector_vga_detect()
931 ret = connector->status; in amdgpu_connector_vga_detect()
937 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_vga_detect()
943 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_vga_detect()
947 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_vga_detect()
948 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_vga_detect()
970 amdgpu_connector_check_hpd_status_unchanged(struct drm_connector *connector) in amdgpu_connector_check_hpd_status_unchanged() argument
972 struct drm_device *dev = connector->dev; in amdgpu_connector_check_hpd_status_unchanged()
974 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_check_hpd_status_unchanged()
982 if (connector->status == status) in amdgpu_connector_check_hpd_status_unchanged()
994 * we need to find the DAC encoder object for this connector.
998 * if its shared we have to set the other connector to disconnected.
1001 amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force) in amdgpu_connector_dvi_detect() argument
1003 struct drm_device *dev = connector->dev; in amdgpu_connector_dvi_detect()
1005 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_detect()
1012 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_dvi_detect()
1014 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dvi_detect()
1024 if (!force && amdgpu_connector_check_hpd_status_unchanged(connector)) { in amdgpu_connector_dvi_detect()
1025 ret = connector->status; in amdgpu_connector_dvi_detect()
1048 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1049 amdgpu_connector_get_edid(connector); in amdgpu_connector_dvi_detect()
1053 connector->name); in amdgpu_connector_dvi_detect()
1064 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1083 if (connector == list_connector) in amdgpu_connector_dvi_detect()
1093 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1108 if ((connector->connector_type == DRM_MODE_CONNECTOR_DVID) || in amdgpu_connector_dvi_detect()
1109 (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)) in amdgpu_connector_dvi_detect()
1118 ret = connector->status; in amdgpu_connector_dvi_detect()
1126 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_dvi_detect()
1136 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dvi_detect()
1147 lret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dvi_detect()
1160 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_dvi_detect()
1164 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_dvi_detect()
1165 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dvi_detect()
1173 amdgpu_connector_dvi_encoder(struct drm_connector *connector) in amdgpu_connector_dvi_encoder() argument
1175 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_encoder()
1178 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_dvi_encoder()
1193 drm_connector_for_each_possible_encoder(connector, encoder) in amdgpu_connector_dvi_encoder()
1199 static void amdgpu_connector_dvi_force(struct drm_connector *connector) in amdgpu_connector_dvi_force() argument
1201 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_force()
1202 if (connector->force == DRM_FORCE_ON) in amdgpu_connector_dvi_force()
1204 if (connector->force == DRM_FORCE_ON_DIGITAL) in amdgpu_connector_dvi_force()
1208 static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector, in amdgpu_connector_dvi_mode_valid() argument
1211 struct drm_device *dev = connector->dev; in amdgpu_connector_dvi_mode_valid()
1213 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_mode_valid()
1222 } else if (connector->display_info.is_hdmi) { in amdgpu_connector_dvi_mode_valid()
1256 static int amdgpu_connector_dp_get_modes(struct drm_connector *connector) in amdgpu_connector_dp_get_modes() argument
1258 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_get_modes()
1260 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_get_modes()
1263 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_get_modes()
1264 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_get_modes()
1267 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { in amdgpu_connector_dp_get_modes()
1269 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_get_modes()
1271 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1272 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1274 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_get_modes()
1278 if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_get_modes()
1283 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1284 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1289 amdgpu_connector_fixup_lcd_native_mode(encoder, connector); in amdgpu_connector_dp_get_modes()
1291 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_dp_get_modes()
1303 drm_mode_probed_add(connector, mode); in amdgpu_connector_dp_get_modes()
1305 connector->display_info.width_mm = mode->width_mm; in amdgpu_connector_dp_get_modes()
1306 connector->display_info.height_mm = mode->height_mm; in amdgpu_connector_dp_get_modes()
1308 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_dp_get_modes()
1312 if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_get_modes()
1317 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1318 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1320 amdgpu_get_native_mode(connector); in amdgpu_connector_dp_get_modes()
1326 u16 amdgpu_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector) in amdgpu_connector_encoder_get_dp_bridge_encoder_id() argument
1331 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_encoder_get_dp_bridge_encoder_id()
1346 static bool amdgpu_connector_encoder_is_hbr2(struct drm_connector *connector) in amdgpu_connector_encoder_is_hbr2() argument
1352 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_encoder_is_hbr2()
1361 bool amdgpu_connector_is_dp12_capable(struct drm_connector *connector) in amdgpu_connector_is_dp12_capable() argument
1363 struct drm_device *dev = connector->dev; in amdgpu_connector_is_dp12_capable()
1367 amdgpu_connector_encoder_is_hbr2(connector)) { in amdgpu_connector_is_dp12_capable()
1375 amdgpu_connector_dp_detect(struct drm_connector *connector, bool force) in amdgpu_connector_dp_detect() argument
1377 struct drm_device *dev = connector->dev; in amdgpu_connector_dp_detect()
1379 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_detect()
1382 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_detect()
1386 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_dp_detect()
1388 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dp_detect()
1393 if (!force && amdgpu_connector_check_hpd_status_unchanged(connector)) { in amdgpu_connector_dp_detect()
1394 ret = connector->status; in amdgpu_connector_dp_detect()
1398 amdgpu_connector_free_edid(connector); in amdgpu_connector_dp_detect()
1400 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_detect()
1401 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_detect()
1413 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_detect()
1418 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_detect()
1420 } else if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_detect()
1436 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dp_detect()
1459 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_dp_detect()
1462 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_dp_detect()
1463 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dp_detect()
1466 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort || in amdgpu_connector_dp_detect()
1467 connector->connector_type == DRM_MODE_CONNECTOR_eDP) in amdgpu_connector_dp_detect()
1475 static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector, in amdgpu_connector_dp_mode_valid() argument
1478 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_mode_valid()
1483 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_mode_valid()
1484 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_mode_valid()
1485 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_mode_valid()
1512 return amdgpu_atombios_dp_mode_valid_helper(connector, mode); in amdgpu_connector_dp_mode_valid()
1514 if (connector->display_info.is_hdmi) { in amdgpu_connector_dp_mode_valid()
1529 amdgpu_connector_late_register(struct drm_connector *connector) in amdgpu_connector_late_register() argument
1531 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_late_register()
1581 struct drm_connector *connector; in amdgpu_connector_add() local
1598 drm_for_each_connector_iter(connector, &iter) { in amdgpu_connector_add()
1599 amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_add()
1638 connector = &amdgpu_connector->base; in amdgpu_connector_add()
1677 connector->interlace_allowed = true; in amdgpu_connector_add()
1678 connector->doublescan_allowed = true; in amdgpu_connector_add()
1724 connector->interlace_allowed = true; in amdgpu_connector_add()
1726 connector->doublescan_allowed = true; in amdgpu_connector_add()
1728 connector->doublescan_allowed = false; in amdgpu_connector_add()
1748 connector->interlace_allowed = false; in amdgpu_connector_add()
1749 connector->doublescan_allowed = false; in amdgpu_connector_add()
1776 connector->interlace_allowed = true; in amdgpu_connector_add()
1777 connector->doublescan_allowed = true; in amdgpu_connector_add()
1801 connector->interlace_allowed = true; in amdgpu_connector_add()
1802 connector->doublescan_allowed = true; in amdgpu_connector_add()
1854 connector->interlace_allowed = true; in amdgpu_connector_add()
1856 connector->doublescan_allowed = true; in amdgpu_connector_add()
1858 connector->doublescan_allowed = false; in amdgpu_connector_add()
1903 connector->interlace_allowed = true; in amdgpu_connector_add()
1905 connector->doublescan_allowed = true; in amdgpu_connector_add()
1907 connector->doublescan_allowed = false; in amdgpu_connector_add()
1953 connector->interlace_allowed = true; in amdgpu_connector_add()
1955 connector->doublescan_allowed = false; in amdgpu_connector_add()
1980 connector->interlace_allowed = false; in amdgpu_connector_add()
1981 connector->doublescan_allowed = false; in amdgpu_connector_add()
2004 connector->interlace_allowed = false; in amdgpu_connector_add()
2005 connector->doublescan_allowed = false; in amdgpu_connector_add()
2012 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in amdgpu_connector_add()
2016 connector->polled = DRM_CONNECTOR_POLL_HPD; in amdgpu_connector_add()
2018 connector->display_info.subpixel_order = subpixel_order; in amdgpu_connector_add()
2031 drm_connector_cleanup(connector); in amdgpu_connector_add()
2032 kfree(connector); in amdgpu_connector_add()