Lines Matching defs:connector
121 drm_connector_get_tiled_mode(struct drm_connector *connector)
125 list_for_each_entry(mode, &connector->modes, head) {
126 if (mode->hdisplay == connector->tile_h_size &&
127 mode->vdisplay == connector->tile_v_size)
134 drm_connector_fallback_non_tiled_mode(struct drm_connector *connector)
138 list_for_each_entry(mode, &connector->modes, head) {
139 if (mode->hdisplay == connector->tile_h_size &&
140 mode->vdisplay == connector->tile_v_size)
148 drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height)
152 list_for_each_entry(mode, &connector->modes, head) {
162 static struct drm_display_mode *drm_connector_pick_cmdline_mode(struct drm_connector *connector)
174 list_for_each_entry(mode, &connector->modes, head) {
179 cmdline_mode = &connector->cmdline_mode;
190 list_for_each_entry(mode, &connector->modes, head) {
219 static bool drm_connector_enabled(struct drm_connector *connector, bool strict)
223 if (connector->display_info.non_desktop)
227 enable = connector->status == connector_status_connected;
229 enable = connector->status != connector_status_disconnected;
239 struct drm_connector *connector;
243 connector = connectors[i];
244 enabled[i] = drm_connector_enabled(connector, true);
245 DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id,
246 connector->display_info.non_desktop ? "non desktop" : str_yes_no(enabled[i]));
279 /* only contemplate cloning if more than one connector is enabled */
310 /* try and find a 1024x768 mode on each connector */
350 struct drm_connector *connector;
355 connector = connectors[i];
356 if (!connector->has_tile)
360 DRM_DEBUG_KMS("no modes for connector tiled %d %d\n", i,
361 connector->base.id);
364 if (connector->tile_h_loc < h_idx)
367 if (connector->tile_v_loc < v_idx)
383 struct drm_connector *connector;
397 connector = connectors[i];
408 if (tile_pass == 0 && connector->has_tile)
412 if (connector->tile_h_loc != 0 ||
413 connector->tile_v_loc != 0)
417 if (connector->tile_h_loc != tile_pass - 1 &&
418 connector->tile_v_loc != tile_pass - 1)
427 connector->tile_h_loc, connector->tile_v_loc);
429 DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
430 connector->base.id);
433 modes[i] = drm_connector_pick_cmdline_mode(connector);
435 DRM_DEBUG_KMS("looking for preferred mode on connector %d %d\n",
436 connector->base.id, connector->tile_group ? connector->tile_group->id : 0);
437 modes[i] = drm_connector_has_preferred_mode(connector, width, height);
440 if (!modes[i] && !list_empty(&connector->modes)) {
441 list_for_each_entry(modes[i], &connector->modes, head)
452 if (connector->has_tile) {
454 connector->num_h_tile * connector->num_v_tile ||
455 (connector->tile_h_loc == 0 &&
456 connector->tile_v_loc == 0 &&
457 !drm_connector_get_tiled_mode(connector))) {
459 connector->base.id);
460 modes[i] = drm_connector_fallback_non_tiled_mode(connector);
462 modes[i] = drm_connector_get_tiled_mode(connector);
478 static bool connector_has_possible_crtc(struct drm_connector *connector,
483 drm_connector_for_each_possible_encoder(connector, encoder) {
499 struct drm_connector *connector;
508 connector = connectors[n];
521 if (connector->status == connector_status_connected)
523 if (connector->cmdline_mode.specified)
525 if (drm_connector_has_preferred_mode(connector, width, height))
529 * select a crtc for this connector and then attempt to configure
535 if (!connector_has_possible_crtc(connector, crtc))
611 struct drm_connector *connector;
615 connector = connectors[i];
620 if (conn_seq == 0 && !connector->has_tile)
623 if (connector->status == connector_status_connected)
627 DRM_DEBUG_KMS("connector %s not enabled, skipping\n",
628 connector->name);
633 if (connector->force == DRM_FORCE_OFF) {
634 DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n",
635 connector->name);
640 encoder = connector->state->best_encoder;
641 if (!encoder || WARN_ON(!connector->state->crtc)) {
642 if (connector->force > DRM_FORCE_OFF)
645 DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n",
646 connector->name);
654 new_crtc = connector->state->crtc;
668 DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n",
669 connector->name);
672 modes[i] = drm_connector_pick_cmdline_mode(connector);
676 DRM_DEBUG_KMS("looking for preferred mode on connector %s %d\n",
677 connector->name, connector->has_tile);
678 modes[i] = drm_connector_has_preferred_mode(connector, width, height);
682 if (!modes[i] && !list_empty(&connector->modes)) {
683 DRM_DEBUG_KMS("using first mode listed on connector %s\n",
684 connector->name);
685 modes[i] = list_first_entry(&connector->modes,
703 DRM_DEBUG_KMS("looking for current mode on connector %s\n",
704 connector->name);
705 modes[i] = &connector->state->crtc->mode;
711 if (connector->has_tile &&
712 num_tiled_conns < connector->num_h_tile * connector->num_v_tile) {
714 connector->base.id);
715 modes[i] = drm_connector_fallback_non_tiled_mode(connector);
719 DRM_DEBUG_KMS("connector %s on [CRTC:%d:%s]: %dx%d%s\n",
720 connector->name,
721 connector->state->crtc->base.id,
722 connector->state->crtc->name,
774 struct drm_connector *connector, **connectors = NULL;
794 drm_client_for_each_connector_iter(connector, &conn_iter) {
814 drm_connector_get(connector);
815 connectors[connector_count++] = connector;
869 struct drm_connector *connector = connectors[i];
887 drm_connector_get(connector);
888 modeset->connectors[modeset->num_connectors++] = connector;
916 * to match the rotation needed on its connector.
925 struct drm_connector *connector = modeset->connectors[0];
934 switch (connector->display_info.panel_orientation) {
960 cmdline = &connector->cmdline_mode;
1207 struct drm_connector *connector;
1219 connector = modeset->connectors[j];
1220 connector->funcs->dpms(connector, dpms_mode);
1221 drm_object_property_set_value(&connector->base,