if (desired == p->rotation.current)
return true;
- if ((desired & p->rotation.supported) == 0)
+ if ((desired & p->rotation.supported) == 0) {
+ errno = EINVAL;
return false;
+ }
DBG(("%s: obj=%d, type=%x prop=%d set-rotation=%x\n",
__FUNCTION__, p->id, LOCAL_MODE_OBJECT_PLANE, p->rotation.prop, desired));
xf86IsEntityShared(crtc->scrn->entityList[0]));
output_ids[output_count] = to_connector_id(output);
- if (++output_count == ARRAY_SIZE(output_ids))
+ if (++output_count == ARRAY_SIZE(output_ids)) {
+ errno = EINVAL;
return false;
+ }
}
VG_CLEAR(arg);
sna_crtc->bo = bo;
mode_to_kmode(&sna_crtc->kmode, mode);
if (!sna_crtc_apply(crtc)) {
+ int err = errno;
+
kgem_bo_destroy(&sna->kgem, bo);
if (!sna_crtc->shadow) {
}
xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
- "failed to set mode: %s\n", strerror(errno));
+ "failed to set mode: %s [%d]\n", strerror(err), err);
sna_crtc->offset = saved_offset;
sna_crtc->transform = saved_transform;