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()
219 static bool drm_connector_enabled(struct drm_connector *connector, bool strict) in drm_connector_enabled() argument
223 if (connector->display_info.non_desktop) in drm_connector_enabled()
227 enable = connector->status == connector_status_connected; in drm_connector_enabled()
229 enable = connector->status != connector_status_disconnected; in drm_connector_enabled()
239 struct drm_connector *connector; in drm_client_connectors_enabled() local
243 connector = connectors[i]; in drm_client_connectors_enabled()
244 enabled[i] = drm_connector_enabled(connector, true); in drm_client_connectors_enabled()
245 drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] enabled? %s\n", in drm_client_connectors_enabled()
246 connector->base.id, connector->name, in drm_client_connectors_enabled()
247 connector->display_info.non_desktop ? in drm_client_connectors_enabled()
281 /* only contemplate cloning if more than one connector is enabled */ in drm_client_target_cloned()
312 /* try and find a 1024x768 mode on each connector */ in drm_client_target_cloned()
353 struct drm_connector *connector; in drm_client_get_tile_offsets() local
358 connector = connectors[i]; in drm_client_get_tile_offsets()
359 if (!connector->has_tile) in drm_client_get_tile_offsets()
364 "[CONNECTOR:%d:%s] no modes for connector tiled %d\n", in drm_client_get_tile_offsets()
365 connector->base.id, connector->name, i); in drm_client_get_tile_offsets()
368 if (connector->tile_h_loc < h_idx) in drm_client_get_tile_offsets()
371 if (connector->tile_v_loc < v_idx) in drm_client_get_tile_offsets()
388 struct drm_connector *connector; in drm_client_target_preferred() local
402 connector = connectors[i]; in drm_client_target_preferred()
413 if (tile_pass == 0 && connector->has_tile) in drm_client_target_preferred()
417 if (connector->tile_h_loc != 0 || in drm_client_target_preferred()
418 connector->tile_v_loc != 0) in drm_client_target_preferred()
422 if (connector->tile_h_loc != tile_pass - 1 && in drm_client_target_preferred()
423 connector->tile_v_loc != tile_pass - 1) in drm_client_target_preferred()
433 connector->tile_h_loc, connector->tile_v_loc); in drm_client_target_preferred()
435 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] looking for cmdline mode\n", in drm_client_target_preferred()
436 connector->base.id, connector->name); in drm_client_target_preferred()
439 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_target_preferred()
441 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] looking for preferred mode, tile %d\n", in drm_client_target_preferred()
442 connector->base.id, connector->name, in drm_client_target_preferred()
443 connector->tile_group ? connector->tile_group->id : 0); in drm_client_target_preferred()
444 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_target_preferred()
447 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_target_preferred()
448 list_for_each_entry(modes[i], &connector->modes, head) in drm_client_target_preferred()
459 if (connector->has_tile) { in drm_client_target_preferred()
461 connector->num_h_tile * connector->num_v_tile || in drm_client_target_preferred()
462 (connector->tile_h_loc == 0 && in drm_client_target_preferred()
463 connector->tile_v_loc == 0 && in drm_client_target_preferred()
464 !drm_connector_get_tiled_mode(connector))) { in drm_client_target_preferred()
466 "[CONNECTOR:%d:%s] Falling back to non-tiled mode\n", in drm_client_target_preferred()
467 connector->base.id, connector->name); in drm_client_target_preferred()
468 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_target_preferred()
470 modes[i] = drm_connector_get_tiled_mode(connector); in drm_client_target_preferred()
474 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Found mode %s\n", in drm_client_target_preferred()
475 connector->base.id, connector->name, in drm_client_target_preferred()
487 static bool connector_has_possible_crtc(struct drm_connector *connector, in connector_has_possible_crtc() argument
492 drm_connector_for_each_possible_encoder(connector, encoder) { in connector_has_possible_crtc()
508 struct drm_connector *connector; in drm_client_pick_crtcs() local
517 connector = connectors[n]; in drm_client_pick_crtcs()
530 if (connector->status == connector_status_connected) in drm_client_pick_crtcs()
532 if (connector->cmdline_mode.specified) in drm_client_pick_crtcs()
534 if (drm_connector_has_preferred_mode(connector, width, height)) in drm_client_pick_crtcs()
538 * select a crtc for this connector and then attempt to configure in drm_client_pick_crtcs()
544 if (!connector_has_possible_crtc(connector, crtc)) in drm_client_pick_crtcs()
620 struct drm_connector *connector; in drm_client_firmware_config() local
624 connector = connectors[i]; in drm_client_firmware_config()
629 if (conn_seq == 0 && !connector->has_tile) in drm_client_firmware_config()
632 if (connector->status == connector_status_connected) in drm_client_firmware_config()
636 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] not enabled, skipping\n", in drm_client_firmware_config()
637 connector->base.id, connector->name); in drm_client_firmware_config()
642 if (connector->force == DRM_FORCE_OFF) { in drm_client_firmware_config()
643 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] disabled by user, skipping\n", in drm_client_firmware_config()
644 connector->base.id, connector->name); in drm_client_firmware_config()
649 encoder = connector->state->best_encoder; in drm_client_firmware_config()
650 if (!encoder || drm_WARN_ON(dev, !connector->state->crtc)) { in drm_client_firmware_config()
651 if (connector->force > DRM_FORCE_OFF) in drm_client_firmware_config()
654 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] has no encoder or crtc, skipping\n", in drm_client_firmware_config()
655 connector->base.id, connector->name); in drm_client_firmware_config()
663 new_crtc = connector->state->crtc; in drm_client_firmware_config()
677 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] looking for cmdline mode\n", in drm_client_firmware_config()
678 connector->base.id, connector->name); in drm_client_firmware_config()
681 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_firmware_config()
686 "[CONNECTOR:%d:%s] looking for preferred mode, has tile: %s\n", in drm_client_firmware_config()
687 connector->base.id, connector->name, in drm_client_firmware_config()
688 str_yes_no(connector->has_tile)); in drm_client_firmware_config()
689 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_firmware_config()
693 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_firmware_config()
694 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] using first listed mode\n", in drm_client_firmware_config()
695 connector->base.id, connector->name); in drm_client_firmware_config()
696 modes[i] = list_first_entry(&connector->modes, in drm_client_firmware_config()
714 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] looking for current mode\n", in drm_client_firmware_config()
715 connector->base.id, connector->name); in drm_client_firmware_config()
716 modes[i] = &connector->state->crtc->mode; in drm_client_firmware_config()
722 if (connector->has_tile && in drm_client_firmware_config()
723 num_tiled_conns < connector->num_h_tile * connector->num_v_tile) { in drm_client_firmware_config()
724 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Falling back to non-tiled mode\n", in drm_client_firmware_config()
725 connector->base.id, connector->name); in drm_client_firmware_config()
726 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_firmware_config()
730 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] on [CRTC:%d:%s]: %dx%d%s\n", in drm_client_firmware_config()
731 connector->base.id, connector->name, in drm_client_firmware_config()
732 connector->state->crtc->base.id, in drm_client_firmware_config()
733 connector->state->crtc->name, in drm_client_firmware_config()
785 struct drm_connector *connector, **connectors = NULL; in drm_client_modeset_probe() local
805 drm_client_for_each_connector_iter(connector, &conn_iter) { in drm_client_modeset_probe()
815 drm_connector_get(connector); in drm_client_modeset_probe()
816 connectors[connector_count++] = connector; in drm_client_modeset_probe()
869 struct drm_connector *connector = connectors[i]; in drm_client_modeset_probe() local
888 drm_connector_get(connector); in drm_client_modeset_probe()
889 modeset->connectors[modeset->num_connectors++] = connector; in drm_client_modeset_probe()
917 * to match the rotation needed on its connector.
926 struct drm_connector *connector = modeset->connectors[0]; in drm_client_rotation() local
935 switch (connector->display_info.panel_orientation) { in drm_client_rotation()
961 cmdline = &connector->cmdline_mode; in drm_client_rotation()
1208 struct drm_connector *connector; in drm_client_modeset_dpms_legacy() local
1220 connector = modeset->connectors[j]; in drm_client_modeset_dpms_legacy()
1221 connector->funcs->dpms(connector, dpms_mode); in drm_client_modeset_dpms_legacy()
1222 drm_object_property_set_value(&connector->base, in drm_client_modeset_dpms_legacy()