Lines Matching defs:mode
71 drm_mode_validate_flag(const struct drm_display_mode *mode,
74 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
78 if ((mode->flags & DRM_MODE_FLAG_DBLSCAN) &&
82 if ((mode->flags & DRM_MODE_FLAG_3D_MASK) &&
90 drm_mode_validate_pipeline(struct drm_display_mode *mode,
100 ret = drm_connector_mode_valid(connector, mode, ctx, status);
109 *status = drm_encoder_mode_valid(encoder, mode);
112 * will not accept the mode anyway. If all encoders
113 * reject the mode then, at exit, ret will not be
121 mode);
132 *status = drm_crtc_mode_valid(crtc, mode);
136 * for this mode. Lets return now. */
148 struct drm_display_mode *mode;
154 /* Only add a GTF mode if we find no matching probed modes */
155 list_for_each_entry(mode, &connector->probed_modes, head) {
156 if (mode->hdisplay != cmdline_mode->xres ||
157 mode->vdisplay != cmdline_mode->yres)
161 /* The probed mode's vrefresh is set until later */
162 if (drm_mode_vrefresh(mode) != cmdline_mode->refresh)
166 /* Mark the matching mode as being preferred by the user */
167 mode->type |= DRM_MODE_TYPE_USERDEF;
171 mode = drm_mode_create_from_cmdline_mode(connector->dev,
173 if (mode == NULL)
176 drm_mode_probed_add(connector, mode);
181 const struct drm_display_mode *mode)
188 return crtc_funcs->mode_valid(crtc, mode);
192 const struct drm_display_mode *mode)
200 return encoder_funcs->mode_valid(encoder, mode);
205 struct drm_display_mode *mode,
216 ret = connector_funcs->mode_valid_ctx(connector, mode, ctx,
219 *status = connector_funcs->mode_valid(connector, mode);
370 * for output mode filtering and detection.
394 * 4. Any non-stale mode on the modes list then undergoes validation
409 * 5. Any mode whose status is not OK is pruned from the connector's modes list,
410 * accompanied by a debug message indicating the reason for the mode's
420 struct drm_display_mode *mode;
445 list_for_each_entry(mode, &connector->modes, head)
446 mode->status = MODE_STALE;
534 list_for_each_entry(mode, &connector->modes, head) {
535 if (mode->status != MODE_OK)
538 mode->status = drm_mode_validate_driver(dev, mode);
539 if (mode->status != MODE_OK)
542 mode->status = drm_mode_validate_size(mode, maxX, maxY);
543 if (mode->status != MODE_OK)
546 mode->status = drm_mode_validate_flag(mode, mode_flags);
547 if (mode->status != MODE_OK)
550 ret = drm_mode_validate_pipeline(mode, connector, &ctx,
551 &mode->status);
558 mode->status = MODE_ERROR;
565 if (mode->status != MODE_OK)
567 mode->status = drm_mode_validate_ycbcr420(mode, connector);
583 list_for_each_entry(mode, &connector->modes, head) {
584 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
585 drm_mode_debug_printmodeline(mode);
605 * This function must be called from process context with no mode
815 * This function must be called from process context with no mode