Lines Matching defs:mode

70 drm_mode_validate_flag(const struct drm_display_mode *mode,
73 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
77 if ((mode->flags & DRM_MODE_FLAG_DBLSCAN) &&
81 if ((mode->flags & DRM_MODE_FLAG_3D_MASK) &&
89 drm_mode_validate_pipeline(struct drm_display_mode *mode,
99 ret = drm_connector_mode_valid(connector, mode, ctx, status);
108 *status = drm_encoder_mode_valid(encoder, mode);
111 * will not accept the mode anyway. If all encoders
112 * reject the mode then, at exit, ret will not be
120 mode);
131 *status = drm_crtc_mode_valid(crtc, mode);
135 * for this mode. Lets return now. */
147 struct drm_display_mode *mode;
153 /* Only add a GTF mode if we find no matching probed modes */
154 list_for_each_entry(mode, &connector->probed_modes, head) {
155 if (mode->hdisplay != cmdline_mode->xres ||
156 mode->vdisplay != cmdline_mode->yres)
160 /* The probed mode's vrefresh is set until later */
161 if (drm_mode_vrefresh(mode) != cmdline_mode->refresh)
165 /* Mark the matching mode as being preferred by the user */
166 mode->type |= DRM_MODE_TYPE_USERDEF;
170 mode = drm_mode_create_from_cmdline_mode(connector->dev,
172 if (mode == NULL)
175 drm_mode_probed_add(connector, mode);
180 const struct drm_display_mode *mode)
187 return crtc_funcs->mode_valid(crtc, mode);
191 const struct drm_display_mode *mode)
199 return encoder_funcs->mode_valid(encoder, mode);
204 struct drm_display_mode *mode,
215 ret = connector_funcs->mode_valid_ctx(connector, mode, ctx,
218 *status = connector_funcs->mode_valid(connector, mode);
447 struct drm_display_mode *mode;
460 list_for_each_entry(mode, &connector->modes, head) {
461 if (mode->status != MODE_OK)
464 mode->status = drm_mode_validate_driver(dev, mode);
465 if (mode->status != MODE_OK)
468 mode->status = drm_mode_validate_size(mode, maxX, maxY);
469 if (mode->status != MODE_OK)
472 mode->status = drm_mode_validate_flag(mode, mode_flags);
473 if (mode->status != MODE_OK)
476 ret = drm_mode_validate_pipeline(mode, connector, ctx,
477 &mode->status);
484 mode->status = MODE_ERROR;
489 if (mode->status != MODE_OK)
491 mode->status = drm_mode_validate_ycbcr420(mode, connector);
510 * for output mode filtering and detection.
534 * 4. Any non-stale mode on the modes list then undergoes validation
549 * 5. Any mode whose status is not OK is pruned from the connector's modes list,
550 * accompanied by a debug message indicating the reason for the mode's
560 struct drm_display_mode *mode;
581 list_for_each_entry(mode, &connector->modes, head)
582 mode->status = MODE_STALE;
656 * mode) needs to be the default if there's no EDID.
675 * mode. If all modes were pruned, perhaps because they need more
701 list_for_each_entry(mode, &connector->modes, head) {
702 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
703 drm_mode_debug_printmodeline(mode);
723 * This function must be called from process context with no mode
1006 * This function must be called from process context with no mode
1053 * This function must be called from process context with no mode
1103 * drm_crtc_helper_mode_valid_fixed - Validates a display mode
1105 * @mode: the mode to validate
1106 * @fixed_mode: the display hardware's mode
1109 * MODE_OK on success, or another mode-status code otherwise.
1112 const struct drm_display_mode *mode,
1115 if (mode->hdisplay != fixed_mode->hdisplay && mode->vdisplay != fixed_mode->vdisplay)
1117 else if (mode->hdisplay != fixed_mode->hdisplay)
1119 else if (mode->vdisplay != fixed_mode->vdisplay)
1163 * drm_connector_helper_get_modes_fixed - Duplicates a display mode for a connector
1165 * @fixed_mode: the display hardware's mode
1168 * that only supports a single fixed mode can use this function in their connector's
1178 struct drm_display_mode *mode;
1180 mode = drm_mode_duplicate(dev, fixed_mode);
1181 if (!mode) {
1182 drm_err(dev, "Failed to duplicate mode " DRM_MODE_FMT "\n",
1187 if (mode->name[0] == '\0')
1188 drm_mode_set_name(mode);
1190 mode->type |= DRM_MODE_TYPE_PREFERRED;
1191 drm_mode_probed_add(connector, mode);
1193 if (mode->width_mm)
1194 connector->display_info.width_mm = mode->width_mm;
1195 if (mode->height_mm)
1196 connector->display_info.height_mm = mode->height_mm;
1243 * TV modes, and the default mode expressed by the kernel command line.
1301 struct drm_display_mode *mode;
1304 mode = drm_mode_analog_ntsc_480i(dev);
1306 mode = drm_mode_analog_pal_576i(dev);
1309 if (!mode)
1312 mode->type |= DRM_MODE_TYPE_PREFERRED;
1313 drm_mode_probed_add(connector, mode);