]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/imx: ignore plane updates on disabled crtcs
authorPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 5 Nov 2018 15:36:07 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 13:35:10 +0000 (14:35 +0100)
[ Upstream commit 4fb873c9648e383206e0a91cef9b03aa54066aca ]

This patch fixes backtraces like the following when sending SIGKILL to a
process with a currently pending plane update:

    [drm:ipu_plane_atomic_check] CRTC should be enabled
    [drm:drm_framebuffer_remove] *ERROR* failed to commit
    ------------[ cut here ]------------
    WARNING: CPU: 3 PID: 63 at drivers/gpu/drm/drm_framebuffer.c:926 drm_framebuffer_remove+0x47c/0x498
    atomic remove_fb failed with -22

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/imx/ipuv3-plane.c

index cf98596c7ce1e7598de76ad1cf1bcaa3407c8d65..d0d7f6adbc89ce6ec28c96e7e25f5c1f8d1c19d5 100644 (file)
@@ -348,9 +348,9 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
        if (ret)
                return ret;
 
-       /* CRTC should be enabled */
+       /* nothing to check when disabling or disabled */
        if (!crtc_state->enable)
-               return -EINVAL;
+               return 0;
 
        switch (plane->type) {
        case DRM_PLANE_TYPE_PRIMARY: