Lines Matching full:connector
53 nouveau_conn_native_mode(struct drm_connector *connector) in nouveau_conn_native_mode() argument
55 const struct drm_connector_helper_funcs *helper = connector->helper_private; in nouveau_conn_native_mode()
56 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_conn_native_mode()
57 struct drm_device *dev = connector->dev; in nouveau_conn_native_mode()
61 list_for_each_entry(mode, &connector->probed_modes, head) { in nouveau_conn_native_mode()
62 if (helper->mode_valid(connector, mode) != MODE_OK || in nouveau_conn_native_mode()
97 nouveau_conn_atomic_get_property(struct drm_connector *connector, in nouveau_conn_atomic_get_property() argument
102 struct nouveau_display *disp = nouveau_display(connector->dev); in nouveau_conn_atomic_get_property()
103 struct drm_device *dev = connector->dev; in nouveau_conn_atomic_get_property()
128 nouveau_conn_atomic_set_property(struct drm_connector *connector, in nouveau_conn_atomic_set_property() argument
132 struct drm_device *dev = connector->dev; in nouveau_conn_atomic_set_property()
147 switch (connector->connector_type) { in nouveau_conn_atomic_set_property()
222 nouveau_conn_atomic_destroy_state(struct drm_connector *connector, in nouveau_conn_atomic_destroy_state() argument
231 nouveau_conn_atomic_duplicate_state(struct drm_connector *connector) in nouveau_conn_atomic_duplicate_state() argument
233 struct nouveau_conn_atom *armc = nouveau_conn_atom(connector->state); in nouveau_conn_atomic_duplicate_state()
237 __drm_atomic_helper_connector_duplicate_state(connector, &asyc->state); in nouveau_conn_atomic_duplicate_state()
246 nouveau_conn_reset(struct drm_connector *connector) in nouveau_conn_reset() argument
248 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_reset()
251 if (drm_drv_uses_atomic_modeset(connector->dev)) { in nouveau_conn_reset()
255 if (connector->state) in nouveau_conn_reset()
256 nouveau_conn_atomic_destroy_state(connector, in nouveau_conn_reset()
257 connector->state); in nouveau_conn_reset()
259 __drm_atomic_helper_connector_reset(connector, &asyc->state); in nouveau_conn_reset()
271 if (nouveau_display(connector->dev)->disp.object.oclass < NV50_DISP) { in nouveau_conn_reset()
272 switch (connector->connector_type) { in nouveau_conn_reset()
284 nouveau_conn_attach_properties(struct drm_connector *connector) in nouveau_conn_attach_properties() argument
286 struct drm_device *dev = connector->dev; in nouveau_conn_attach_properties()
288 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_attach_properties()
291 if (drm_drv_uses_atomic_modeset(connector->dev)) in nouveau_conn_attach_properties()
292 armc = nouveau_conn_atom(connector->state); in nouveau_conn_attach_properties()
297 if (connector->connector_type == DRM_MODE_CONNECTOR_DVII) in nouveau_conn_attach_properties()
298 drm_object_attach_property(&connector->base, dev->mode_config. in nouveau_conn_attach_properties()
303 (connector->connector_type == DRM_MODE_CONNECTOR_DVID || in nouveau_conn_attach_properties()
304 connector->connector_type == DRM_MODE_CONNECTOR_DVII || in nouveau_conn_attach_properties()
305 connector->connector_type == DRM_MODE_CONNECTOR_HDMIA || in nouveau_conn_attach_properties()
306 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort)) { in nouveau_conn_attach_properties()
307 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
310 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
312 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
318 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
322 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
327 switch (connector->connector_type) { in nouveau_conn_attach_properties()
335 drm_object_attach_property(&connector->base, dev->mode_config. in nouveau_conn_attach_properties()
342 switch (connector->connector_type) { in nouveau_conn_attach_properties()
348 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
353 drm_object_attach_property(&connector->base, in nouveau_conn_attach_properties()
378 find_encoder(struct drm_connector *connector, int type) in find_encoder() argument
383 drm_connector_for_each_possible_encoder(connector, enc) { in find_encoder()
395 nouveau_connector_destroy(struct drm_connector *connector) in nouveau_connector_destroy() argument
397 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()
631 nv_encoder = nouveau_connector_of_detect(connector); in nouveau_connector_detect()
633 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
639 nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
641 nv_encoder = find_encoder(connector, DCB_OUTPUT_TV); in nouveau_connector_detect()
647 if (helper->detect(encoder, connector) == in nouveau_connector_detect()
649 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
666 nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) in nouveau_connector_detect_lvds() argument
668 struct drm_device *dev = connector->dev; in nouveau_connector_detect_lvds()
670 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_lvds()
675 nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS); in nouveau_connector_detect_lvds()
681 status = nouveau_connector_detect(connector, force); in nouveau_connector_detect_lvds()
698 edid = nouveau_acpi_edid(dev, connector); in nouveau_connector_detect_lvds()
737 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect_lvds()
742 nouveau_connector_force(struct drm_connector *connector) in nouveau_connector_force() argument
744 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_force()
745 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_force()
750 if (connector->force == DRM_FORCE_ON_DIGITAL) in nouveau_connector_force()
757 nv_encoder = find_encoder(connector, type); in nouveau_connector_force()
760 connector->name); in nouveau_connector_force()
761 connector->status = connector_status_disconnected; in nouveau_connector_force()
765 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_force()
769 nouveau_connector_set_property(struct drm_connector *connector, in nouveau_connector_set_property() argument
772 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_property()
778 ret = connector->funcs->atomic_set_property(&nv_connector->base, in nouveau_connector_set_property()
784 encoder, connector, property, value); in nouveau_connector_set_property()
791 if (connector->encoder && connector->encoder->crtc) { in nouveau_connector_set_property()
792 ret = drm_crtc_helper_set_mode(connector->encoder->crtc, in nouveau_connector_set_property()
793 &connector->encoder->crtc->mode, in nouveau_connector_set_property()
794 connector->encoder->crtc->x, in nouveau_connector_set_property()
795 connector->encoder->crtc->y, in nouveau_connector_set_property()
828 nouveau_connector_scaler_modes_add(struct drm_connector *connector) in nouveau_connector_scaler_modes_add() argument
830 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_scaler_modes_add()
832 struct drm_device *dev = connector->dev; in nouveau_connector_scaler_modes_add()
850 drm_mode_probed_add(connector, m); in nouveau_connector_scaler_modes_add()
861 nouveau_connector_detect_depth(struct drm_connector *connector) in nouveau_connector_detect_depth() argument
863 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_detect_depth()
864 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_depth()
871 if (nv_connector->edid && connector->display_info.bpc) in nouveau_connector_detect_depth()
876 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
882 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
886 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
891 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
906 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
910 nouveau_connector_late_register(struct drm_connector *connector) in nouveau_connector_late_register() argument
914 ret = nouveau_backlight_init(connector); in nouveau_connector_late_register()
918 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || in nouveau_connector_late_register()
919 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in nouveau_connector_late_register()
920 ret = drm_dp_aux_register(&nouveau_connector(connector)->aux); in nouveau_connector_late_register()
927 nouveau_backlight_fini(connector); in nouveau_connector_late_register()
932 nouveau_connector_early_unregister(struct drm_connector *connector) in nouveau_connector_early_unregister() argument
934 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || in nouveau_connector_early_unregister()
935 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) in nouveau_connector_early_unregister()
936 drm_dp_aux_unregister(&nouveau_connector(connector)->aux); in nouveau_connector_early_unregister()
938 nouveau_backlight_fini(connector); in nouveau_connector_early_unregister()
942 nouveau_connector_get_modes(struct drm_connector *connector) in nouveau_connector_get_modes() argument
944 struct drm_device *dev = connector->dev; in nouveau_connector_get_modes()
946 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_get_modes()
959 ret = drm_add_edid_modes(connector, nv_connector->edid); in nouveau_connector_get_modes()
973 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) in nouveau_connector_get_modes()
974 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
981 nv_connector->native_mode = nouveau_conn_native_mode(connector); in nouveau_connector_get_modes()
989 drm_mode_probed_add(connector, mode); in nouveau_connector_get_modes()
997 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode) in nouveau_connector_get_modes()
998 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
1001 ret = get_slave_funcs(encoder)->get_modes(encoder, connector); in nouveau_connector_get_modes()
1006 ret += nouveau_connector_scaler_modes_add(connector); in nouveau_connector_get_modes()
1012 get_tmds_link_bandwidth(struct drm_connector *connector) in get_tmds_link_bandwidth() argument
1014 struct nouveau_connector *nv_connector = nouveau_connector(connector); in get_tmds_link_bandwidth()
1016 struct nouveau_drm *drm = nouveau_drm(connector->dev); in get_tmds_link_bandwidth()
1059 nouveau_connector_mode_valid(struct drm_connector *connector, in nouveau_connector_mode_valid() argument
1062 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_mode_valid()
1078 max_clock = get_tmds_link_bandwidth(connector); in nouveau_connector_mode_valid()
1106 nouveau_connector_best_encoder(struct drm_connector *connector) in nouveau_connector_best_encoder() argument
1108 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_best_encoder()
1117 nouveau_connector_atomic_check(struct drm_connector *connector, struct drm_atomic_state *state) in nouveau_connector_atomic_check() argument
1119 struct nouveau_connector *nv_conn = nouveau_connector(connector); in nouveau_connector_atomic_check()
1121 drm_atomic_get_new_connector_state(state, connector); in nouveau_connector_atomic_check()
1123 if (!nv_conn->dp_encoder || !nv50_has_mst(nouveau_drm(connector->dev))) in nouveau_connector_atomic_check()
1276 struct drm_connector *connector; in nouveau_connector_create() local
1279 int index = dcbe->connector; in nouveau_connector_create()
1284 nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { in nouveau_connector_create()
1285 nv_connector = nouveau_connector(connector); in nouveau_connector_create()
1288 return connector; in nouveau_connector_create()
1297 connector = &nv_connector->base; in nouveau_connector_create()
1301 /* attempt to parse vbios connector type and hotplug gpio */ in nouveau_connector_create()
1311 NV_WARN(drm, "unknown connector type %02x\n", in nouveau_connector_create()
1331 /* no vbios data, or an unknown dcb connector type - attempt to in nouveau_connector_create()
1341 if (dcbt->entry[i].connector == nv_connector->index) in nouveau_connector_create()
1381 nv_connector->aux.dev = connector->kdev; in nouveau_connector_create()
1403 connector->stereo_allowed = true; in nouveau_connector_create()
1406 connector->interlace_allowed = false; in nouveau_connector_create()
1407 connector->doublescan_allowed = false; in nouveau_connector_create()
1409 drm_connector_init(dev, connector, funcs, type); in nouveau_connector_create()
1410 drm_connector_helper_add(connector, &nouveau_connector_helper_funcs); in nouveau_connector_create()
1411 connector->polled = DRM_CONNECTOR_POLL_CONNECT; in nouveau_connector_create()
1425 connector->polled = DRM_CONNECTOR_POLL_HPD; in nouveau_connector_create()
1439 connector->funcs->reset(connector); in nouveau_connector_create()
1440 nouveau_conn_attach_properties(connector); in nouveau_connector_create()
1476 drm_dp_cec_register_connector(&nv_connector->aux, connector); in nouveau_connector_create()
1480 drm_connector_register(connector); in nouveau_connector_create()
1481 return connector; in nouveau_connector_create()
1484 drm_connector_cleanup(connector); in nouveau_connector_create()