Lines Matching defs:mode

88  * Checks whether @encoder is with the current mode setting output configuration
129 * Checks whether @crtc is with the current mode setting output configuration
204 * This function walks through the entire mode setting configuration of @dev. It
252 * drm_crtc_helper_set_mode - internal helper to set a mode
254 * @mode: mode to use
259 * Try to set @mode on @crtc. Give @crtc and its associated connectors a chance
260 * to fixup or reject the mode prior to trying to set it. This is an internal
265 * drm_crtc_helper_set_config() helper function to drive the mode setting
269 * True if the mode was set successfully, false otherwise.
272 struct drm_display_mode *mode,
294 adjusted_mode = drm_mode_duplicate(dev, mode);
300 saved_mode = crtc->mode;
305 /* Update crtc values up front so the driver can rely on them for mode
308 crtc->mode = *mode;
312 /* Pass our mode to the connectors and the CRTC to give them a chance to
314 * a chance to reject the mode entirely.
327 if (!(ret = encoder_funcs->mode_fixup(encoder, mode,
336 if (!(ret = crtc_funcs->mode_fixup(crtc, mode,
346 /* Prepare the encoders and CRTCs before setting the mode. */
368 ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb);
382 encoder->base.id, encoder->name, mode->name);
384 encoder_funcs->mode_set(encoder, mode, adjusted_mode);
414 crtc->mode = saved_mode;
480 * @set: mode set configuration
491 * mode_fixup encoder and CRTC helper operations to adjust the requested mode,
493 * application. If the new configuration after mode adjustment is identical to
497 * If the adjusted mode is identical to the current mode but changes to the
501 * If the adjusted mode differs from the current mode, or if the
503 * performs a full mode set sequence by calling the ->prepare(), ->mode_set()
522 bool mode_changed = false; /* if true do a full mode set */
539 BUG_ON(!set->mode && set->fb);
547 if (!set->mode)
597 save_set.mode = &set->crtc->mode;
605 /* If we have no fb then treat it as a full mode set */
607 DRM_DEBUG_KMS("crtc has no fb, full mode set\n");
618 if (!drm_mode_equal(set->mode, &set->crtc->mode)) {
619 DRM_DEBUG_KMS("modes are different, full mode set\n");
620 drm_mode_debug_printmodeline(&set->crtc->mode);
621 drm_mode_debug_printmodeline(set->mode);
655 DRM_DEBUG_KMS("connector dpms not on, full mode switch\n");
664 DRM_DEBUG_KMS("encoder changed, full mode switch\n");
705 DRM_DEBUG_KMS("crtc changed, full mode switch\n");
726 DRM_DEBUG_KMS("attempting to set mode from"
728 drm_mode_debug_printmodeline(set->mode);
730 if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
733 DRM_ERROR("failed to set mode on [CRTC:%d:%s]\n",
789 !drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, save_set.x,
817 static void drm_helper_encoder_dpms(struct drm_encoder *encoder, int mode)
826 encoder_funcs->dpms(encoder, mode);
849 * @mode: DPMS mode
867 int drm_helper_connector_dpms(struct drm_connector *connector, int mode)
875 if (mode == connector->dpms)
879 connector->dpms = mode;
885 if (mode < old_dpms) {
898 if (mode > old_dpms) {
915 * drm_helper_resume_force_mode - force-restore mode setting configuration
918 * Drivers which use the mode setting helpers can use this function to
919 * force-restore the mode setting configuration e.g. on resume or when something
934 * This function is deprecated. New drivers should implement atomic mode-
956 ret = drm_crtc_helper_set_mode(crtc, &crtc->mode,
961 DRM_ERROR("failed to set mode on crtc %p\n", crtc);