Lines Matching refs:set

66  * drm_helper_probe_single_connector_modes - get complete set of display modes
99 /* set all modes to the unverified state */
328 * drm_crtc_set_mode - set a mode
337 * Try to set @mode on @crtc. Give @crtc and its associated connectors a chance
338 * to fixup or reject the mode prior to trying to set it.
341 * True if the mode was set successfully, or false otherwise.
424 DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%d:%s]\n",
431 /* Now enable the clocks, plane, pipe, and connectors that we set up. */
493 * drm_crtc_helper_set_config - set a new config from userspace
496 * @new_mode: new mode to set
497 * @connector_set: set of connectors for the new config
509 int drm_crtc_helper_set_config(struct drm_mode_set *set)
515 bool mode_changed = false; /* if true do a full mode set */
526 if (!set)
529 if (!set->crtc)
532 if (!set->crtc->helper_private)
535 crtc_funcs = set->crtc->helper_private;
537 if (!set->mode)
538 set->fb = NULL;
540 if (set->fb) {
542 set->crtc->base.id, set->fb->base.id,
543 (int)set->num_connectors, set->x, set->y);
545 DRM_DEBUG_KMS("[CRTC:%d] [NOFB]\n", set->crtc->base.id);
546 return drm_crtc_helper_disable(set->crtc);
549 dev = set->crtc->dev;
592 save_set.crtc = set->crtc;
593 save_set.mode = &set->crtc->mode;
594 save_set.x = set->crtc->x;
595 save_set.y = set->crtc->y;
596 save_set.fb = set->crtc->fb;
600 if (set->crtc->fb != set->fb) {
601 /* If we have no fb then treat it as a full mode set */
602 if (set->crtc->fb == NULL) {
603 DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
605 } else if (set->fb == NULL) {
607 } else if (set->fb->depth != set->crtc->fb->depth) {
609 } else if (set->fb->bits_per_pixel !=
610 set->crtc->fb->bits_per_pixel) {
616 if (set->x != set->crtc->x || set->y != set->crtc->y)
619 if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {
620 DRM_DEBUG_KMS("modes are different, full mode set\n");
621 drm_mode_debug_printmodeline(&set->crtc->mode);
622 drm_mode_debug_printmodeline(set->mode);
632 for (ro = 0; ro < set->num_connectors; ro++) {
633 if (set->connectors[ro] == connector) {
648 * the appropriate crtc will be set later.
666 if (connector->encoder->crtc == set->crtc)
671 for (ro = 0; ro < set->num_connectors; ro++) {
672 if (set->connectors[ro] == connector)
673 new_crtc = set->crtc;
702 set->crtc->enabled = drm_helper_crtc_in_use(set->crtc);
703 if (set->crtc->enabled) {
704 DRM_DEBUG_KMS("attempting to set mode from"
706 drm_mode_debug_printmodeline(set->mode);
707 old_fb = set->crtc->fb;
708 set->crtc->fb = set->fb;
709 if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
710 set->x, set->y,
712 DRM_ERROR("failed to set mode on [CRTC:%d]\n",
713 set->crtc->base.id);
714 set->crtc->fb = old_fb;
719 for (i = 0; i < set->num_connectors; i++) {
720 DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
721 drm_get_connector_name(set->connectors[i]));
722 set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
727 set->crtc->x = set->x;
728 set->crtc->y = set->y;
730 old_fb = set->crtc->fb;
731 if (set->crtc->fb != set->fb)
732 set->crtc->fb = set->fb;
733 ret = crtc_funcs->mode_set_base(set->crtc,
734 set->x, set->y, old_fb);
736 set->crtc->fb = old_fb;
894 DRM_ERROR("failed to set mode on crtc %p\n", crtc);