if (new_state->crtc_x || new_state->crtc_y) {
dev_err(plane->dev->dev, "%s: crtc position must be zero.",
__func__); return -EINVAL;
}
crtc_state = drm_atomic_get_existing_crtc_state(state,
new_state->crtc); /* we should have a crtc state if the plane is attached to a crtc */ if (WARN_ON(!crtc_state)) return 0;
if (crtc_state->mode.hdisplay != new_state->crtc_w ||
crtc_state->mode.vdisplay != new_state->crtc_h) {
dev_err(plane->dev->dev, "%s: Size must match mode (%dx%d == %dx%d)", __func__,
crtc_state->mode.hdisplay, crtc_state->mode.vdisplay,
new_state->crtc_w, new_state->crtc_h); return -EINVAL;
}
pitch = crtc_state->mode.hdisplay *
new_state->fb->format->cpp[0]; if (new_state->fb->pitches[0] != pitch) {
dev_err(plane->dev->dev, "Invalid pitch: fb and crtc widths must be the same"); return -EINVAL;
}
if (old_state->fb && new_state->fb->format != old_state->fb->format) {
dev_dbg(plane->dev->dev, "%s(): pixel format change requires mode_change\n",
__func__);
crtc_state->mode_changed = true;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.