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()
406 kfree(connector); in nouveau_connector_destroy()
410 nouveau_connector_ddc_detect(struct drm_connector *connector) in nouveau_connector_ddc_detect() argument
412 struct drm_device *dev = connector->dev; in nouveau_connector_ddc_detect()
414 struct nouveau_connector *conn = nouveau_connector(connector); in nouveau_connector_ddc_detect()
420 drm_connector_for_each_possible_encoder(connector, encoder) { in nouveau_connector_ddc_detect()
473 nouveau_connector_of_detect(struct drm_connector *connector) in nouveau_connector_of_detect() argument
476 struct drm_device *dev = connector->dev; in nouveau_connector_of_detect()
477 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_of_detect()
483 !((nv_encoder = find_encoder(connector, DCB_OUTPUT_TMDS)) || in nouveau_connector_of_detect()
484 (nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG)))) in nouveau_connector_of_detect()
504 nouveau_connector_set_encoder(struct drm_connector *connector, in nouveau_connector_set_encoder() argument
507 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_encoder()
508 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_set_encoder()
509 struct drm_device *dev = connector->dev; in nouveau_connector_set_encoder()
518 connector->interlace_allowed = in nouveau_connector_set_encoder()
521 connector->interlace_allowed = in nouveau_connector_set_encoder()
523 connector->doublescan_allowed = true; in nouveau_connector_set_encoder()
527 connector->doublescan_allowed = false; in nouveau_connector_set_encoder()
528 connector->interlace_allowed = false; in nouveau_connector_set_encoder()
530 connector->doublescan_allowed = true; in nouveau_connector_set_encoder()
536 connector->interlace_allowed = false; in nouveau_connector_set_encoder()
538 connector->interlace_allowed = true; in nouveau_connector_set_encoder()
542 drm_object_property_set_value(&connector->base, in nouveau_connector_set_encoder()
564 nouveau_connector_detect(struct drm_connector *connector, bool force) in nouveau_connector_detect() argument
566 struct drm_device *dev = connector->dev; in nouveau_connector_detect()
568 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect()
592 nv_encoder = nouveau_connector_ddc_detect(connector); in nouveau_connector_detect()
599 new_edid = drm_get_edid_switcheroo(connector, nv_encoder->i2c); in nouveau_connector_detect()
601 new_edid = drm_get_edid(connector, nv_encoder->i2c); in nouveau_connector_detect()
611 connector->name); in nouveau_connector_detect()
622 nv_partner = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
624 nv_partner = find_encoder(connector, DCB_OUTPUT_TMDS); in nouveau_connector_detect()
635 nv_encoder = find_encoder(connector, type); in nouveau_connector_detect()
638 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
649 nv_encoder = nouveau_connector_of_detect(connector); in nouveau_connector_detect()
651 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
657 nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
659 nv_encoder = find_encoder(connector, DCB_OUTPUT_TV); in nouveau_connector_detect()
665 if (helper->detect(encoder, connector) == in nouveau_connector_detect()
667 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
684 nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) in nouveau_connector_detect_lvds() argument
686 struct drm_device *dev = connector->dev; in nouveau_connector_detect_lvds()
688 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_lvds()
693 nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS); in nouveau_connector_detect_lvds()
699 status = nouveau_connector_detect(connector, force); in nouveau_connector_detect_lvds()
716 edid = nouveau_acpi_edid(dev, connector); in nouveau_connector_detect_lvds()
755 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect_lvds()
760 nouveau_connector_force(struct drm_connector *connector) in nouveau_connector_force() argument
762 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_force()
763 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_force()
768 if (connector->force == DRM_FORCE_ON_DIGITAL) in nouveau_connector_force()
775 nv_encoder = find_encoder(connector, type); in nouveau_connector_force()
778 connector->name); in nouveau_connector_force()
779 connector->status = connector_status_disconnected; in nouveau_connector_force()
783 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_force()
787 nouveau_connector_set_property(struct drm_connector *connector, in nouveau_connector_set_property() argument
790 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_property()
796 ret = connector->funcs->atomic_set_property(&nv_connector->base, in nouveau_connector_set_property()
802 encoder, connector, property, value); in nouveau_connector_set_property()
809 if (connector->encoder && connector->encoder->crtc) { in nouveau_connector_set_property()
810 ret = drm_crtc_helper_set_mode(connector->encoder->crtc, in nouveau_connector_set_property()
811 &connector->encoder->crtc->mode, in nouveau_connector_set_property()
812 connector->encoder->crtc->x, in nouveau_connector_set_property()
813 connector->encoder->crtc->y, in nouveau_connector_set_property()
846 nouveau_connector_scaler_modes_add(struct drm_connector *connector) in nouveau_connector_scaler_modes_add() argument
848 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_scaler_modes_add()
850 struct drm_device *dev = connector->dev; in nouveau_connector_scaler_modes_add()
868 drm_mode_probed_add(connector, m); in nouveau_connector_scaler_modes_add()
879 nouveau_connector_detect_depth(struct drm_connector *connector) in nouveau_connector_detect_depth() argument
881 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_detect_depth()
882 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_depth()
889 if (nv_connector->edid && connector->display_info.bpc) in nouveau_connector_detect_depth()
894 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
900 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
904 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
909 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
924 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
928 nouveau_connector_late_register(struct drm_connector *connector) in nouveau_connector_late_register() argument
932 ret = nouveau_backlight_init(connector); in nouveau_connector_late_register()
936 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || in nouveau_connector_late_register()
937 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { in nouveau_connector_late_register()
938 ret = drm_dp_aux_register(&nouveau_connector(connector)->aux); in nouveau_connector_late_register()
945 nouveau_backlight_fini(connector); in nouveau_connector_late_register()
950 nouveau_connector_early_unregister(struct drm_connector *connector) in nouveau_connector_early_unregister() argument
952 if (connector->connector_type == DRM_MODE_CONNECTOR_eDP || in nouveau_connector_early_unregister()
953 connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) in nouveau_connector_early_unregister()
954 drm_dp_aux_unregister(&nouveau_connector(connector)->aux); in nouveau_connector_early_unregister()
956 nouveau_backlight_fini(connector); in nouveau_connector_early_unregister()
960 nouveau_connector_get_modes(struct drm_connector *connector) in nouveau_connector_get_modes() argument
962 struct drm_device *dev = connector->dev; in nouveau_connector_get_modes()
964 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_get_modes()
977 ret = drm_add_edid_modes(connector, nv_connector->edid); in nouveau_connector_get_modes()
991 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) in nouveau_connector_get_modes()
992 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
999 nv_connector->native_mode = nouveau_conn_native_mode(connector); in nouveau_connector_get_modes()
1007 drm_mode_probed_add(connector, mode); in nouveau_connector_get_modes()
1015 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode) in nouveau_connector_get_modes()
1016 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
1019 ret = get_slave_funcs(encoder)->get_modes(encoder, connector); in nouveau_connector_get_modes()
1024 ret += nouveau_connector_scaler_modes_add(connector); in nouveau_connector_get_modes()
1030 get_tmds_link_bandwidth(struct drm_connector *connector) in get_tmds_link_bandwidth() argument
1032 struct nouveau_connector *nv_connector = nouveau_connector(connector); in get_tmds_link_bandwidth()
1034 struct nouveau_drm *drm = nouveau_drm(connector->dev); in get_tmds_link_bandwidth()
1077 nouveau_connector_mode_valid(struct drm_connector *connector, in nouveau_connector_mode_valid() argument
1080 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_mode_valid()
1096 max_clock = get_tmds_link_bandwidth(connector); in nouveau_connector_mode_valid()
1124 nouveau_connector_best_encoder(struct drm_connector *connector) in nouveau_connector_best_encoder() argument
1126 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_best_encoder()
1135 nouveau_connector_atomic_check(struct drm_connector *connector, struct drm_atomic_state *state) in nouveau_connector_atomic_check() argument
1137 struct nouveau_connector *nv_conn = nouveau_connector(connector); in nouveau_connector_atomic_check()
1139 drm_atomic_get_new_connector_state(state, connector); in nouveau_connector_atomic_check()
1286 struct drm_connector *connector; in nouveau_connector_create() local
1292 nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { in nouveau_connector_create()
1293 nv_connector = nouveau_connector(connector); in nouveau_connector_create()
1296 return connector; in nouveau_connector_create()
1305 connector = &nv_connector->base; in nouveau_connector_create()
1340 /* attempt to parse vbios connector type and hotplug gpio */ in nouveau_connector_create()
1344 NV_WARN(drm, "unknown connector type %02x\n", in nouveau_connector_create()
1350 /* no vbios data, or an unknown dcb connector type - attempt to in nouveau_connector_create()
1360 if (dcbt->entry[i].connector == nv_connector->index) in nouveau_connector_create()
1384 drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type); in nouveau_connector_create()
1386 drm_connector_init(dev, connector, &nouveau_connector_funcs, type); in nouveau_connector_create()
1400 nv_connector->aux.dev = connector->kdev; in nouveau_connector_create()
1403 nv_connector->aux.name = connector->name; in nouveau_connector_create()
1415 connector->stereo_allowed = true; in nouveau_connector_create()
1418 connector->interlace_allowed = false; in nouveau_connector_create()
1419 connector->doublescan_allowed = false; in nouveau_connector_create()
1421 drm_connector_helper_add(connector, &nouveau_connector_helper_funcs); in nouveau_connector_create()
1422 connector->polled = DRM_CONNECTOR_POLL_CONNECT; in nouveau_connector_create()
1430 connector->polled = DRM_CONNECTOR_POLL_HPD; in nouveau_connector_create()
1444 connector->funcs->reset(connector); in nouveau_connector_create()
1445 nouveau_conn_attach_properties(connector); in nouveau_connector_create()
1481 drm_dp_cec_register_connector(&nv_connector->aux, connector); in nouveau_connector_create()
1485 drm_connector_register(connector); in nouveau_connector_create()
1486 return connector; in nouveau_connector_create()
1489 drm_connector_cleanup(connector); in nouveau_connector_create()