Currently, DCSS driver does not support cropping for linear buffers,
only tiled ones. Current checks return an error only if the submitted
buffer has no modifiers present. However, Weston uses modifiers even for
linear buffers and we need to check for that.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
state->crtc_y + state->crtc_h > vdisplay) {
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
return -EINVAL;
- else if (!(fb->flags & DRM_MODE_FB_MODIFIERS))
+ else if (!(fb->flags & DRM_MODE_FB_MODIFIERS) ||
+ (fb->flags & DRM_MODE_FB_MODIFIERS &&
+ fb->modifier == DRM_FORMAT_MOD_LINEAR))
return -EINVAL;
}