All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/atomic-helper: Check encoder/crtc constraints
@ 2015-11-18 17:46 Daniel Vetter
  2015-11-19  8:50 ` [Intel-gfx] " Daniel Stone
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Daniel Vetter @ 2015-11-18 17:46 UTC (permalink / raw)
  To: Intel Graphics Development
  Cc: Daniel Vetter, Daniel Vetter, DRI Development, Daniel Stone

This was totally lost when I originally created the atomic helpers.

We probably should also check possible_clones in the helpers, but
since the legacy ones didn't do that this is for a separate patch.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 0c6f62168776..cfdc9931b08a 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -210,6 +210,14 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx)
 		return -EINVAL;
 	}
 
+	if (!drm_encoder_crtc_ok(new_encoder, connector_state->crtc)) {
+		DRM_DEBUG_ATOMIC("[ENCODER:%d:%s] incompatible with [CRTC:%d]\n",
+				 new_encoder->base.id,
+				 new_encoder->name,
+				 connector_state->crtc->base.id);
+		return -EINVAL;
+	}
+
 	if (new_encoder == connector_state->best_encoder) {
 		DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] keeps [ENCODER:%d:%s], now on [CRTC:%d]\n",
 				 connector->base.id,
-- 
2.5.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-11-19 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-18 17:46 [PATCH] drm/atomic-helper: Check encoder/crtc constraints Daniel Vetter
2015-11-19  8:50 ` [Intel-gfx] " Daniel Stone
2015-11-19 10:12 ` Ville Syrjälä
2015-11-19 14:02   ` Daniel Vetter
2015-11-19 14:24     ` Ville Syrjälä
2015-11-19 14:44       ` Daniel Vetter
2015-11-19 15:38 ` Jani Nikula

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.