Lines Matching full:connector

54 nouveau_conn_native_mode(struct drm_connector *connector)  in nouveau_conn_native_mode()  argument
56 const struct drm_connector_helper_funcs *helper = connector->helper_private; in nouveau_conn_native_mode()
57 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_conn_native_mode()
58 struct drm_device *dev = connector->dev; in nouveau_conn_native_mode()
62 list_for_each_entry(mode, &connector->probed_modes, head) { in nouveau_conn_native_mode()
63 if (helper->mode_valid(connector, mode) != MODE_OK || in nouveau_conn_native_mode()
98 nouveau_conn_atomic_get_property(struct drm_connector *connector, in nouveau_conn_atomic_get_property() argument
103 struct nouveau_display *disp = nouveau_display(connector->dev); in nouveau_conn_atomic_get_property()
104 struct drm_device *dev = connector->dev; in nouveau_conn_atomic_get_property()
129 nouveau_conn_atomic_set_property(struct drm_connector *connector, in nouveau_conn_atomic_set_property() argument
133 struct drm_device *dev = connector->dev; in nouveau_conn_atomic_set_property()
148 switch (connector->connector_type) { in nouveau_conn_atomic_set_property()
223 nouveau_conn_atomic_destroy_state(struct drm_connector *connector, in nouveau_conn_atomic_destroy_state() argument
232 nouveau_conn_atomic_duplicate_state(struct drm_connector *connector) in nouveau_conn_atomic_duplicate_state() argument
234 struct nouveau_conn_atom *armc = nouveau_conn_atom(connector->state); in nouveau_conn_atomic_duplicate_state()
238 __drm_atomic_helper_connector_duplicate_state(connector, &asyc->state); in nouveau_conn_atomic_duplicate_state()
247 nouveau_conn_reset(struct drm_connector *connector) in nouveau_conn_reset() argument
249 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_reset()
252 if (drm_drv_uses_atomic_modeset(connector->dev)) { in nouveau_conn_reset()
256 if (connector->state) in nouveau_conn_reset()
257 nouveau_conn_atomic_destroy_state(connector, in nouveau_conn_reset()
258 connector->state); in nouveau_conn_reset()
260 __drm_atomic_helper_connector_reset(connector, &asyc->state); in nouveau_conn_reset()
272 if (nouveau_display(connector->dev)->disp.object.oclass < NV50_DISP) { in nouveau_conn_reset()
273 switch (connector->connector_type) { in nouveau_conn_reset()
285 nouveau_conn_attach_properties(struct drm_connector *connector) in nouveau_conn_attach_properties() argument
287 struct drm_device *dev = connector->dev; in nouveau_conn_attach_properties()
289 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_attach_properties()
292 if (drm_drv_uses_atomic_modeset(connector->dev)) in nouveau_conn_attach_properties()
293 armc = nouveau_conn_atom(connector->state); in nouveau_conn_attach_properties()
298 if (connector->connector_type == DRM_MODE_CONNECTOR_DVII) in nouveau_conn_attach_properties()
299 drm_object_attach_property(&connector->base, dev->mode_config. in nouveau_conn_attach_properties()
304 (connector->connector_type == DRM_MODE_CONNECTOR_DVID || in nouveau_conn_attach_properties()
305 connector->connector_type == DRM_MODE_CONNECTOR_DVII || in nouveau_conn_attach_properties()
306 connector->connector_type == DRM_MODE_CONNECTOR_HDMIA || in nouveau_conn_attach_properties()
307 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort)) { in nouveau_conn_attach_properties()
308 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
311 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
313 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
319 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
323 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
328 switch (connector->connector_type) { in nouveau_conn_attach_properties()
336 drm_object_attach_property(&connector->base, dev->mode_config. in nouveau_conn_attach_properties()
343 switch (connector->connector_type) { in nouveau_conn_attach_properties()
349 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
354 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
379 find_encoder(struct drm_connector *connector, int type) in find_encoder() argument
384 drm_connector_for_each_possible_encoder(connector, enc) { in find_encoder()
396 nouveau_connector_destroy(struct drm_connector *connector) in nouveau_connector_destroy() argument
398 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_destroy()
401 drm_connector_unregister(connector); in nouveau_connector_destroy()
402 drm_connector_cleanup(connector); in nouveau_connector_destroy()
408 kfree(connector); in nouveau_connector_destroy()
412 nouveau_connector_ddc_detect(struct drm_connector *connector) in nouveau_connector_ddc_detect() argument
414 struct drm_device *dev = connector->dev; in nouveau_connector_ddc_detect()
421 drm_connector_for_each_possible_encoder(connector, encoder) { in nouveau_connector_ddc_detect()
426 ret = nouveau_dp_detect(nouveau_connector(connector), in nouveau_connector_ddc_detect()
459 nouveau_connector_of_detect(struct drm_connector *connector) in nouveau_connector_of_detect() argument
462 struct drm_device *dev = connector->dev; in nouveau_connector_of_detect()
463 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_of_detect()
469 !((nv_encoder = find_encoder(connector, DCB_OUTPUT_TMDS)) || in nouveau_connector_of_detect()
470 (nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG)))) in nouveau_connector_of_detect()
490 nouveau_connector_set_encoder(struct drm_connector *connector, in nouveau_connector_set_encoder() argument
493 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_encoder()
494 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_set_encoder()
495 struct drm_device *dev = connector->dev; in nouveau_connector_set_encoder()
504 connector->interlace_allowed = in nouveau_connector_set_encoder()
507 connector->interlace_allowed = in nouveau_connector_set_encoder()
509 connector->doublescan_allowed = true; in nouveau_connector_set_encoder()
513 connector->doublescan_allowed = false; in nouveau_connector_set_encoder()
514 connector->interlace_allowed = false; in nouveau_connector_set_encoder()
516 connector->doublescan_allowed = true; in nouveau_connector_set_encoder()
522 connector->interlace_allowed = false; in nouveau_connector_set_encoder()
524 connector->interlace_allowed = true; in nouveau_connector_set_encoder()
528 drm_object_property_set_value(&connector->base, in nouveau_connector_set_encoder()
550 nouveau_connector_detect(struct drm_connector *connector, bool force) in nouveau_connector_detect() argument
552 struct drm_device *dev = connector->dev; in nouveau_connector_detect()
554 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect()
579 nv_encoder = nouveau_connector_ddc_detect(connector); in nouveau_connector_detect()
586 new_edid = drm_get_edid_switcheroo(connector, i2c); in nouveau_connector_detect()
588 new_edid = drm_get_edid(connector, i2c); in nouveau_connector_detect()
593 connector->name); in nouveau_connector_detect()
604 nv_partner = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
606 nv_partner = find_encoder(connector, DCB_OUTPUT_TMDS); in nouveau_connector_detect()
617 nv_encoder = find_encoder(connector, type); in nouveau_connector_detect()
620 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
628 nv_encoder = nouveau_connector_of_detect(connector); in nouveau_connector_detect()
630 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
636 nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
638 nv_encoder = find_encoder(connector, DCB_OUTPUT_TV); in nouveau_connector_detect()
644 if (helper->detect(encoder, connector) == in nouveau_connector_detect()
646 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
663 nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) in nouveau_connector_detect_lvds() argument
665 struct drm_device *dev = connector->dev; in nouveau_connector_detect_lvds()
667 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_lvds()
672 nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS); in nouveau_connector_detect_lvds()
678 status = nouveau_connector_detect(connector, force); in nouveau_connector_detect_lvds()
695 edid = nouveau_acpi_edid(dev, connector); in nouveau_connector_detect_lvds()
733 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect_lvds()
738 nouveau_connector_force(struct drm_connector *connector) in nouveau_connector_force() argument
740 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_force()
741 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_force()
746 if (connector->force == DRM_FORCE_ON_DIGITAL) in nouveau_connector_force()
753 nv_encoder = find_encoder(connector, type); in nouveau_connector_force()
756 connector->name); in nouveau_connector_force()
757 connector->status = connector_status_disconnected; in nouveau_connector_force()
761 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_force()
765 nouveau_connector_set_property(struct drm_connector *connector, in nouveau_connector_set_property() argument
768 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_property()
774 ret = connector->funcs->atomic_set_property(&nv_connector->base, in nouveau_connector_set_property()
780 encoder, connector, property, value); in nouveau_connector_set_property()
787 if (connector->encoder && connector->encoder->crtc) { in nouveau_connector_set_property()
788 ret = drm_crtc_helper_set_mode(connector->encoder->crtc, in nouveau_connector_set_property()
789 &connector->encoder->crtc->mode, in nouveau_connector_set_property()
790 connector->encoder->crtc->x, in nouveau_connector_set_property()
791 connector->encoder->crtc->y, in nouveau_connector_set_property()
824 nouveau_connector_scaler_modes_add(struct drm_connector *connector) in nouveau_connector_scaler_modes_add() argument
826 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_scaler_modes_add()
828 struct drm_device *dev = connector->dev; in nouveau_connector_scaler_modes_add()
846 drm_mode_probed_add(connector, m); in nouveau_connector_scaler_modes_add()
857 nouveau_connector_detect_depth(struct drm_connector *connector) in nouveau_connector_detect_depth() argument
859 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_detect_depth()
860 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_depth()
867 if (nv_connector->edid && connector->display_info.bpc) in nouveau_connector_detect_depth()
872 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
878 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
882 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
887 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
902 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
906 nouveau_connector_late_register(struct drm_connector *connector) in nouveau_connector_late_register() argument
910 ret = nouveau_backlight_init(connector); in nouveau_connector_late_register()
914 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || in nouveau_connector_late_register()
915 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in nouveau_connector_late_register()
916 ret = drm_dp_aux_register(&nouveau_connector(connector)->aux); in nouveau_connector_late_register()
923 nouveau_backlight_fini(connector); in nouveau_connector_late_register()
928 nouveau_connector_early_unregister(struct drm_connector *connector) in nouveau_connector_early_unregister() argument
930 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || in nouveau_connector_early_unregister()
931 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) in nouveau_connector_early_unregister()
932 drm_dp_aux_unregister(&nouveau_connector(connector)->aux); in nouveau_connector_early_unregister()
934 nouveau_backlight_fini(connector); in nouveau_connector_early_unregister()
938 nouveau_connector_get_modes(struct drm_connector *connector) in nouveau_connector_get_modes() argument
940 struct drm_device *dev = connector->dev; in nouveau_connector_get_modes()
942 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_get_modes()
955 ret = drm_add_edid_modes(connector, nv_connector->edid); in nouveau_connector_get_modes()
969 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) in nouveau_connector_get_modes()
970 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
977 nv_connector->native_mode = nouveau_conn_native_mode(connector); in nouveau_connector_get_modes()
982 drm_mode_probed_add(connector, mode); in nouveau_connector_get_modes()
990 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS) in nouveau_connector_get_modes()
991 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
994 ret = get_slave_funcs(encoder)->get_modes(encoder, connector); in nouveau_connector_get_modes()
999 ret += nouveau_connector_scaler_modes_add(connector); in nouveau_connector_get_modes()
1005 get_tmds_link_bandwidth(struct drm_connector *connector) in get_tmds_link_bandwidth() argument
1007 struct nouveau_connector *nv_connector = nouveau_connector(connector); in get_tmds_link_bandwidth()
1009 struct nouveau_drm *drm = nouveau_drm(connector->dev); in get_tmds_link_bandwidth()
1052 nouveau_connector_mode_valid(struct drm_connector *connector, in nouveau_connector_mode_valid() argument
1055 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_mode_valid()
1071 max_clock = get_tmds_link_bandwidth(connector); in nouveau_connector_mode_valid()
1081 return nv50_dp_mode_valid(connector, nv_encoder, mode, NULL); in nouveau_connector_mode_valid()
1099 nouveau_connector_best_encoder(struct drm_connector *connector) in nouveau_connector_best_encoder() argument
1101 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_best_encoder()
1110 nouveau_connector_atomic_check(struct drm_connector *connector, struct drm_atomic_state *state) in nouveau_connector_atomic_check() argument
1112 struct nouveau_connector *nv_conn = nouveau_connector(connector); in nouveau_connector_atomic_check()
1114 drm_atomic_get_new_connector_state(state, connector); in nouveau_connector_atomic_check()
1116 if (!nv_conn->dp_encoder || !nv50_has_mst(nouveau_drm(connector->dev))) in nouveau_connector_atomic_check()
1165 nouveau_connector_hpd(struct drm_connector *connector) in nouveau_connector_hpd() argument
1167 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_hpd()
1168 u32 mask = drm_connector_mask(connector); in nouveau_connector_hpd()
1183 struct drm_connector *connector = &nv_connector->base; in nouveau_connector_hotplug() local
1184 struct drm_device *dev = connector->dev; in nouveau_connector_hotplug()
1194 NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", connector->name); in nouveau_connector_hotplug()
1195 nouveau_connector_hpd(connector); in nouveau_connector_hotplug()
1270 struct drm_connector *connector; in nouveau_connector_create() local
1273 int index = dcbe->connector; in nouveau_connector_create()
1278 nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { in nouveau_connector_create()
1279 nv_connector = nouveau_connector(connector); in nouveau_connector_create()
1282 return connector; in nouveau_connector_create()
1291 connector = &nv_connector->base; in nouveau_connector_create()
1294 /* attempt to parse vbios connector type and hotplug gpio */ in nouveau_connector_create()
1304 NV_WARN(drm, "unknown connector type %02x\n", in nouveau_connector_create()
1324 /* no vbios data, or an unknown dcb connector type - attempt to in nouveau_connector_create()
1334 if (dcbt->entry[i].connector == nv_connector->index) in nouveau_connector_create()
1374 nv_connector->aux.dev = connector->kdev; in nouveau_connector_create()
1396 connector->stereo_allowed = true; in nouveau_connector_create()
1399 connector->interlace_allowed = false; in nouveau_connector_create()
1400 connector->doublescan_allowed = false; in nouveau_connector_create()
1402 drm_connector_init(dev, connector, funcs, type); in nouveau_connector_create()
1403 drm_connector_helper_add(connector, &nouveau_connector_helper_funcs); in nouveau_connector_create()
1414 connector->funcs->reset(connector); in nouveau_connector_create()
1415 nouveau_conn_attach_properties(connector); in nouveau_connector_create()
1451 drm_dp_cec_register_connector(&nv_connector->aux, connector); in nouveau_connector_create()
1466 connector->polled = DRM_CONNECTOR_POLL_CONNECT; in nouveau_connector_create()
1468 connector->polled = DRM_CONNECTOR_POLL_HPD; in nouveau_connector_create()
1470 drm_connector_register(connector); in nouveau_connector_create()
1471 return connector; in nouveau_connector_create()