Lines Matching refs:connector
62 * track of a per-connector hpd interrupt.
96 struct drm_connector *connector)
98 struct drm_device *dev = connector->dev;
102 /* Step 1: Validate against connector */
103 ret = drm_connector_mode_valid(connector, mode);
108 drm_connector_for_each_possible_encoder(connector, encoder) {
146 static int drm_helper_probe_add_cmdline_mode(struct drm_connector *connector)
151 cmdline_mode = &connector->cmdline_mode;
156 list_for_each_entry(mode, &connector->probed_modes, head) {
170 mode = drm_mode_create_from_cmdline_mode(connector->dev,
175 drm_mode_probed_add(connector, mode);
202 enum drm_mode_status drm_connector_mode_valid(struct drm_connector *connector,
206 connector->helper_private;
211 return connector_funcs->mode_valid(connector, mode);
233 struct drm_connector *connector;
241 drm_for_each_connector_iter(connector, &conn_iter) {
242 if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
269 drm_helper_probe_detect_ctx(struct drm_connector *connector, bool force)
271 const struct drm_connector_helper_funcs *funcs = connector->helper_private;
278 ret = drm_modeset_lock(&connector->dev->mode_config.connection_mutex, &ctx);
281 ret = funcs->detect_ctx(connector, &ctx, force);
282 else if (connector->funcs->detect)
283 ret = connector->funcs->detect(connector, force);
303 * drm_helper_probe_detect - probe connector status
304 * @connector: connector to probe
308 * This function calls the detect callbacks of the connector.
313 drm_helper_probe_detect(struct drm_connector *connector,
317 const struct drm_connector_helper_funcs *funcs = connector->helper_private;
318 struct drm_device *dev = connector->dev;
322 return drm_helper_probe_detect_ctx(connector, force);
329 return funcs->detect_ctx(connector, ctx, force);
330 else if (connector->funcs->detect)
331 return connector->funcs->detect(connector, force);
339 * @connector: connector to probe
343 * Based on the helper callbacks implemented by @connector in struct
345 * be added to the connector's probed_modes list, then culled (based on validity
354 * 1. All modes currently on the connector's modes list are marked as stale
356 * 2. New modes are added to the connector's probed_modes list with
361 * - if the connector status is connector_status_connected, standard
379 * - drm_mode_validate_flag() checks the modes against basic connector
388 * 5. Any mode whose status is not OK is pruned from the connector's modes list,
393 * The number of modes found on @connector.
395 int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
398 struct drm_device *dev = connector->dev;
401 connector->helper_private;
412 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id,
413 connector->name);
424 list_for_each_entry(mode, &connector->modes, head)
427 old_status = connector->status;
429 if (connector->force) {
430 if (connector->force == DRM_FORCE_ON ||
431 connector->force == DRM_FORCE_ON_DIGITAL)
432 connector->status = connector_status_connected;
434 connector->status = connector_status_disconnected;
435 if (connector->funcs->force)
436 connector->funcs->force(connector);
438 ret = drm_helper_probe_detect(connector, &ctx, true);
443 } else if (WARN(ret < 0, "Invalid return value %i for connector detection\n", ret))
446 connector->status = ret;
455 if (old_status != connector->status) {
456 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n",
457 connector->base.id,
458 connector->name,
460 drm_get_connector_status_name(connector->status));
480 if (connector->status == connector_status_disconnected) {
481 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
482 connector->base.id, connector->name);
483 drm_connector_update_edid_property(connector, NULL);
488 count = (*connector_funcs->get_modes)(connector);
494 if (count == 0 && connector->status == connector_status_connected)
495 count = drm_add_override_edid_modes(connector);
497 if (count == 0 && connector->status == connector_status_connected)
498 count = drm_add_modes_noedid(connector, 1024, 768);
499 count += drm_helper_probe_add_cmdline_mode(connector);
503 drm_connector_list_update(connector);
505 if (connector->interlace_allowed)
507 if (connector
509 if (connector->stereo_allowed)
512 list_for_each_entry(mode, &connector->modes, head) {
524 connector);
528 connector);
532 drm_mode_prune_invalid(dev, &connector->modes, verbose_prune);
537 if (list_empty(&connector->modes))
540 list_for_each_entry(mode, &connector->modes, head)
543 drm_mode_sort(&connector->modes);
545 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id,
546 connector->name);
547 list_for_each_entry(mode, &connector->modes, head) {
558 * @dev: drm_device whose connector state changed
590 struct drm_connector *connector;
611 drm_for_each_connector_iter(connector, &conn_iter) {
613 if (connector->force)
618 if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD)
621 old_status = connector->status;
625 !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT))
630 connector->status = drm_helper_probe_detect(connector, NULL, false);
631 if (old_status != connector->status) {
647 if (connector->status == connector_status_unknown) {
648 connector->status = old_status;
653 new = drm_get_connector_status_name(connector->status);
655 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] "
657 connector->base.id,
658 connector->name,
686 * connector ->detect hook.
734 * Note that a connector can be both polled and probed from the hotplug handler,
770 * interrupts for each connector.
772 * Drivers which support hotplug interrupts for each connector individually and
774 * directly call drm_kms_helper_hotplug_event() in case the connector state
780 * Note that a connector can be both polled and probed from the hotplug handler,
785 struct drm_connector *connector;
795 drm_for_each_connector_iter(connector, &conn_iter) {
797 if (!(connector->polled & DRM_CONNECTOR_POLL_HPD))
800 old_status = connector->status;
802 connector->status = drm_helper_probe_detect(connector, NULL, false);
803 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s\n",
804 connector->base.id,
805 connector->name,
807 drm_get_connector_status_name(connector->status));
808 if (old_status != connector->status)