Lines Matching defs:mode
100 * Checks whether @encoder is with the current mode setting output configuration
141 * Checks whether @crtc is with the current mode setting output configuration
216 * This function walks through the entire mode setting configuration of @dev. It
264 * drm_crtc_helper_set_mode - internal helper to set a mode
266 * @mode: mode to use
271 * Try to set @mode on @crtc. Give @crtc and its associated connectors a chance
272 * to fixup or reject the mode prior to trying to set it. This is an internal
277 * drm_crtc_helper_set_config() helper function to drive the mode setting
281 * True if the mode was set successfully, false otherwise.
284 struct drm_display_mode *mode,
306 adjusted_mode = drm_mode_duplicate(dev, mode);
312 drm_mode_init(&saved_mode, &crtc->mode);
317 /* Update crtc values up front so the driver can rely on them for mode
320 drm_mode_copy(&crtc->mode, mode);
324 /* Pass our mode to the connectors and the CRTC to give them a chance to
326 * a chance to reject the mode entirely.
339 if (!(ret = encoder_funcs->mode_fixup(encoder, mode,
348 if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
358 /* Prepare the encoders and CRTCs before setting the mode. */
380 ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
394 encoder->base.id, encoder->name, mode->name);
396 encoder_funcs->mode_set(encoder, mode, adjusted_mode);
426 drm_mode_copy(&crtc->mode, &saved_mode);
518 * @set: mode set configuration
529 * mode_fixup encoder and CRTC helper operations to adjust the requested mode,
531 * application. If the new configuration after mode adjustment is identical to
535 * If the adjusted mode is identical to the current mode but changes to the
539 * If the adjusted mode differs from the current mode, or if the
541 * performs a full mode set sequence by calling the ->prepare(), ->mode_set()
560 bool mode_changed = false; /* if true do a full mode set */
577 BUG_ON(!set->mode && set->fb);
585 if (!set->mode)
635 save_set.mode = &set->crtc->mode;
643 /* If we have no fb then treat it as a full mode set */
645 DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
656 if (!drm_mode_equal(set->mode, &set->crtc->mode)) {
657 DRM_DEBUG_KMS("modes are different, full mode set\n");
658 drm_mode_debug_printmodeline(&set->crtc->mode);
659 drm_mode_debug_printmodeline(set->mode);
693 DRM_DEBUG_KMS("connector dpms not on, full mode switch\n");
702 DRM_DEBUG_KMS("encoder changed, full mode switch\n");
743 DRM_DEBUG_KMS("crtc changed, full mode switch\n");
764 DRM_DEBUG_KMS("attempting to set mode from"
766 drm_mode_debug_printmodeline(set->mode);
768 if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
771 DRM_ERROR("failed to set mode on [CRTC:%d:%s]\n",
827 !drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, save_set.x,
855 static void drm_helper_encoder_dpms(struct drm_encoder *encoder, int mode)
864 encoder_funcs->dpms(encoder, mode);
887 * @mode: DPMS mode
905 int drm_helper_connector_dpms(struct drm_connector *connector, int mode)
913 if (mode == connector->dpms)
917 connector->dpms = mode;
923 if (mode < old_dpms) {
936 if (mode > old_dpms) {
953 * drm_helper_resume_force_mode - force-restore mode setting configuration
956 * Drivers which use the mode setting helpers can use this function to
957 * force-restore the mode setting configuration e.g. on resume or when something
972 * This function is deprecated. New drivers should implement atomic mode-
994 ret = drm_crtc_helper_set_mode(crtc, &crtc->mode,
999 DRM_ERROR("failed to set mode on crtc %p\n", crtc);