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()
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()
400 drm_connector_unregister(connector); in nouveau_connector_destroy()
401 drm_connector_cleanup(connector); in nouveau_connector_destroy()
407 kfree(connector); in nouveau_connector_destroy()
411 nouveau_connector_ddc_detect(struct drm_connector *connector) in nouveau_connector_ddc_detect() argument
413 struct drm_device *dev = connector->dev; in nouveau_connector_ddc_detect()
419 drm_connector_for_each_possible_encoder(connector, encoder) { in nouveau_connector_ddc_detect()
424 ret = nouveau_dp_detect(nouveau_connector(connector), in nouveau_connector_ddc_detect()
457 nouveau_connector_of_detect(struct drm_connector *connector) in nouveau_connector_of_detect() argument
460 struct drm_device *dev = connector->dev; in nouveau_connector_of_detect()
461 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_of_detect()
466 !((nv_encoder = find_encoder(connector, DCB_OUTPUT_TMDS)) || in nouveau_connector_of_detect()
467 (nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG)))) in nouveau_connector_of_detect()
487 nouveau_connector_set_encoder(struct drm_connector *connector, in nouveau_connector_set_encoder() argument
490 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_encoder()
491 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_set_encoder()
492 struct drm_device *dev = connector->dev; in nouveau_connector_set_encoder()
500 connector->interlace_allowed = in nouveau_connector_set_encoder()
503 connector->interlace_allowed = true; in nouveau_connector_set_encoder()
504 connector->doublescan_allowed = true; in nouveau_connector_set_encoder()
508 connector->doublescan_allowed = false; in nouveau_connector_set_encoder()
509 connector->interlace_allowed = false; in nouveau_connector_set_encoder()
511 connector->doublescan_allowed = true; in nouveau_connector_set_encoder()
517 connector->interlace_allowed = false; in nouveau_connector_set_encoder()
519 connector->interlace_allowed = true; in nouveau_connector_set_encoder()
523 drm_object_property_set_value(&connector->base, in nouveau_connector_set_encoder()
545 nouveau_connector_detect(struct drm_connector *connector, bool force) in nouveau_connector_detect() argument
547 struct drm_device *dev = connector->dev; in nouveau_connector_detect()
549 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect()
574 nv_encoder = nouveau_connector_ddc_detect(connector); in nouveau_connector_detect()
581 new_edid = drm_get_edid_switcheroo(connector, i2c); in nouveau_connector_detect()
583 new_edid = drm_get_edid(connector, i2c); in nouveau_connector_detect()
588 connector->name); in nouveau_connector_detect()
599 nv_partner = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
601 nv_partner = find_encoder(connector, DCB_OUTPUT_TMDS); in nouveau_connector_detect()
612 nv_encoder = find_encoder(connector, type); in nouveau_connector_detect()
615 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
623 nv_encoder = nouveau_connector_of_detect(connector); in nouveau_connector_detect()
625 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
631 nv_encoder = find_encoder(connector, DCB_OUTPUT_ANALOG); in nouveau_connector_detect()
633 nv_encoder = find_encoder(connector, DCB_OUTPUT_TV); in nouveau_connector_detect()
639 if (helper->detect(encoder, connector) == in nouveau_connector_detect()
641 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect()
658 nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) in nouveau_connector_detect_lvds() argument
660 struct drm_device *dev = connector->dev; in nouveau_connector_detect_lvds()
662 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_lvds()
667 nv_encoder = find_encoder(connector, DCB_OUTPUT_LVDS); in nouveau_connector_detect_lvds()
673 status = nouveau_connector_detect(connector, force); in nouveau_connector_detect_lvds()
690 edid = nouveau_acpi_edid(dev, connector); in nouveau_connector_detect_lvds()
728 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_detect_lvds()
733 nouveau_connector_force(struct drm_connector *connector) in nouveau_connector_force() argument
735 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_force()
736 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_force()
741 if (connector->force == DRM_FORCE_ON_DIGITAL) in nouveau_connector_force()
748 nv_encoder = find_encoder(connector, type); in nouveau_connector_force()
751 connector->name); in nouveau_connector_force()
752 connector->status = connector_status_disconnected; in nouveau_connector_force()
756 nouveau_connector_set_encoder(connector, nv_encoder); in nouveau_connector_force()
760 nouveau_connector_set_property(struct drm_connector *connector, in nouveau_connector_set_property() argument
763 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_property()
769 ret = connector->funcs->atomic_set_property(&nv_connector->base, in nouveau_connector_set_property()
775 encoder, connector, property, value); in nouveau_connector_set_property()
782 if (connector->encoder && connector->encoder->crtc) { in nouveau_connector_set_property()
783 ret = drm_crtc_helper_set_mode(connector->encoder->crtc, in nouveau_connector_set_property()
784 &connector->encoder->crtc->mode, in nouveau_connector_set_property()
785 connector->encoder->crtc->x, in nouveau_connector_set_property()
786 connector->encoder->crtc->y, in nouveau_connector_set_property()
819 nouveau_connector_scaler_modes_add(struct drm_connector *connector) in nouveau_connector_scaler_modes_add() argument
821 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_scaler_modes_add()
823 struct drm_device *dev = connector->dev; in nouveau_connector_scaler_modes_add()
841 drm_mode_probed_add(connector, m); in nouveau_connector_scaler_modes_add()
852 nouveau_connector_detect_depth(struct drm_connector *connector) in nouveau_connector_detect_depth() argument
854 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_detect_depth()
855 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_depth()
862 if (nv_connector->edid && connector->display_info.bpc) in nouveau_connector_detect_depth()
867 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
873 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
877 connector->display_info.bpc = 6; in nouveau_connector_detect_depth()
882 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
897 connector->display_info.bpc = 8; in nouveau_connector_detect_depth()
901 nouveau_connector_late_register(struct drm_connector *connector) in nouveau_connector_late_register() argument
905 ret = nouveau_backlight_init(connector); in nouveau_connector_late_register()
911 nouveau_connector_early_unregister(struct drm_connector *connector) in nouveau_connector_early_unregister() argument
913 nouveau_backlight_fini(connector); in nouveau_connector_early_unregister()
917 nouveau_connector_get_modes(struct drm_connector *connector) in nouveau_connector_get_modes() argument
919 struct drm_device *dev = connector->dev; in nouveau_connector_get_modes()
921 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_get_modes()
934 ret = drm_add_edid_modes(connector, nv_connector->edid); in nouveau_connector_get_modes()
948 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS) in nouveau_connector_get_modes()
949 nouveau_connector_detect_depth(connector); in nouveau_connector_get_modes()
956 nv_connector->native_mode = nouveau_conn_native_mode(connector); in nouveau_connector_get_modes()
961 drm_mode_probed_add(connector, mode); 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()
973 ret = get_slave_funcs(encoder)->get_modes(encoder, connector); in nouveau_connector_get_modes()
978 ret += nouveau_connector_scaler_modes_add(connector); in nouveau_connector_get_modes()
984 get_tmds_link_bandwidth(struct drm_connector *connector) in get_tmds_link_bandwidth() argument
986 struct nouveau_connector *nv_connector = nouveau_connector(connector); in get_tmds_link_bandwidth()
988 struct nouveau_drm *drm = nouveau_drm(connector->dev); in get_tmds_link_bandwidth()
1031 nouveau_connector_mode_valid(struct drm_connector *connector, in nouveau_connector_mode_valid() argument
1034 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_mode_valid()
1050 max_clock = get_tmds_link_bandwidth(connector); in nouveau_connector_mode_valid()
1060 return nv50_dp_mode_valid(connector, nv_encoder, mode, NULL); in nouveau_connector_mode_valid()
1078 nouveau_connector_best_encoder(struct drm_connector *connector) in nouveau_connector_best_encoder() argument
1080 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_best_encoder()
1130 nouveau_connector_hpd(struct drm_connector *connector) in nouveau_connector_hpd() argument
1132 struct nouveau_drm *drm = nouveau_drm(connector->dev); in nouveau_connector_hpd()
1133 u32 mask = drm_connector_mask(connector); in nouveau_connector_hpd()
1148 struct drm_connector *connector = &nv_connector->base; in nouveau_connector_hotplug() local
1149 struct drm_device *dev = connector->dev; in nouveau_connector_hotplug()
1159 NV_DEBUG(drm, "%splugged %s\n", plugged ? "" : "un", connector->name); in nouveau_connector_hotplug()
1160 nouveau_connector_hpd(connector); in nouveau_connector_hotplug()
1234 struct drm_connector *connector; in nouveau_connector_create() local
1237 int index = dcbe->connector; in nouveau_connector_create()
1242 nouveau_for_each_non_mst_connector_iter(connector, &conn_iter) { in nouveau_connector_create()
1243 nv_connector = nouveau_connector(connector); in nouveau_connector_create()
1246 return connector; in nouveau_connector_create()
1255 connector = &nv_connector->base; in nouveau_connector_create()
1258 /* attempt to parse vbios connector type and hotplug gpio */ in nouveau_connector_create()
1268 NV_WARN(drm, "unknown connector type %02x\n", in nouveau_connector_create()
1288 /* no vbios data, or an unknown dcb connector type - attempt to in nouveau_connector_create()
1298 if (dcbt->entry[i].connector == nv_connector->index) in nouveau_connector_create()
1338 nv_connector->aux.dev = connector->kdev; in nouveau_connector_create()
1361 connector->stereo_allowed = true; in nouveau_connector_create()
1364 connector->interlace_allowed = false; in nouveau_connector_create()
1365 connector->doublescan_allowed = false; in nouveau_connector_create()
1367 drm_connector_init(dev, connector, funcs, type); in nouveau_connector_create()
1368 drm_connector_helper_add(connector, &nouveau_connector_helper_funcs); in nouveau_connector_create()
1370 connector->funcs->reset(connector); in nouveau_connector_create()
1371 nouveau_conn_attach_properties(connector); in nouveau_connector_create()
1405 drm_dp_cec_register_connector(&nv_connector->aux, connector); in nouveau_connector_create()
1420 connector->polled = DRM_CONNECTOR_POLL_CONNECT; in nouveau_connector_create()
1422 connector->polled = DRM_CONNECTOR_POLL_HPD; in nouveau_connector_create()
1424 drm_connector_register(connector); in nouveau_connector_create()
1425 return connector; in nouveau_connector_create()