Lines Matching +full:flip +full:- +full:horizontal
2 * Copyright (c) 2006-2008 Intel Corporation
41 * drm_helper_move_panel_connectors_to_head() - move panels to the front in the
59 &dev->mode_config.connector_list, head) { in drm_helper_move_panel_connectors_to_head()
60 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS || in drm_helper_move_panel_connectors_to_head()
61 connector->connector_type == DRM_MODE_CONNECTOR_eDP) in drm_helper_move_panel_connectors_to_head()
62 list_move_tail(&connector->head, &panel_list); in drm_helper_move_panel_connectors_to_head()
65 list_splice(&panel_list, &dev->mode_config.connector_list); in drm_helper_move_panel_connectors_to_head()
80 list_for_each_entry(mode, &connector->modes, head) { in drm_mode_validate_flag()
81 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) && in drm_mode_validate_flag()
83 mode->status = MODE_NO_INTERLACE; in drm_mode_validate_flag()
84 if ((mode->flags & DRM_MODE_FLAG_DBLSCAN) && in drm_mode_validate_flag()
86 mode->status = MODE_NO_DBLESCAN; in drm_mode_validate_flag()
93 * drm_helper_probe_single_connector_modes - get complete set of display modes
106 * Intended to be use as a generic implementation of the ->probe() @connector
116 struct drm_device *dev = connector->dev; in drm_helper_probe_single_connector_modes()
119 connector->helper_private; in drm_helper_probe_single_connector_modes()
123 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, in drm_helper_probe_single_connector_modes()
126 list_for_each_entry(mode, &connector->modes, head) in drm_helper_probe_single_connector_modes()
127 mode->status = MODE_UNVERIFIED; in drm_helper_probe_single_connector_modes()
129 if (connector->force) { in drm_helper_probe_single_connector_modes()
130 if (connector->force == DRM_FORCE_ON) in drm_helper_probe_single_connector_modes()
131 connector->status = connector_status_connected; in drm_helper_probe_single_connector_modes()
133 connector->status = connector_status_disconnected; in drm_helper_probe_single_connector_modes()
134 if (connector->funcs->force) in drm_helper_probe_single_connector_modes()
135 connector->funcs->force(connector); in drm_helper_probe_single_connector_modes()
137 connector->status = connector->funcs->detect(connector, true); in drm_helper_probe_single_connector_modes()
140 /* Re-enable polling in case the global poll config changed. */ in drm_helper_probe_single_connector_modes()
141 if (drm_kms_helper_poll != dev->mode_config.poll_running) in drm_helper_probe_single_connector_modes()
144 dev->mode_config.poll_running = drm_kms_helper_poll; in drm_helper_probe_single_connector_modes()
146 if (connector->status == connector_status_disconnected) { in drm_helper_probe_single_connector_modes()
148 connector->base.id, drm_get_connector_name(connector)); in drm_helper_probe_single_connector_modes()
159 count = (*connector_funcs->get_modes)(connector); in drm_helper_probe_single_connector_modes()
161 if (count == 0 && connector->status == connector_status_connected) in drm_helper_probe_single_connector_modes()
169 drm_mode_validate_size(dev, &connector->modes, maxX, in drm_helper_probe_single_connector_modes()
172 if (connector->interlace_allowed) in drm_helper_probe_single_connector_modes()
174 if (connector->doublescan_allowed) in drm_helper_probe_single_connector_modes()
178 list_for_each_entry(mode, &connector->modes, head) { in drm_helper_probe_single_connector_modes()
179 if (mode->status == MODE_OK) in drm_helper_probe_single_connector_modes()
180 mode->status = connector_funcs->mode_valid(connector, in drm_helper_probe_single_connector_modes()
185 drm_mode_prune_invalid(dev, &connector->modes, true); in drm_helper_probe_single_connector_modes()
187 if (list_empty(&connector->modes)) in drm_helper_probe_single_connector_modes()
190 list_for_each_entry(mode, &connector->modes, head) in drm_helper_probe_single_connector_modes()
191 mode->vrefresh = drm_mode_vrefresh(mode); in drm_helper_probe_single_connector_modes()
193 drm_mode_sort(&connector->modes); in drm_helper_probe_single_connector_modes()
195 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id, in drm_helper_probe_single_connector_modes()
197 list_for_each_entry(mode, &connector->modes, head) { in drm_helper_probe_single_connector_modes()
207 * drm_helper_encoder_in_use - check if a given encoder is in use
221 struct drm_device *dev = encoder->dev; in drm_helper_encoder_in_use()
222 list_for_each_entry(connector, &dev->mode_config.connector_list, head) in drm_helper_encoder_in_use()
223 if (connector->encoder == encoder) in drm_helper_encoder_in_use()
230 * drm_helper_crtc_in_use - check if a given CRTC is in a mode_config
244 struct drm_device *dev = crtc->dev; in drm_helper_crtc_in_use()
246 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) in drm_helper_crtc_in_use()
247 if (encoder->crtc == crtc && drm_helper_encoder_in_use(encoder)) in drm_helper_crtc_in_use()
256 struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; in drm_encoder_disable()
258 if (encoder_funcs->disable) in drm_encoder_disable()
259 (*encoder_funcs->disable)(encoder); in drm_encoder_disable()
261 (*encoder_funcs->dpms)(encoder, DRM_MODE_DPMS_OFF); in drm_encoder_disable()
265 * drm_helper_disable_unused_functions - disable unused objects
280 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_helper_disable_unused_functions()
281 if (!connector->encoder) in drm_helper_disable_unused_functions()
283 if (connector->status == connector_status_disconnected) in drm_helper_disable_unused_functions()
284 connector->encoder = NULL; in drm_helper_disable_unused_functions()
287 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_helper_disable_unused_functions()
291 encoder->crtc = NULL; in drm_helper_disable_unused_functions()
295 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_helper_disable_unused_functions()
296 struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in drm_helper_disable_unused_functions()
297 crtc->enabled = drm_helper_crtc_in_use(crtc); in drm_helper_disable_unused_functions()
298 if (!crtc->enabled) { in drm_helper_disable_unused_functions()
299 if (crtc_funcs->disable) in drm_helper_disable_unused_functions()
300 (*crtc_funcs->disable)(crtc); in drm_helper_disable_unused_functions()
302 (*crtc_funcs->dpms)(crtc, DRM_MODE_DPMS_OFF); in drm_helper_disable_unused_functions()
303 crtc->fb = NULL; in drm_helper_disable_unused_functions()
310 * drm_encoder_crtc_ok - can a given crtc drive a given encoder?
326 dev = crtc->dev; in drm_encoder_crtc_ok()
328 list_for_each_entry(tmp, &dev->mode_config.crtc_list, head) { in drm_encoder_crtc_ok()
334 if (encoder->possible_crtcs & crtc_mask) in drm_encoder_crtc_ok()
342 * since the driver will have to re-route things.
350 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_prepare_encoders()
351 encoder_funcs = encoder->helper_private; in drm_crtc_prepare_encoders()
353 if (encoder->crtc == NULL) in drm_crtc_prepare_encoders()
356 if (encoder_funcs->get_crtc && in drm_crtc_prepare_encoders()
357 encoder->crtc != (*encoder_funcs->get_crtc)(encoder)) in drm_crtc_prepare_encoders()
363 * drm_crtc_helper_set_mode - internal helper to set a mode
366 * @x: horizontal offset into the surface
376 * entire output pipe to be disabled and re-enabled in a new configuration. For
390 struct drm_device *dev = crtc->dev; in drm_crtc_helper_set_mode()
392 struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in drm_crtc_helper_set_mode()
398 crtc->enabled = drm_helper_crtc_in_use(crtc); in drm_crtc_helper_set_mode()
399 if (!crtc->enabled) in drm_crtc_helper_set_mode()
406 saved_hwmode = crtc->hwmode; in drm_crtc_helper_set_mode()
407 saved_mode = crtc->mode; in drm_crtc_helper_set_mode()
408 saved_x = crtc->x; in drm_crtc_helper_set_mode()
409 saved_y = crtc->y; in drm_crtc_helper_set_mode()
414 crtc->mode = *mode; in drm_crtc_helper_set_mode()
415 crtc->x = x; in drm_crtc_helper_set_mode()
416 crtc->y = y; in drm_crtc_helper_set_mode()
422 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_set_mode()
424 if (encoder->crtc != crtc) in drm_crtc_helper_set_mode()
426 encoder_funcs = encoder->helper_private; in drm_crtc_helper_set_mode()
427 if (!(ret = encoder_funcs->mode_fixup(encoder, mode, in drm_crtc_helper_set_mode()
434 if (!(ret = crtc_funcs->mode_fixup(crtc, mode, adjusted_mode))) { in drm_crtc_helper_set_mode()
438 DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); in drm_crtc_helper_set_mode()
441 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_set_mode()
443 if (encoder->crtc != crtc) in drm_crtc_helper_set_mode()
445 encoder_funcs = encoder->helper_private; in drm_crtc_helper_set_mode()
447 encoder_funcs->prepare(encoder); in drm_crtc_helper_set_mode()
452 crtc_funcs->prepare(crtc); in drm_crtc_helper_set_mode()
457 ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb); in drm_crtc_helper_set_mode()
461 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_set_mode()
463 if (encoder->crtc != crtc) in drm_crtc_helper_set_mode()
467 encoder->base.id, drm_get_encoder_name(encoder), in drm_crtc_helper_set_mode()
468 mode->base.id, mode->name); in drm_crtc_helper_set_mode()
469 encoder_funcs = encoder->helper_private; in drm_crtc_helper_set_mode()
470 encoder_funcs->mode_set(encoder, mode, adjusted_mode); in drm_crtc_helper_set_mode()
474 crtc_funcs->commit(crtc); in drm_crtc_helper_set_mode()
476 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_set_mode()
478 if (encoder->crtc != crtc) in drm_crtc_helper_set_mode()
481 encoder_funcs = encoder->helper_private; in drm_crtc_helper_set_mode()
482 encoder_funcs->commit(encoder); in drm_crtc_helper_set_mode()
486 /* Store real post-adjustment hardware mode. */ in drm_crtc_helper_set_mode()
487 crtc->hwmode = *adjusted_mode; in drm_crtc_helper_set_mode()
490 * are later needed by vblank and swap-completion in drm_crtc_helper_set_mode()
499 crtc->hwmode = saved_hwmode; in drm_crtc_helper_set_mode()
500 crtc->mode = saved_mode; in drm_crtc_helper_set_mode()
501 crtc->x = saved_x; in drm_crtc_helper_set_mode()
502 crtc->y = saved_y; in drm_crtc_helper_set_mode()
513 struct drm_device *dev = crtc->dev; in drm_crtc_helper_disable()
518 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_disable()
519 if (encoder->crtc != crtc) in drm_crtc_helper_disable()
522 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_crtc_helper_disable()
523 if (connector->encoder != encoder) in drm_crtc_helper_disable()
526 connector->encoder = NULL; in drm_crtc_helper_disable()
535 * drm_crtc_helper_set_config - set a new config from userspace
545 * ->prepare(), ->modeset() and ->commit() helper callbacks.
548 * Returns 0 on success, -ERRNO on failure.
557 bool fb_changed = false; /* if true and !mode_changed just do a flip */ in drm_crtc_helper_set_config()
568 return -EINVAL; in drm_crtc_helper_set_config()
570 if (!set->crtc) in drm_crtc_helper_set_config()
571 return -EINVAL; in drm_crtc_helper_set_config()
573 if (!set->crtc->helper_private) in drm_crtc_helper_set_config()
574 return -EINVAL; in drm_crtc_helper_set_config()
576 crtc_funcs = set->crtc->helper_private; in drm_crtc_helper_set_config()
578 if (!set->mode) in drm_crtc_helper_set_config()
579 set->fb = NULL; in drm_crtc_helper_set_config()
581 if (set->fb) { in drm_crtc_helper_set_config()
583 set->crtc->base.id, set->fb->base.id, in drm_crtc_helper_set_config()
584 (int)set->num_connectors, set->x, set->y); in drm_crtc_helper_set_config()
586 DRM_DEBUG_KMS("[CRTC:%d] [NOFB]\n", set->crtc->base.id); in drm_crtc_helper_set_config()
587 return drm_crtc_helper_disable(set->crtc); in drm_crtc_helper_set_config()
590 dev = set->crtc->dev; in drm_crtc_helper_set_config()
592 /* Allocate space for the backup of all (non-pointer) crtc, encoder and in drm_crtc_helper_set_config()
594 save_crtcs = malloc(dev->mode_config.num_crtc * in drm_crtc_helper_set_config()
597 return -ENOMEM; in drm_crtc_helper_set_config()
599 save_encoders = malloc(dev->mode_config.num_encoder * in drm_crtc_helper_set_config()
603 return -ENOMEM; in drm_crtc_helper_set_config()
606 save_connectors = malloc(dev->mode_config.num_connector * in drm_crtc_helper_set_config()
611 return -ENOMEM; in drm_crtc_helper_set_config()
619 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_crtc_helper_set_config()
624 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_set_config()
629 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_crtc_helper_set_config()
633 save_set.crtc = set->crtc; in drm_crtc_helper_set_config()
634 save_set.mode = &set->crtc->mode; in drm_crtc_helper_set_config()
635 save_set.x = set->crtc->x; in drm_crtc_helper_set_config()
636 save_set.y = set->crtc->y; in drm_crtc_helper_set_config()
637 save_set.fb = set->crtc->fb; in drm_crtc_helper_set_config()
641 if (set->crtc->fb != set->fb) { in drm_crtc_helper_set_config()
643 if (set->crtc->fb == NULL) { in drm_crtc_helper_set_config()
646 } else if (set->fb == NULL) { in drm_crtc_helper_set_config()
648 } else if (set->fb->depth != set->crtc->fb->depth) { in drm_crtc_helper_set_config()
650 } else if (set->fb->bits_per_pixel != in drm_crtc_helper_set_config()
651 set->crtc->fb->bits_per_pixel) { in drm_crtc_helper_set_config()
657 if (set->x != set->crtc->x || set->y != set->crtc->y) in drm_crtc_helper_set_config()
660 if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) { in drm_crtc_helper_set_config()
662 drm_mode_debug_printmodeline(&set->crtc->mode); in drm_crtc_helper_set_config()
663 drm_mode_debug_printmodeline(set->mode); in drm_crtc_helper_set_config()
669 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_crtc_helper_set_config()
671 connector->helper_private; in drm_crtc_helper_set_config()
672 new_encoder = connector->encoder; in drm_crtc_helper_set_config()
673 for (ro = 0; ro < set->num_connectors; ro++) { in drm_crtc_helper_set_config()
674 if (set->connectors[ro] == connector) { in drm_crtc_helper_set_config()
675 new_encoder = connector_funcs->best_encoder(connector); in drm_crtc_helper_set_config()
677 we are setting now - then fail */ in drm_crtc_helper_set_config()
685 if (new_encoder != connector->encoder) { in drm_crtc_helper_set_config()
691 if (connector->encoder) in drm_crtc_helper_set_config()
692 connector->encoder->crtc = NULL; in drm_crtc_helper_set_config()
693 connector->encoder = new_encoder; in drm_crtc_helper_set_config()
698 ret = -EINVAL; in drm_crtc_helper_set_config()
703 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_crtc_helper_set_config()
704 if (!connector->encoder) in drm_crtc_helper_set_config()
707 if (connector->encoder->crtc == set->crtc) in drm_crtc_helper_set_config()
710 new_crtc = connector->encoder->crtc; in drm_crtc_helper_set_config()
712 for (ro = 0; ro < set->num_connectors; ro++) { in drm_crtc_helper_set_config()
713 if (set->connectors[ro] == connector) in drm_crtc_helper_set_config()
714 new_crtc = set->crtc; in drm_crtc_helper_set_config()
719 !drm_encoder_crtc_ok(connector->encoder, new_crtc)) { in drm_crtc_helper_set_config()
720 ret = -EINVAL; in drm_crtc_helper_set_config()
723 if (new_crtc != connector->encoder->crtc) { in drm_crtc_helper_set_config()
726 connector->encoder->crtc = new_crtc; in drm_crtc_helper_set_config()
730 connector->base.id, drm_get_connector_name(connector), in drm_crtc_helper_set_config()
731 new_crtc->base.id); in drm_crtc_helper_set_config()
734 connector->base.id, drm_get_connector_name(connector)); in drm_crtc_helper_set_config()
739 if (fb_changed && !crtc_funcs->mode_set_base) in drm_crtc_helper_set_config()
743 set->crtc->enabled = drm_helper_crtc_in_use(set->crtc); in drm_crtc_helper_set_config()
744 if (set->crtc->enabled) { in drm_crtc_helper_set_config()
747 drm_mode_debug_printmodeline(set->mode); in drm_crtc_helper_set_config()
748 old_fb = set->crtc->fb; in drm_crtc_helper_set_config()
749 set->crtc->fb = set->fb; in drm_crtc_helper_set_config()
750 if (!drm_crtc_helper_set_mode(set->crtc, set->mode, in drm_crtc_helper_set_config()
751 set->x, set->y, in drm_crtc_helper_set_config()
754 set->crtc->base.id); in drm_crtc_helper_set_config()
755 set->crtc->fb = old_fb; in drm_crtc_helper_set_config()
756 ret = -EINVAL; in drm_crtc_helper_set_config()
760 for (i = 0; i < set->num_connectors; i++) { in drm_crtc_helper_set_config()
761 DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id, in drm_crtc_helper_set_config()
762 drm_get_connector_name(set->connectors[i])); in drm_crtc_helper_set_config()
763 set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON); in drm_crtc_helper_set_config()
768 set->crtc->x = set->x; in drm_crtc_helper_set_config()
769 set->crtc->y = set->y; in drm_crtc_helper_set_config()
771 old_fb = set->crtc->fb; in drm_crtc_helper_set_config()
772 if (set->crtc->fb != set->fb) in drm_crtc_helper_set_config()
773 set->crtc->fb = set->fb; in drm_crtc_helper_set_config()
774 ret = crtc_funcs->mode_set_base(set->crtc, in drm_crtc_helper_set_config()
775 set->x, set->y, old_fb); in drm_crtc_helper_set_config()
777 set->crtc->fb = old_fb; in drm_crtc_helper_set_config()
790 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_crtc_helper_set_config()
795 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_crtc_helper_set_config()
800 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_crtc_helper_set_config()
821 struct drm_device *dev = encoder->dev; in drm_helper_choose_encoder_dpms()
823 list_for_each_entry(connector, &dev->mode_config.connector_list, head) in drm_helper_choose_encoder_dpms()
824 if (connector->encoder == encoder) in drm_helper_choose_encoder_dpms()
825 if (connector->dpms < dpms) in drm_helper_choose_encoder_dpms()
826 dpms = connector->dpms; in drm_helper_choose_encoder_dpms()
834 struct drm_device *dev = crtc->dev; in drm_helper_choose_crtc_dpms()
836 list_for_each_entry(connector, &dev->mode_config.connector_list, head) in drm_helper_choose_crtc_dpms()
837 if (connector->encoder && connector->encoder->crtc == crtc) in drm_helper_choose_crtc_dpms()
838 if (connector->dpms < dpms) in drm_helper_choose_crtc_dpms()
839 dpms = connector->dpms; in drm_helper_choose_crtc_dpms()
844 * drm_helper_connector_dpms() - connector dpms helper implementation
850 * state for all encoders and crtcs in the output mesh and calls the ->dpms()
855 struct drm_encoder *encoder = connector->encoder; in drm_helper_connector_dpms()
856 struct drm_crtc *crtc = encoder ? encoder->crtc : NULL; in drm_helper_connector_dpms()
859 if (mode == connector->dpms) in drm_helper_connector_dpms()
862 old_dpms = connector->dpms; in drm_helper_connector_dpms()
863 connector->dpms = mode; in drm_helper_connector_dpms()
868 struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in drm_helper_connector_dpms()
869 if (crtc_funcs->dpms) in drm_helper_connector_dpms()
870 (*crtc_funcs->dpms) (crtc, in drm_helper_connector_dpms()
874 struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; in drm_helper_connector_dpms()
875 if (encoder_funcs->dpms) in drm_helper_connector_dpms()
876 (*encoder_funcs->dpms) (encoder, in drm_helper_connector_dpms()
884 struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; in drm_helper_connector_dpms()
885 if (encoder_funcs->dpms) in drm_helper_connector_dpms()
886 (*encoder_funcs->dpms) (encoder, in drm_helper_connector_dpms()
890 struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; in drm_helper_connector_dpms()
891 if (crtc_funcs->dpms) in drm_helper_connector_dpms()
892 (*crtc_funcs->dpms) (crtc, in drm_helper_connector_dpms()
906 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct()
907 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct()
909 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct()
910 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct()
912 drm_fb_get_bpp_depth(mode_cmd->pixel_format, &fb->depth, in drm_helper_mode_fill_fb_struct()
913 &fb->bits_per_pixel); in drm_helper_mode_fill_fb_struct()
914 fb->pixel_format = mode_cmd->pixel_format; in drm_helper_mode_fill_fb_struct()
928 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { in drm_helper_resume_force_mode()
930 if (!crtc->enabled) in drm_helper_resume_force_mode()
933 ret = drm_crtc_helper_set_mode(crtc, &crtc->mode, in drm_helper_resume_force_mode()
934 crtc->x, crtc->y, crtc->fb); in drm_helper_resume_force_mode()
941 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { in drm_helper_resume_force_mode()
943 if(encoder->crtc != crtc) in drm_helper_resume_force_mode()
946 encoder_funcs = encoder->helper_private; in drm_helper_resume_force_mode()
947 if (encoder_funcs->dpms) in drm_helper_resume_force_mode()
948 (*encoder_funcs->dpms) (encoder, in drm_helper_resume_force_mode()
952 crtc_funcs = crtc->helper_private; in drm_helper_resume_force_mode()
953 if (crtc_funcs->dpms) in drm_helper_resume_force_mode()
954 (*crtc_funcs->dpms) (crtc, in drm_helper_resume_force_mode()
970 if (dev->mode_config.funcs->output_poll_changed) in drm_kms_helper_hotplug_event()
971 dev->mode_config.funcs->output_poll_changed(dev); in drm_kms_helper_hotplug_event()
986 sx_xlock(&dev->mode_config.mutex); in output_poll_execute()
987 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in output_poll_execute()
990 if (connector->force) in output_poll_execute()
995 if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD) in output_poll_execute()
1000 old_status = connector->status; in output_poll_execute()
1004 !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT)) in output_poll_execute()
1007 connector->status = connector->funcs->detect(connector, false); in output_poll_execute()
1009 connector->base.id, in output_poll_execute()
1011 old_status, connector->status); in output_poll_execute()
1012 if (old_status != connector->status) in output_poll_execute()
1016 sx_xunlock(&dev->mode_config.mutex); in output_poll_execute()
1023 &dev->mode_config.output_poll_work, in output_poll_execute()
1029 if (!dev->mode_config.poll_enabled) in drm_kms_helper_poll_disable()
1032 &dev->mode_config.output_poll_work, NULL); in drm_kms_helper_poll_disable()
1041 if (!dev->mode_config.poll_enabled || !drm_kms_helper_poll) in drm_kms_helper_poll_enable()
1044 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_kms_helper_poll_enable()
1045 if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | in drm_kms_helper_poll_enable()
1052 &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); in drm_kms_helper_poll_enable()
1058 TIMEOUT_TASK_INIT(taskqueue_thread, &dev->mode_config.output_poll_work, in drm_kms_helper_poll_init()
1060 dev->mode_config.poll_enabled = true; in drm_kms_helper_poll_init()
1078 if (!dev->mode_config.poll_enabled) in drm_helper_hpd_irq_event()
1081 sx_xlock(&dev->mode_config.mutex); in drm_helper_hpd_irq_event()
1082 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { in drm_helper_hpd_irq_event()
1085 if (!(connector->polled & DRM_CONNECTOR_POLL_HPD)) in drm_helper_hpd_irq_event()
1088 old_status = connector->status; in drm_helper_hpd_irq_event()
1090 connector->status = connector->funcs->detect(connector, false); in drm_helper_hpd_irq_event()
1092 connector->base.id, in drm_helper_hpd_irq_event()
1094 old_status, connector->status); in drm_helper_hpd_irq_event()
1095 if (old_status != connector->status) in drm_helper_hpd_irq_event()
1099 sx_xunlock(&dev->mode_config.mutex); in drm_helper_hpd_irq_event()