Lines Matching refs:connector
119 drm_connector_get_tiled_mode(struct drm_connector *connector) in drm_connector_get_tiled_mode() argument
123 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_get_tiled_mode()
124 if (mode->hdisplay == connector->tile_h_size && in drm_connector_get_tiled_mode()
125 mode->vdisplay == connector->tile_v_size) in drm_connector_get_tiled_mode()
132 drm_connector_fallback_non_tiled_mode(struct drm_connector *connector) in drm_connector_fallback_non_tiled_mode() argument
136 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_fallback_non_tiled_mode()
137 if (mode->hdisplay == connector->tile_h_size && in drm_connector_fallback_non_tiled_mode()
138 mode->vdisplay == connector->tile_v_size) in drm_connector_fallback_non_tiled_mode()
146 drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height) in drm_connector_has_preferred_mode() argument
150 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_has_preferred_mode()
161 drm_connector_pick_cmdline_mode(struct drm_connector *connector) in drm_connector_pick_cmdline_mode() argument
167 cmdline_mode = &connector->cmdline_mode; in drm_connector_pick_cmdline_mode()
179 list_for_each_entry(mode, &connector->modes, head) { in drm_connector_pick_cmdline_mode()
210 mode = drm_mode_create_from_cmdline_mode(connector->dev, cmdline_mode); in drm_connector_pick_cmdline_mode()
212 list_add(&mode->head, &connector->modes); in drm_connector_pick_cmdline_mode()
217 static bool drm_connector_enabled(struct drm_connector *connector, bool strict) in drm_connector_enabled() argument
221 if (connector->display_info.non_desktop) in drm_connector_enabled()
225 enable = connector->status == connector_status_connected; in drm_connector_enabled()
227 enable = connector->status != connector_status_disconnected; in drm_connector_enabled()
237 struct drm_connector *connector; in drm_client_connectors_enabled() local
241 connector = connectors[i]; in drm_client_connectors_enabled()
242 enabled[i] = drm_connector_enabled(connector, true); in drm_client_connectors_enabled()
243 DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id, in drm_client_connectors_enabled()
244 connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no"); in drm_client_connectors_enabled()
343 struct drm_connector *connector; in drm_client_get_tile_offsets() local
348 connector = connectors[i]; in drm_client_get_tile_offsets()
349 if (!connector->has_tile) in drm_client_get_tile_offsets()
354 connector->base.id); in drm_client_get_tile_offsets()
357 if (connector->tile_h_loc < h_idx) in drm_client_get_tile_offsets()
360 if (connector->tile_v_loc < v_idx) in drm_client_get_tile_offsets()
376 struct drm_connector *connector; in drm_client_target_preferred() local
390 connector = connectors[i]; in drm_client_target_preferred()
401 if (tile_pass == 0 && connector->has_tile) in drm_client_target_preferred()
405 if (connector->tile_h_loc != 0 || in drm_client_target_preferred()
406 connector->tile_v_loc != 0) in drm_client_target_preferred()
410 if (connector->tile_h_loc != tile_pass - 1 && in drm_client_target_preferred()
411 connector->tile_v_loc != tile_pass - 1) in drm_client_target_preferred()
420 connector->tile_h_loc, connector->tile_v_loc); in drm_client_target_preferred()
423 connector->base.id); in drm_client_target_preferred()
426 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_target_preferred()
429 connector->base.id, connector->tile_group ? connector->tile_group->id : 0); in drm_client_target_preferred()
430 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_target_preferred()
433 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_target_preferred()
434 list_for_each_entry(modes[i], &connector->modes, head) in drm_client_target_preferred()
445 if (connector->has_tile) { in drm_client_target_preferred()
447 connector->num_h_tile * connector->num_v_tile || in drm_client_target_preferred()
448 (connector->tile_h_loc == 0 && in drm_client_target_preferred()
449 connector->tile_v_loc == 0 && in drm_client_target_preferred()
450 !drm_connector_get_tiled_mode(connector))) { in drm_client_target_preferred()
452 connector->base.id); in drm_client_target_preferred()
453 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_target_preferred()
455 modes[i] = drm_connector_get_tiled_mode(connector); in drm_client_target_preferred()
471 static bool connector_has_possible_crtc(struct drm_connector *connector, in connector_has_possible_crtc() argument
476 drm_connector_for_each_possible_encoder(connector, encoder) { in connector_has_possible_crtc()
492 struct drm_connector *connector; in drm_client_pick_crtcs() local
501 connector = connectors[n]; in drm_client_pick_crtcs()
514 if (connector->status == connector_status_connected) in drm_client_pick_crtcs()
516 if (connector->cmdline_mode.specified) in drm_client_pick_crtcs()
518 if (drm_connector_has_preferred_mode(connector, width, height)) in drm_client_pick_crtcs()
528 if (!connector_has_possible_crtc(connector, crtc)) in drm_client_pick_crtcs()
604 struct drm_connector *connector; in drm_client_firmware_config() local
608 connector = connectors[i]; in drm_client_firmware_config()
613 if (conn_seq == 0 && !connector->has_tile) in drm_client_firmware_config()
616 if (connector->status == connector_status_connected) in drm_client_firmware_config()
621 connector->name); in drm_client_firmware_config()
626 if (connector->force == DRM_FORCE_OFF) { in drm_client_firmware_config()
628 connector->name); in drm_client_firmware_config()
633 encoder = connector->state->best_encoder; in drm_client_firmware_config()
634 if (!encoder || WARN_ON(!connector->state->crtc)) { in drm_client_firmware_config()
635 if (connector->force > DRM_FORCE_OFF) in drm_client_firmware_config()
639 connector->name); in drm_client_firmware_config()
647 new_crtc = connector->state->crtc; in drm_client_firmware_config()
662 connector->name); in drm_client_firmware_config()
665 modes[i] = drm_connector_pick_cmdline_mode(connector); in drm_client_firmware_config()
670 connector->name, connector->has_tile); in drm_client_firmware_config()
671 modes[i] = drm_connector_has_preferred_mode(connector, width, height); in drm_client_firmware_config()
675 if (!modes[i] && !list_empty(&connector->modes)) { in drm_client_firmware_config()
677 connector->name); in drm_client_firmware_config()
678 modes[i] = list_first_entry(&connector->modes, in drm_client_firmware_config()
697 connector->name); in drm_client_firmware_config()
698 modes[i] = &connector->state->crtc->mode; in drm_client_firmware_config()
704 if (connector->has_tile && in drm_client_firmware_config()
705 num_tiled_conns < connector->num_h_tile * connector->num_v_tile) { in drm_client_firmware_config()
707 connector->base.id); in drm_client_firmware_config()
708 modes[i] = drm_connector_fallback_non_tiled_mode(connector); in drm_client_firmware_config()
713 connector->name, in drm_client_firmware_config()
714 connector->state->crtc->base.id, in drm_client_firmware_config()
715 connector->state->crtc->name, in drm_client_firmware_config()
767 struct drm_connector *connector, **connectors = NULL; in drm_client_modeset_probe() local
786 drm_client_for_each_connector_iter(connector, &conn_iter) { in drm_client_modeset_probe()
796 drm_connector_get(connector); in drm_client_modeset_probe()
797 connectors[connector_count++] = connector; in drm_client_modeset_probe()
852 struct drm_connector *connector = connectors[i]; in drm_client_modeset_probe() local
864 drm_connector_get(connector); in drm_client_modeset_probe()
865 modeset->connectors[modeset->num_connectors++] = connector; in drm_client_modeset_probe()
901 struct drm_connector *connector = modeset->connectors[0]; in drm_client_rotation() local
910 switch (connector->display_info.panel_orientation) { in drm_client_rotation()
936 cmdline = &connector->cmdline_mode; in drm_client_rotation()
1183 struct drm_connector *connector; in drm_client_modeset_dpms_legacy() local
1195 connector = modeset->connectors[j]; in drm_client_modeset_dpms_legacy()
1196 connector->funcs->dpms(connector, dpms_mode); in drm_client_modeset_dpms_legacy()
1197 drm_object_property_set_value(&connector->base, in drm_client_modeset_dpms_legacy()