|
@@ -2039,7 +2039,7 @@ static int prepare_crtc_signaling(struct drm_device *dev,
|
|
|
{
|
|
|
struct drm_crtc *crtc;
|
|
|
struct drm_crtc_state *crtc_state;
|
|
|
- int i, ret;
|
|
|
+ int i, c = 0, ret;
|
|
|
|
|
|
if (arg->flags & DRM_MODE_ATOMIC_TEST_ONLY)
|
|
|
return 0;
|
|
@@ -2100,8 +2100,17 @@ static int prepare_crtc_signaling(struct drm_device *dev,
|
|
|
|
|
|
crtc_state->event->base.fence = fence;
|
|
|
}
|
|
|
+
|
|
|
+ c++;
|
|
|
}
|
|
|
|
|
|
+ /*
|
|
|
+ * Having this flag means user mode pends on event which will never
|
|
|
+ * reach due to lack of at least one CRTC for signaling
|
|
|
+ */
|
|
|
+ if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT))
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|