Lines Matching full:connector

121 drm_connector_get_tiled_mode(struct drm_connector *connector)  in drm_connector_get_tiled_mode()  argument
125 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_get_tiled_mode()
126 if (mode->hdisplay == connector->tile_h_size && in drm_connector_get_tiled_mode()
127 mode->vdisplay == connector->tile_v_size) in drm_connector_get_tiled_mode()
134 drm_connector_fallback_non_tiled_mode(struct drm_connector *connector) in drm_connector_fallback_non_tiled_mode() argument
138 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_fallback_non_tiled_mode()
139 if (mode->hdisplay == connector->tile_h_size && in drm_connector_fallback_non_tiled_mode()
140 mode->vdisplay == connector->tile_v_size) in drm_connector_fallback_non_tiled_mode()
148 drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height) in drm_connector_has_preferred_mode() argument
152 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_has_preferred_mode()
162 static struct drm_display_mode *drm_connector_pick_cmdline_mode(struct drm_connector *connector) in drm_connector_pick_cmdline_mode() argument
174 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_pick_cmdline_mode()
179 cmdline_mode = &connector->cmdline_mode; in drm_connector_pick_cmdline_mode()
190 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_pick_cmdline_mode()
223 static bool drm_connector_enabled(struct drm_connector *connector, bool strict) in drm_connector_enabled() argument
227 if (connector->display_info.non_desktop) in drm_connector_enabled()
231 enable = connector->status == connector_status_connected; in drm_connector_enabled()
233 enable = connector->status != connector_status_disconnected; in drm_connector_enabled()
243 struct drm_connector *connector; in drm_client_connectors_enabled() local
247 connector = connectors[i]; in drm_client_connectors_enabled()
248 enabled[i] = drm_connector_enabled(connector, true); in drm_client_connectors_enabled()
249 DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id, in drm_client_connectors_enabled()
250 connector->display_info.non_desktop ? "non desktop" : str_yes_no(enabled[i])); in drm_client_connectors_enabled()
283 /* only contemplate cloning if more than one connector is enabled */ in drm_client_target_cloned()
314 /* try and find a 1024x768 mode on each connector */ in drm_client_target_cloned()
349 struct drm_connector *connector; in drm_client_get_tile_offsets() local
354 connector = connectors[i]; in drm_client_get_tile_offsets()
355 if (!connector->has_tile) in drm_client_get_tile_offsets()
359 DRM_DEBUG_KMS("no modes for connector tiled %d %d\n", i, in drm_client_get_tile_offsets()
360 connector->base.id); in drm_client_get_tile_offsets()
363 if (connector->tile_h_loc < h_idx) in drm_client_get_tile_offsets()
366 if (connector->tile_v_loc < v_idx) in drm_client_get_tile_offsets()
382 struct drm_connector *connector; in drm_client_target_preferred() local
396 connector = connectors[i]; in drm_client_target_preferred()
407 if (tile_pass == 0 && connector->has_tile) in drm_client_target_preferred()
411 if (connector->tile_h_loc != 0 || in drm_client_target_preferred()
412 connector->tile_v_loc != 0) in drm_client_target_preferred()
416 if (connector->tile_h_loc != tile_pass - 1 && in drm_client_target_preferred()
417 connector->tile_v_loc != tile_pass - 1) in drm_client_target_preferred()
426 connector->tile_h_loc, connector->tile_v_loc); in drm_client_target_preferred()
428 DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n", in drm_client_target_preferred()
429 connector->base.id); in drm_client_target_preferred()
432 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_target_preferred()
434 DRM_DEBUG_KMS("looking for preferred mode on connector %d %d\n", in drm_client_target_preferred()
435 connector->base.id, connector->tile_group ? connector->tile_group->id : 0); in drm_client_target_preferred()
436 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_target_preferred()
439 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_target_preferred()
440 list_for_each_entry(modes[i], &connector->modes, head) in drm_client_target_preferred()
451 if (connector->has_tile) { in drm_client_target_preferred()
453 connector->num_h_tile * connector->num_v_tile || in drm_client_target_preferred()
454 (connector->tile_h_loc == 0 && in drm_client_target_preferred()
455 connector->tile_v_loc == 0 && in drm_client_target_preferred()
456 !drm_connector_get_tiled_mode(connector))) { in drm_client_target_preferred()
457 DRM_DEBUG_KMS("Falling back to non tiled mode on Connector %d\n", in drm_client_target_preferred()
458 connector->base.id); in drm_client_target_preferred()
459 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_target_preferred()
461 modes[i] = drm_connector_get_tiled_mode(connector); in drm_client_target_preferred()
477 static bool connector_has_possible_crtc(struct drm_connector *connector, in connector_has_possible_crtc() argument
482 drm_connector_for_each_possible_encoder(connector, encoder) { in connector_has_possible_crtc()
498 struct drm_connector *connector; in drm_client_pick_crtcs() local
507 connector = connectors[n]; in drm_client_pick_crtcs()
520 if (connector->status == connector_status_connected) in drm_client_pick_crtcs()
522 if (connector->cmdline_mode.specified) in drm_client_pick_crtcs()
524 if (drm_connector_has_preferred_mode(connector, width, height)) in drm_client_pick_crtcs()
528 * select a crtc for this connector and then attempt to configure in drm_client_pick_crtcs()
534 if (!connector_has_possible_crtc(connector, crtc)) in drm_client_pick_crtcs()
610 struct drm_connector *connector; in drm_client_firmware_config() local
614 connector = connectors[i]; in drm_client_firmware_config()
619 if (conn_seq == 0 && !connector->has_tile) in drm_client_firmware_config()
622 if (connector->status == connector_status_connected) in drm_client_firmware_config()
626 DRM_DEBUG_KMS("connector %s not enabled, skipping\n", in drm_client_firmware_config()
627 connector->name); in drm_client_firmware_config()
632 if (connector->force == DRM_FORCE_OFF) { in drm_client_firmware_config()
633 DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n", in drm_client_firmware_config()
634 connector->name); in drm_client_firmware_config()
639 encoder = connector->state->best_encoder; in drm_client_firmware_config()
640 if (!encoder || WARN_ON(!connector->state->crtc)) { in drm_client_firmware_config()
641 if (connector->force > DRM_FORCE_OFF) in drm_client_firmware_config()
644 DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n", in drm_client_firmware_config()
645 connector->name); in drm_client_firmware_config()
653 new_crtc = connector->state->crtc; in drm_client_firmware_config()
667 DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n", in drm_client_firmware_config()
668 connector->name); in drm_client_firmware_config()
671 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_firmware_config()
675 DRM_DEBUG_KMS("looking for preferred mode on connector %s %d\n", in drm_client_firmware_config()
676 connector->name, connector->has_tile); in drm_client_firmware_config()
677 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_firmware_config()
681 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_firmware_config()
682 DRM_DEBUG_KMS("using first mode listed on connector %s\n", in drm_client_firmware_config()
683 connector->name); in drm_client_firmware_config()
684 modes[i] = list_first_entry(&connector->modes, in drm_client_firmware_config()
702 DRM_DEBUG_KMS("looking for current mode on connector %s\n", in drm_client_firmware_config()
703 connector->name); in drm_client_firmware_config()
704 modes[i] = &connector->state->crtc->mode; in drm_client_firmware_config()
710 if (connector->has_tile && in drm_client_firmware_config()
711 num_tiled_conns < connector->num_h_tile * connector->num_v_tile) { in drm_client_firmware_config()
712 DRM_DEBUG_KMS("Falling back to non tiled mode on Connector %d\n", in drm_client_firmware_config()
713 connector->base.id); in drm_client_firmware_config()
714 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_firmware_config()
718 DRM_DEBUG_KMS("connector %s on [CRTC:%d:%s]: %dx%d%s\n", in drm_client_firmware_config()
719 connector->name, in drm_client_firmware_config()
720 connector->state->crtc->base.id, in drm_client_firmware_config()
721 connector->state->crtc->name, in drm_client_firmware_config()
773 struct drm_connector *connector, **connectors = NULL; in drm_client_modeset_probe() local
792 drm_client_for_each_connector_iter(connector, &conn_iter) { in drm_client_modeset_probe()
802 drm_connector_get(connector); in drm_client_modeset_probe()
803 connectors[connector_count++] = connector; in drm_client_modeset_probe()
858 struct drm_connector *connector = connectors[i]; in drm_client_modeset_probe() local
870 drm_connector_get(connector); in drm_client_modeset_probe()
871 modeset->connectors[modeset->num_connectors++] = connector; in drm_client_modeset_probe()
898 * to match the rotation needed on its connector.
907 struct drm_connector *connector = modeset->connectors[0]; in drm_client_rotation() local
916 switch (connector->display_info.panel_orientation) { in drm_client_rotation()
942 cmdline = &connector->cmdline_mode; in drm_client_rotation()
1189 struct drm_connector *connector; in drm_client_modeset_dpms_legacy() local
1201 connector = modeset->connectors[j]; in drm_client_modeset_dpms_legacy()
1202 connector->funcs->dpms(connector, dpms_mode); in drm_client_modeset_dpms_legacy()
1203 drm_object_property_set_value(&connector->base, in drm_client_modeset_dpms_legacy()