Lines Matching full:connector
118 drm_connector_get_tiled_mode(struct drm_connector *connector) in drm_connector_get_tiled_mode() argument
122 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_get_tiled_mode()
123 if (mode->hdisplay == connector->tile_h_size && in drm_connector_get_tiled_mode()
124 mode->vdisplay == connector->tile_v_size) in drm_connector_get_tiled_mode()
131 drm_connector_fallback_non_tiled_mode(struct drm_connector *connector) in drm_connector_fallback_non_tiled_mode() argument
135 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_fallback_non_tiled_mode()
136 if (mode->hdisplay == connector->tile_h_size && in drm_connector_fallback_non_tiled_mode()
137 mode->vdisplay == connector->tile_v_size) in drm_connector_fallback_non_tiled_mode()
145 drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height) in drm_connector_has_preferred_mode() argument
149 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_has_preferred_mode()
160 drm_connector_pick_cmdline_mode(struct drm_connector *connector) in drm_connector_pick_cmdline_mode() argument
166 cmdline_mode = &connector->cmdline_mode; in drm_connector_pick_cmdline_mode()
178 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_pick_cmdline_mode()
209 mode = drm_mode_create_from_cmdline_mode(connector->dev, cmdline_mode); in drm_connector_pick_cmdline_mode()
211 list_add(&mode->head, &connector->modes); in drm_connector_pick_cmdline_mode()
216 static bool drm_connector_enabled(struct drm_connector *connector, bool strict) in drm_connector_enabled() argument
220 if (connector->display_info.non_desktop) in drm_connector_enabled()
224 enable = connector->status == connector_status_connected; in drm_connector_enabled()
226 enable = connector->status != connector_status_disconnected; in drm_connector_enabled()
236 struct drm_connector *connector; in drm_client_connectors_enabled() local
240 connector = connectors[i]; in drm_client_connectors_enabled()
241 enabled[i] = drm_connector_enabled(connector, true); in drm_client_connectors_enabled()
242 DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id, in drm_client_connectors_enabled()
243 connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no"); in drm_client_connectors_enabled()
276 /* only contemplate cloning if more than one connector is enabled */ in drm_client_target_cloned()
307 /* try and find a 1024x768 mode on each connector */ in drm_client_target_cloned()
342 struct drm_connector *connector; in drm_client_get_tile_offsets() local
347 connector = connectors[i]; in drm_client_get_tile_offsets()
348 if (!connector->has_tile) in drm_client_get_tile_offsets()
352 DRM_DEBUG_KMS("no modes for connector tiled %d %d\n", i, in drm_client_get_tile_offsets()
353 connector->base.id); in drm_client_get_tile_offsets()
356 if (connector->tile_h_loc < h_idx) in drm_client_get_tile_offsets()
359 if (connector->tile_v_loc < v_idx) in drm_client_get_tile_offsets()
375 struct drm_connector *connector; in drm_client_target_preferred() local
389 connector = connectors[i]; in drm_client_target_preferred()
400 if (tile_pass == 0 && connector->has_tile) in drm_client_target_preferred()
404 if (connector->tile_h_loc != 0 || in drm_client_target_preferred()
405 connector->tile_v_loc != 0) in drm_client_target_preferred()
409 if (connector->tile_h_loc != tile_pass - 1 && in drm_client_target_preferred()
410 connector->tile_v_loc != tile_pass - 1) in drm_client_target_preferred()
419 connector->tile_h_loc, connector->tile_v_loc); in drm_client_target_preferred()
421 DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n", in drm_client_target_preferred()
422 connector->base.id); in drm_client_target_preferred()
425 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_target_preferred()
427 DRM_DEBUG_KMS("looking for preferred mode on connector %d %d\n", in drm_client_target_preferred()
428 connector->base.id, connector->tile_group ? connector->tile_group->id : 0); in drm_client_target_preferred()
429 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_target_preferred()
432 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_target_preferred()
433 list_for_each_entry(modes[i], &connector->modes, head) in drm_client_target_preferred()
444 if (connector->has_tile) { in drm_client_target_preferred()
446 connector->num_h_tile * connector->num_v_tile || in drm_client_target_preferred()
447 (connector->tile_h_loc == 0 && in drm_client_target_preferred()
448 connector->tile_v_loc == 0 && in drm_client_target_preferred()
449 !drm_connector_get_tiled_mode(connector))) { in drm_client_target_preferred()
450 DRM_DEBUG_KMS("Falling back to non tiled mode on Connector %d\n", in drm_client_target_preferred()
451 connector->base.id); in drm_client_target_preferred()
452 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_target_preferred()
454 modes[i] = drm_connector_get_tiled_mode(connector); in drm_client_target_preferred()
470 static bool connector_has_possible_crtc(struct drm_connector *connector, in connector_has_possible_crtc() argument
475 drm_connector_for_each_possible_encoder(connector, encoder) { in connector_has_possible_crtc()
491 struct drm_connector *connector; in drm_client_pick_crtcs() local
500 connector = connectors[n]; in drm_client_pick_crtcs()
513 if (connector->status == connector_status_connected) in drm_client_pick_crtcs()
515 if (connector->cmdline_mode.specified) in drm_client_pick_crtcs()
517 if (drm_connector_has_preferred_mode(connector, width, height)) in drm_client_pick_crtcs()
521 * select a crtc for this connector and then attempt to configure in drm_client_pick_crtcs()
527 if (!connector_has_possible_crtc(connector, crtc)) in drm_client_pick_crtcs()
603 struct drm_connector *connector; in drm_client_firmware_config() local
607 connector = connectors[i]; in drm_client_firmware_config()
612 if (conn_seq == 0 && !connector->has_tile) in drm_client_firmware_config()
615 if (connector->status == connector_status_connected) in drm_client_firmware_config()
619 DRM_DEBUG_KMS("connector %s not enabled, skipping\n", in drm_client_firmware_config()
620 connector->name); in drm_client_firmware_config()
625 if (connector->force == DRM_FORCE_OFF) { in drm_client_firmware_config()
626 DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n", in drm_client_firmware_config()
627 connector->name); in drm_client_firmware_config()
632 encoder = connector->state->best_encoder; in drm_client_firmware_config()
633 if (!encoder || WARN_ON(!connector->state->crtc)) { in drm_client_firmware_config()
634 if (connector->force > DRM_FORCE_OFF) in drm_client_firmware_config()
637 DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n", in drm_client_firmware_config()
638 connector->name); in drm_client_firmware_config()
646 new_crtc = connector->state->crtc; in drm_client_firmware_config()
660 DRM_DEBUG_KMS("looking for cmdline mode on connector %s\n", in drm_client_firmware_config()
661 connector->name); in drm_client_firmware_config()
664 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_firmware_config()
668 DRM_DEBUG_KMS("looking for preferred mode on connector %s %d\n", in drm_client_firmware_config()
669 connector->name, connector->has_tile); in drm_client_firmware_config()
670 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_firmware_config()
674 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_firmware_config()
675 DRM_DEBUG_KMS("using first mode listed on connector %s\n", in drm_client_firmware_config()
676 connector->name); in drm_client_firmware_config()
677 modes[i] = list_first_entry(&connector->modes, in drm_client_firmware_config()
695 DRM_DEBUG_KMS("looking for current mode on connector %s\n", in drm_client_firmware_config()
696 connector->name); in drm_client_firmware_config()
697 modes[i] = &connector->state->crtc->mode; in drm_client_firmware_config()
703 if (connector->has_tile && in drm_client_firmware_config()
704 num_tiled_conns < connector->num_h_tile * connector->num_v_tile) { in drm_client_firmware_config()
705 DRM_DEBUG_KMS("Falling back to non tiled mode on Connector %d\n", in drm_client_firmware_config()
706 connector->base.id); in drm_client_firmware_config()
707 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_firmware_config()
711 DRM_DEBUG_KMS("connector %s on [CRTC:%d:%s]: %dx%d%s\n", in drm_client_firmware_config()
712 connector->name, in drm_client_firmware_config()
713 connector->state->crtc->base.id, in drm_client_firmware_config()
714 connector->state->crtc->name, in drm_client_firmware_config()
766 struct drm_connector *connector, **connectors = NULL; in drm_client_modeset_probe() local
785 drm_client_for_each_connector_iter(connector, &conn_iter) { in drm_client_modeset_probe()
795 drm_connector_get(connector); in drm_client_modeset_probe()
796 connectors[connector_count++] = connector; in drm_client_modeset_probe()
851 struct drm_connector *connector = connectors[i]; in drm_client_modeset_probe() local
863 drm_connector_get(connector); in drm_client_modeset_probe()
864 modeset->connectors[modeset->num_connectors++] = connector; in drm_client_modeset_probe()
891 * to match the rotation needed on its connector.
900 struct drm_connector *connector = modeset->connectors[0]; in drm_client_rotation() local
909 switch (connector->display_info.panel_orientation) { in drm_client_rotation()
935 cmdline = &connector->cmdline_mode; in drm_client_rotation()
1182 struct drm_connector *connector; in drm_client_modeset_dpms_legacy() local
1192 connector = modeset->connectors[j]; in drm_client_modeset_dpms_legacy()
1193 connector->funcs->dpms(connector, dpms_mode); in drm_client_modeset_dpms_legacy()
1194 drm_object_property_set_value(&connector->base, in drm_client_modeset_dpms_legacy()