Lines Matching refs: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 const struct drm_display_mode *mode,
216 ret = connector_funcs->mode_valid_ctx(connector, mode, ctx,
219 *status = connector_funcs->mode_valid(connector, mode);
449 struct drm_display_mode *mode;
462 list_for_each_entry(mode, &connector->modes, head) {
463 if (mode->status != MODE_OK)
466 mode->status = drm_mode_validate_driver(dev, mode);
467 if (mode->status != MODE_OK)
470 mode->status = drm_mode_validate_size(mode, maxX, maxY);
471 if (mode->status != MODE_OK)
474 mode->status = drm_mode_validate_flag(mode, mode_flags);
475 if (mode->status != MODE_OK)
478 mode->status = drm_mode_validate_ycbcr420(mode, connector);
479 if (mode->status != MODE_OK)
482 ret = drm_mode_validate_pipeline(mode, connector, ctx,
483 &mode->status);
490 mode->status = MODE_ERROR;
512 * for output mode filtering and detection.
536 * 4. Any non-stale mode on the modes list then undergoes validation
551 * 5. Any mode whose status is not OK is pruned from the connector's modes list,
552 * accompanied by a debug message indicating the reason for the mode's
562 struct drm_display_mode *mode;
583 list_for_each_entry(mode, &connector->modes, head)
584 mode->status = MODE_STALE;
657 * mode) needs to be the default if there's no EDID.
676 * mode. If all modes were pruned, perhaps because they need more
703 list_for_each_entry(mode, &connector->modes, head) {
704 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);
705 drm_dbg_kms(dev, "Probed mode: " DRM_MODE_FMT "\n",
706 DRM_MODE_ARG(mode));
726 * This function must be called from process context with no mode
1025 * This function must be called from process context with no mode
1072 * This function must be called from process context with no mode
1122 * drm_crtc_helper_mode_valid_fixed - Validates a display mode
1124 * @mode: the mode to validate
1125 * @fixed_mode: the display hardware's mode
1128 * MODE_OK on success, or another mode-status code otherwise.
1131 const struct drm_display_mode *mode,
1134 if (mode->hdisplay != fixed_mode->hdisplay && mode->vdisplay != fixed_mode->vdisplay)
1136 else if (mode->hdisplay != fixed_mode->hdisplay)
1138 else if (mode->vdisplay != fixed_mode->vdisplay)
1146 * drm_connector_helper_get_modes_fixed - Duplicates a display mode for a connector
1148 * @fixed_mode: the display hardware's mode
1151 * that only supports a single fixed mode can use this function in their connector's
1161 struct drm_display_mode *mode;
1163 mode = drm_mode_duplicate(dev, fixed_mode);
1164 if (!mode) {
1165 drm_err(dev, "Failed to duplicate mode " DRM_MODE_FMT "\n",
1170 if (mode->name[0] == '\0')
1171 drm_mode_set_name(mode);
1173 mode->type |= DRM_MODE_TYPE_PREFERRED;
1174 drm_mode_probed_add(connector, mode);
1176 if (mode->width_mm)
1177 connector->display_info.width_mm = mode->width_mm;
1178 if (mode->height_mm)
1179 connector->display_info.height_mm = mode->height_mm;
1226 * TV modes, and the default mode expressed by the kernel command line.
1285 struct drm_display_mode *mode;
1288 mode = drm_mode_analog_ntsc_480i(dev);
1290 mode = drm_mode_analog_pal_576i(dev);
1293 if (!mode)
1296 mode->type |= DRM_MODE_TYPE_PREFERRED;
1297 drm_mode_probed_add(connector, mode);