All of lore.kernel.org
 help / color / mirror / Atom feed
* drm/atomic: Reject events for inactive crtc's.
@ 2015-07-30  7:03 Maarten Lankhorst
  2015-08-06  9:47 ` Daniel Stone
  0 siblings, 1 reply; 7+ messages in thread
From: Maarten Lankhorst @ 2015-07-30  7:03 UTC (permalink / raw)
  To: Daniel Vetter, dri-devel@lists.freedesktop.org; +Cc: Intel Graphics Development

This will cause drm_atomic_helper_page_flip and drm_mode_atomic_ioctl to
fail with -EINVAL if a event is requested on a inactive crtc.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index d719ce0b10a0..679577e8e02d 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -476,6 +476,12 @@ static int drm_atomic_crtc_check(struct drm_crtc *crtc,
 		return -EINVAL;
 	}
 
+	if (!state->active && state->event) {
+		DRM_DEBUG_ATOMIC("[CRTC:%d] requesting event and not active\n",
+				 crtc->base.id);
+		return -EINVAL;
+	}
+
 	/* The state->enable vs. state->mode_blob checks can be WARN_ON,
 	 * as this is a kernel-internal detail that userspace should never
 	 * be able to trigger. */

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-31  7:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-30  7:03 drm/atomic: Reject events for inactive crtc's Maarten Lankhorst
2015-08-06  9:47 ` Daniel Stone
2015-08-06 11:19   ` Maarten Lankhorst
2015-08-06 12:49     ` Daniel Vetter
2015-08-27 14:36       ` Daniel Stone
2015-08-27 15:22         ` [Intel-gfx] " Daniel Vetter
2015-08-31  7:48           ` Maarten Lankhorst

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.