Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa5aaeec authored by Maarten Lankhorst's avatar Maarten Lankhorst
Browse files

drm/atomic: Remove WARN_ON for invalid plane configuration.



Userspace can set a FB_ID on a plane without setting CRTC_ID, which
will fail with -EINVAL, but the kernel shouldn't warn about that.

Same for !FB_ID and CRTC_ID being set.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180130102704.28016-1-maarten.lankhorst@linux.intel.com


Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
parent 1a1c130c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -863,10 +863,10 @@ static int drm_atomic_plane_check(struct drm_plane *plane,
	int ret;

	/* either *both* CRTC and FB must be set, or neither */
	if (WARN_ON(state->crtc && !state->fb)) {
	if (state->crtc && !state->fb) {
		DRM_DEBUG_ATOMIC("CRTC set but no FB\n");
		return -EINVAL;
	} else if (WARN_ON(state->fb && !state->crtc)) {
	} else if (state->fb && !state->crtc) {
		DRM_DEBUG_ATOMIC("FB set but no CRTC\n");
		return -EINVAL;
	}