Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/atomic: Check old_plane_state->crtc in" failed to apply to 4.14-stable tree

PATCH [email protected] 1 participant 1 message Aug 4, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 603ba2dfb338b307aebe95fe344c479a59b3a175 Mon Sep 17 00:00:00 2001

From: Boris Brezillon <[email protected]>
Date: Tue, 24 Jul 2018 15:32:15 +0200
Subject: [PATCH] drm/atomic: Check old_plane_state->crtc in
drm_atomic_helper_async_check()

Async plane update is supposed to work only when updating the FB or FB position of an already enabled plane. That does not apply to requests where the plane was previously disabled or assigned to a different CTRC.

Check old_plane_state->crtc value to make sure async plane update is allowed.

Fixes fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
drivers/gpu/drm/drm_atomic_helper.c +2 -1
index 130da5195f3b..ff858b890045 100644
@@ -1527,7 +1527,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
 	if (n_planes != 1)
 		return -EINVAL;
 
-	if (!new_plane_state->crtc)
+	if (!new_plane_state->crtc ||
+	    old_plane_state->crtc != new_plane_state->crtc)
 		return -EINVAL;
 
 	funcs = plane->helper_private;