Lines Matching full:connector
42 void amdgpu_connector_hotplug(struct drm_connector *connector) in amdgpu_connector_hotplug() argument
44 struct drm_device *dev = connector->dev; in amdgpu_connector_hotplug()
46 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_hotplug()
48 /* bail if the connector does not have hpd pin, e.g., in amdgpu_connector_hotplug()
56 /* if the connector is already off, don't turn it back on */ in amdgpu_connector_hotplug()
57 if (connector->dpms != DRM_MODE_DPMS_ON) in amdgpu_connector_hotplug()
61 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in amdgpu_connector_hotplug()
81 /* Turn the connector off and back on immediately, which in amdgpu_connector_hotplug()
84 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); in amdgpu_connector_hotplug()
85 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); in amdgpu_connector_hotplug()
100 int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) in amdgpu_connector_get_monitor_bpc() argument
102 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_get_monitor_bpc()
107 switch (connector->connector_type) { in amdgpu_connector_get_monitor_bpc()
111 if (connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
112 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
113 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
119 if (connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
120 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
121 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
128 connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
129 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
130 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
135 if (connector->display_info.bpc) in amdgpu_connector_get_monitor_bpc()
136 bpc = connector->display_info.bpc; in amdgpu_connector_get_monitor_bpc()
139 connector->helper_private; in amdgpu_connector_get_monitor_bpc()
140 struct drm_encoder *encoder = connector_funcs->best_encoder(connector); in amdgpu_connector_get_monitor_bpc()
152 if (connector->display_info.is_hdmi) { in amdgpu_connector_get_monitor_bpc()
161 connector->name, bpc); in amdgpu_connector_get_monitor_bpc()
166 if (connector->display_info.max_tmds_clock > 0) { in amdgpu_connector_get_monitor_bpc()
167 /* mode_clock is clock in kHz for mode to be modeset on this connector */ in amdgpu_connector_get_monitor_bpc()
171 max_tmds_clock = connector->display_info.max_tmds_clock; in amdgpu_connector_get_monitor_bpc()
174 connector->name, mode_clock, max_tmds_clock); in amdgpu_connector_get_monitor_bpc()
178 if ((connector->display_info.edid_hdmi_rgb444_dc_modes & DRM_EDID_HDMI_DC_30) && in amdgpu_connector_get_monitor_bpc()
185 connector->name, bpc); in amdgpu_connector_get_monitor_bpc()
191 connector->name, bpc); in amdgpu_connector_get_monitor_bpc()
196 connector->name); in amdgpu_connector_get_monitor_bpc()
203 connector->name); in amdgpu_connector_get_monitor_bpc()
208 connector->name, connector->display_info.bpc, bpc); in amdgpu_connector_get_monitor_bpc()
214 amdgpu_connector_update_scratch_regs(struct drm_connector *connector, in amdgpu_connector_update_scratch_regs() argument
219 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_update_scratch_regs()
222 best_encoder = connector_funcs->best_encoder(connector); in amdgpu_connector_update_scratch_regs()
224 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_update_scratch_regs()
230 amdgpu_atombios_encoder_set_bios_scratch_regs(connector, encoder, connected); in amdgpu_connector_update_scratch_regs()
235 amdgpu_connector_find_encoder(struct drm_connector *connector, in amdgpu_connector_find_encoder() argument
240 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_find_encoder()
248 struct edid *amdgpu_connector_edid(struct drm_connector *connector) in amdgpu_connector_edid() argument
250 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_edid()
251 struct drm_property_blob *edid_blob = connector->edid_blob_ptr; in amdgpu_connector_edid()
280 static void amdgpu_connector_get_edid(struct drm_connector *connector) in amdgpu_connector_get_edid() argument
282 struct drm_device *dev = connector->dev; in amdgpu_connector_get_edid()
284 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_get_edid()
293 if ((amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_get_edid()
296 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
298 } else if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) || in amdgpu_connector_get_edid()
299 (connector->connector_type == DRM_MODE_CONNECTOR_eDP)) { in amdgpu_connector_get_edid()
305 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
308 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
311 amdgpu_connector->edid = drm_get_edid(connector, in amdgpu_connector_get_edid()
317 if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) || in amdgpu_connector_get_edid()
318 (connector->connector_type == DRM_MODE_CONNECTOR_eDP))) { in amdgpu_connector_get_edid()
320 drm_connector_update_edid_property(connector, amdgpu_connector->edid); in amdgpu_connector_get_edid()
325 static void amdgpu_connector_free_edid(struct drm_connector *connector) in amdgpu_connector_free_edid() argument
327 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_free_edid()
333 static int amdgpu_connector_ddc_get_modes(struct drm_connector *connector) in amdgpu_connector_ddc_get_modes() argument
335 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_ddc_get_modes()
339 drm_connector_update_edid_property(connector, amdgpu_connector->edid); in amdgpu_connector_ddc_get_modes()
340 ret = drm_add_edid_modes(connector, amdgpu_connector->edid); in amdgpu_connector_ddc_get_modes()
343 drm_connector_update_edid_property(connector, NULL); in amdgpu_connector_ddc_get_modes()
348 amdgpu_connector_best_single_encoder(struct drm_connector *connector) in amdgpu_connector_best_single_encoder() argument
353 drm_connector_for_each_possible_encoder(connector, encoder) in amdgpu_connector_best_single_encoder()
359 static void amdgpu_get_native_mode(struct drm_connector *connector) in amdgpu_get_native_mode() argument
361 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_get_native_mode()
369 if (!list_empty(&connector->probed_modes)) { in amdgpu_get_native_mode()
371 list_first_entry(&connector->probed_modes, in amdgpu_get_native_mode()
419 struct drm_connector *connector) in amdgpu_connector_add_common_modes() argument
466 drm_mode_probed_add(connector, mode); in amdgpu_connector_add_common_modes()
470 static int amdgpu_connector_set_property(struct drm_connector *connector, in amdgpu_connector_set_property() argument
474 struct drm_device *dev = connector->dev; in amdgpu_connector_set_property()
483 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
484 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
502 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_set_property()
503 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
504 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
517 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_set_property()
518 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
519 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
532 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
533 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
546 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
547 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
560 /* need to find digital encoder on connector */ in amdgpu_connector_set_property()
561 encoder = amdgpu_connector_find_encoder(connector, DRM_MODE_ENCODER_TMDS); in amdgpu_connector_set_property()
575 to_amdgpu_connector(connector); in amdgpu_connector_set_property()
586 if (connector->encoder) { in amdgpu_connector_set_property()
587 amdgpu_encoder = to_amdgpu_encoder(connector->encoder); in amdgpu_connector_set_property()
589 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_set_property()
590 amdgpu_encoder = to_amdgpu_encoder(connector_funcs->best_encoder(connector)); in amdgpu_connector_set_property()
617 struct drm_connector *connector) in amdgpu_connector_fixup_lcd_native_mode() argument
624 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in amdgpu_connector_fixup_lcd_native_mode()
634 list_for_each_entry_safe(mode, t, &connector->probed_modes, head) { in amdgpu_connector_fixup_lcd_native_mode()
651 static int amdgpu_connector_lvds_get_modes(struct drm_connector *connector) in amdgpu_connector_lvds_get_modes() argument
657 amdgpu_connector_get_edid(connector); in amdgpu_connector_lvds_get_modes()
658 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_lvds_get_modes()
660 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_get_modes()
662 amdgpu_connector_fixup_lcd_native_mode(encoder, connector); in amdgpu_connector_lvds_get_modes()
664 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_lvds_get_modes()
669 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_get_modes()
677 drm_mode_probed_add(connector, mode); in amdgpu_connector_lvds_get_modes()
679 connector->display_info.width_mm = mode->width_mm; in amdgpu_connector_lvds_get_modes()
680 connector->display_info.height_mm = mode->height_mm; in amdgpu_connector_lvds_get_modes()
682 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_lvds_get_modes()
688 static enum drm_mode_status amdgpu_connector_lvds_mode_valid(struct drm_connector *connector, in amdgpu_connector_lvds_mode_valid() argument
691 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_mode_valid()
719 amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force) in amdgpu_connector_lvds_detect() argument
721 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_lvds_detect()
722 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_lvds_detect()
727 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_lvds_detect()
729 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_lvds_detect()
745 amdgpu_connector_get_edid(connector); in amdgpu_connector_lvds_detect()
750 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_lvds_detect()
753 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_lvds_detect()
754 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_lvds_detect()
760 static void amdgpu_connector_unregister(struct drm_connector *connector) in amdgpu_connector_unregister() argument
762 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_unregister()
770 static void amdgpu_connector_destroy(struct drm_connector *connector) in amdgpu_connector_destroy() argument
772 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_destroy()
774 amdgpu_connector_free_edid(connector); in amdgpu_connector_destroy()
776 drm_connector_unregister(connector); in amdgpu_connector_destroy()
777 drm_connector_cleanup(connector); in amdgpu_connector_destroy()
778 kfree(connector); in amdgpu_connector_destroy()
781 static int amdgpu_connector_set_lcd_property(struct drm_connector *connector, in amdgpu_connector_set_lcd_property() argument
785 struct drm_device *dev = connector->dev; in amdgpu_connector_set_lcd_property()
793 if (connector->encoder) in amdgpu_connector_set_lcd_property()
794 amdgpu_encoder = to_amdgpu_encoder(connector->encoder); in amdgpu_connector_set_lcd_property()
796 const struct drm_connector_helper_funcs *connector_funcs = connector->helper_private; in amdgpu_connector_set_lcd_property()
797 amdgpu_encoder = to_amdgpu_encoder(connector_funcs->best_encoder(connector)); in amdgpu_connector_set_lcd_property()
832 static int amdgpu_connector_vga_get_modes(struct drm_connector *connector) in amdgpu_connector_vga_get_modes() argument
836 amdgpu_connector_get_edid(connector); in amdgpu_connector_vga_get_modes()
837 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_vga_get_modes()
838 amdgpu_get_native_mode(connector); in amdgpu_connector_vga_get_modes()
843 static enum drm_mode_status amdgpu_connector_vga_mode_valid(struct drm_connector *connector, in amdgpu_connector_vga_mode_valid() argument
846 struct drm_device *dev = connector->dev; in amdgpu_connector_vga_mode_valid()
858 amdgpu_connector_vga_detect(struct drm_connector *connector, bool force) in amdgpu_connector_vga_detect() argument
860 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_vga_detect()
868 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_vga_detect()
870 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_vga_detect()
875 encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_vga_detect()
883 amdgpu_connector_free_edid(connector); in amdgpu_connector_vga_detect()
884 amdgpu_connector_get_edid(connector); in amdgpu_connector_vga_detect()
888 connector->name); in amdgpu_connector_vga_detect()
898 amdgpu_connector_free_edid(connector); in amdgpu_connector_vga_detect()
912 ret = connector->status; in amdgpu_connector_vga_detect()
918 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_vga_detect()
924 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_vga_detect()
928 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_vga_detect()
929 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_vga_detect()
951 amdgpu_connector_check_hpd_status_unchanged(struct drm_connector *connector) in amdgpu_connector_check_hpd_status_unchanged() argument
953 struct drm_device *dev = connector->dev; in amdgpu_connector_check_hpd_status_unchanged()
955 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_check_hpd_status_unchanged()
963 if (connector->status == status) in amdgpu_connector_check_hpd_status_unchanged()
975 * we need to find the DAC encoder object for this connector.
979 * if its shared we have to set the other connector to disconnected.
982 amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force) in amdgpu_connector_dvi_detect() argument
984 struct drm_device *dev = connector->dev; in amdgpu_connector_dvi_detect()
986 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_detect()
993 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_dvi_detect()
995 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dvi_detect()
1000 if (!force && amdgpu_connector_check_hpd_status_unchanged(connector)) { in amdgpu_connector_dvi_detect()
1001 ret = connector->status; in amdgpu_connector_dvi_detect()
1009 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1010 amdgpu_connector_get_edid(connector); in amdgpu_connector_dvi_detect()
1014 connector->name); in amdgpu_connector_dvi_detect()
1025 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1044 if (connector == list_connector) in amdgpu_connector_dvi_detect()
1054 amdgpu_connector_free_edid(connector); in amdgpu_connector_dvi_detect()
1069 if ((connector->connector_type == DRM_MODE_CONNECTOR_DVID) || in amdgpu_connector_dvi_detect()
1070 (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA)) in amdgpu_connector_dvi_detect()
1079 ret = connector->status; in amdgpu_connector_dvi_detect()
1087 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_dvi_detect()
1097 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dvi_detect()
1108 lret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dvi_detect()
1120 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_dvi_detect()
1124 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_dvi_detect()
1125 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dvi_detect()
1133 amdgpu_connector_dvi_encoder(struct drm_connector *connector) in amdgpu_connector_dvi_encoder() argument
1135 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_encoder()
1138 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_dvi_encoder()
1153 drm_connector_for_each_possible_encoder(connector, encoder) in amdgpu_connector_dvi_encoder()
1159 static void amdgpu_connector_dvi_force(struct drm_connector *connector) in amdgpu_connector_dvi_force() argument
1161 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_force()
1162 if (connector->force == DRM_FORCE_ON) in amdgpu_connector_dvi_force()
1164 if (connector->force == DRM_FORCE_ON_DIGITAL) in amdgpu_connector_dvi_force()
1168 static enum drm_mode_status amdgpu_connector_dvi_mode_valid(struct drm_connector *connector, in amdgpu_connector_dvi_mode_valid() argument
1171 struct drm_device *dev = connector->dev; in amdgpu_connector_dvi_mode_valid()
1173 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dvi_mode_valid()
1182 } else if (connector->display_info.is_hdmi) { in amdgpu_connector_dvi_mode_valid()
1216 static int amdgpu_connector_dp_get_modes(struct drm_connector *connector) in amdgpu_connector_dp_get_modes() argument
1218 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_get_modes()
1220 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_get_modes()
1223 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_get_modes()
1224 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_get_modes()
1227 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { in amdgpu_connector_dp_get_modes()
1229 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_get_modes()
1231 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1232 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1234 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_get_modes()
1238 if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_get_modes()
1243 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1244 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1249 amdgpu_connector_fixup_lcd_native_mode(encoder, connector); in amdgpu_connector_dp_get_modes()
1251 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_dp_get_modes()
1263 drm_mode_probed_add(connector, mode); in amdgpu_connector_dp_get_modes()
1265 connector->display_info.width_mm = mode->width_mm; in amdgpu_connector_dp_get_modes()
1266 connector->display_info.height_mm = mode->height_mm; in amdgpu_connector_dp_get_modes()
1268 amdgpu_connector_add_common_modes(encoder, connector); in amdgpu_connector_dp_get_modes()
1272 if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_get_modes()
1277 amdgpu_connector_get_edid(connector); in amdgpu_connector_dp_get_modes()
1278 ret = amdgpu_connector_ddc_get_modes(connector); in amdgpu_connector_dp_get_modes()
1280 amdgpu_get_native_mode(connector); in amdgpu_connector_dp_get_modes()
1286 u16 amdgpu_connector_encoder_get_dp_bridge_encoder_id(struct drm_connector *connector) in amdgpu_connector_encoder_get_dp_bridge_encoder_id() argument
1291 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_encoder_get_dp_bridge_encoder_id()
1306 static bool amdgpu_connector_encoder_is_hbr2(struct drm_connector *connector) in amdgpu_connector_encoder_is_hbr2() argument
1312 drm_connector_for_each_possible_encoder(connector, encoder) { in amdgpu_connector_encoder_is_hbr2()
1321 bool amdgpu_connector_is_dp12_capable(struct drm_connector *connector) in amdgpu_connector_is_dp12_capable() argument
1323 struct drm_device *dev = connector->dev; in amdgpu_connector_is_dp12_capable()
1327 amdgpu_connector_encoder_is_hbr2(connector)) { in amdgpu_connector_is_dp12_capable()
1335 amdgpu_connector_dp_detect(struct drm_connector *connector, bool force) in amdgpu_connector_dp_detect() argument
1337 struct drm_device *dev = connector->dev; in amdgpu_connector_dp_detect()
1339 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_detect()
1342 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_detect()
1346 r = pm_runtime_get_sync(connector->dev->dev); in amdgpu_connector_dp_detect()
1348 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dp_detect()
1353 if (!force && amdgpu_connector_check_hpd_status_unchanged(connector)) { in amdgpu_connector_dp_detect()
1354 ret = connector->status; in amdgpu_connector_dp_detect()
1358 amdgpu_connector_free_edid(connector); in amdgpu_connector_dp_detect()
1360 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_detect()
1361 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_detect()
1373 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_detect()
1378 amdgpu_atombios_encoder_set_edp_panel_power(connector, in amdgpu_connector_dp_detect()
1380 } else if (amdgpu_connector_encoder_get_dp_bridge_encoder_id(connector) != in amdgpu_connector_dp_detect()
1396 ret = encoder_funcs->detect(encoder, connector); in amdgpu_connector_dp_detect()
1419 amdgpu_connector_update_scratch_regs(connector, ret); in amdgpu_connector_dp_detect()
1422 pm_runtime_mark_last_busy(connector->dev->dev); in amdgpu_connector_dp_detect()
1423 pm_runtime_put_autosuspend(connector->dev->dev); in amdgpu_connector_dp_detect()
1426 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort || in amdgpu_connector_dp_detect()
1427 connector->connector_type == DRM_MODE_CONNECTOR_eDP) in amdgpu_connector_dp_detect()
1435 static enum drm_mode_status amdgpu_connector_dp_mode_valid(struct drm_connector *connector, in amdgpu_connector_dp_mode_valid() argument
1438 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_dp_mode_valid()
1443 if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || in amdgpu_connector_dp_mode_valid()
1444 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { in amdgpu_connector_dp_mode_valid()
1445 struct drm_encoder *encoder = amdgpu_connector_best_single_encoder(connector); in amdgpu_connector_dp_mode_valid()
1472 return amdgpu_atombios_dp_mode_valid_helper(connector, mode); in amdgpu_connector_dp_mode_valid()
1474 if (connector->display_info.is_hdmi) { in amdgpu_connector_dp_mode_valid()
1489 amdgpu_connector_late_register(struct drm_connector *connector) in amdgpu_connector_late_register() argument
1491 struct amdgpu_connector *amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_late_register()
1541 struct drm_connector *connector; in amdgpu_connector_add() local
1558 drm_for_each_connector_iter(connector, &iter) { in amdgpu_connector_add()
1559 amdgpu_connector = to_amdgpu_connector(connector); in amdgpu_connector_add()
1598 connector = &amdgpu_connector->base; in amdgpu_connector_add()
1637 connector->interlace_allowed = true; in amdgpu_connector_add()
1638 connector->doublescan_allowed = true; in amdgpu_connector_add()
1684 connector->interlace_allowed = true; in amdgpu_connector_add()
1686 connector->doublescan_allowed = true; in amdgpu_connector_add()
1688 connector->doublescan_allowed = false; in amdgpu_connector_add()
1708 connector->interlace_allowed = false; in amdgpu_connector_add()
1709 connector->doublescan_allowed = false; in amdgpu_connector_add()
1736 connector->interlace_allowed = true; in amdgpu_connector_add()
1737 connector->doublescan_allowed = true; in amdgpu_connector_add()
1761 connector->interlace_allowed = true; in amdgpu_connector_add()
1762 connector->doublescan_allowed = true; in amdgpu_connector_add()
1814 connector->interlace_allowed = true; in amdgpu_connector_add()
1816 connector->doublescan_allowed = true; in amdgpu_connector_add()
1818 connector->doublescan_allowed = false; in amdgpu_connector_add()
1863 connector->interlace_allowed = true; in amdgpu_connector_add()
1865 connector->doublescan_allowed = true; in amdgpu_connector_add()
1867 connector->doublescan_allowed = false; in amdgpu_connector_add()
1913 connector->interlace_allowed = true; in amdgpu_connector_add()
1915 connector->doublescan_allowed = false; in amdgpu_connector_add()
1940 connector->interlace_allowed = false; in amdgpu_connector_add()
1941 connector->doublescan_allowed = false; in amdgpu_connector_add()
1964 connector->interlace_allowed = false; in amdgpu_connector_add()
1965 connector->doublescan_allowed = false; in amdgpu_connector_add()
1972 connector->polled = DRM_CONNECTOR_POLL_CONNECT | in amdgpu_connector_add()
1976 connector->polled = DRM_CONNECTOR_POLL_HPD; in amdgpu_connector_add()
1978 connector->display_info.subpixel_order = subpixel_order; in amdgpu_connector_add()
1991 drm_connector_cleanup(connector); in amdgpu_connector_add()
1992 kfree(connector); in amdgpu_connector_add()