Lines Matching refs:set
95 * drm_helper_probe_connector_modes - get complete set of display modes
129 /* set all modes to the unverified state */
362 * drm_crtc_set_mode - set a mode
372 * Try to set @mode on @crtc. Give @crtc and its associated connectors a chance
373 * to fixup or reject the mode prior to trying to set it. This is an internal
382 * True if the mode was set successfully, or false otherwise.
465 DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%d:%s]\n",
472 /* Now enable the clocks, plane, pipe, and connectors that we set up. */
532 * drm_crtc_helper_set_config - set a new config from userspace
533 * @set: mode set configuration
539 * from userspace or internally e.g. from the fbdev suppport code) in @set, and
547 int drm_crtc_helper_set_config(struct drm_mode_set *set)
553 bool mode_changed = false; /* if true do a full mode set */
564 BUG_ON(!set);
565 BUG_ON(!set->crtc);
566 BUG_ON(!set->crtc->helper_private);
569 BUG_ON(!set->mode && set->fb);
570 BUG_ON(set->fb && set->num_connectors == 0);
572 crtc_funcs = set->crtc->helper_private;
574 if (!set->mode)
575 set->fb = NULL;
577 if (set->fb) {
579 set->crtc->base.id, set->fb->base.id,
580 (int)set->num_connectors, set->x, set->y);
582 DRM_DEBUG_KMS("[CRTC:%d] [NOFB]\n", set->crtc->base.id);
583 return drm_crtc_helper_disable(set->crtc);
586 dev = set->crtc->dev;
629 save_set.crtc = set->crtc;
630 save_set.mode = &set->crtc->mode;
631 save_set.x = set->crtc->x;
632 save_set.y = set->crtc->y;
633 save_set.fb = set->crtc->fb;
637 if (set->crtc->fb != set->fb) {
638 /* If we have no fb then treat it as a full mode set */
639 if (set->crtc->fb == NULL) {
640 DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
642 } else if (set->fb == NULL) {
644 } else if (set->fb->pixel_format !=
645 set->crtc->fb->pixel_format) {
651 if (set->x != set->crtc->x || set->y != set->crtc->y)
654 if (set->mode && !drm_mode_equal(set->mode, &set->crtc->mode)) {
655 DRM_DEBUG_KMS("modes are different, full mode set\n");
656 drm_mode_debug_printmodeline(&set->crtc->mode);
657 drm_mode_debug_printmodeline(set->mode);
667 for (ro = 0; ro < set->num_connectors; ro++) {
668 if (set->connectors[ro] == connector) {
689 * the appropriate crtc will be set later.
707 if (connector->encoder->crtc == set->crtc)
712 for (ro = 0; ro < set->num_connectors; ro++) {
713 if (set->connectors[ro] == connector)
714 new_crtc = set->crtc;
743 set->crtc->enabled = drm_helper_crtc_in_use(set->crtc);
744 if (set->crtc->enabled) {
745 DRM_DEBUG_KMS("attempting to set mode from"
747 drm_mode_debug_printmodeline(set->mode);
748 old_fb = set->crtc->fb;
749 set->crtc->fb = set->fb;
750 if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
751 set->x, set->y,
753 DRM_ERROR("failed to set mode on [CRTC:%d]\n",
754 set->crtc->base.id);
755 set->crtc->fb = old_fb;
760 for (i = 0; i < set->num_connectors; i++) {
761 DRM_DEBUG_KMS("\t[CONNECTOR:%d:%s] set DPMS on\n", set->connectors[i]->base.id,
762 drm_get_connector_name(set->connectors[i]));
763 set->connectors[i]->funcs->dpms(set->connectors[i], DRM_MODE_DPMS_ON);
768 set->crtc->x = set->x;
769 set->crtc->y = set->y;
771 old_fb = set->crtc->fb;
772 if (set->crtc->fb != set->fb)
773 set->crtc->fb = set->fb;
774 ret = crtc_funcs->mode_set_base(set->crtc,
775 set->x, set->y, old_fb);
777 set->crtc->fb = old_fb;
936 DRM_ERROR("failed to set mode on crtc %p\n", (void *)crtc);