Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753629AbdGYTsp (ORCPT ); Tue, 25 Jul 2017 15:48:45 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36304 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752466AbdGYTYr (ORCPT ); Tue, 25 Jul 2017 15:24:47 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maarten Lankhorst , Daniel Vetter Subject: [PATCH 4.12 123/196] drm/atomic: Add missing drm_atomic_state_clear to atomic_remove_fb Date: Tue, 25 Jul 2017 12:22:02 -0700 Message-Id: <20170725192052.295868560@linuxfoundation.org> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170725192046.422343510@linuxfoundation.org> References: <20170725192046.422343510@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 35 4.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Maarten Lankhorst commit 4086d90cffb8f48400d51fbab575fe50458512e3 upstream. All atomic state should be cleared when drm_modeset_backoff() is called, because it drops all locks and the state becomes invalid. The call to drm_atomic_state_clear was missing in atomic_remove_fb, so add the missing call there. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/20170629115954.26029-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter Fixes: db8f6403e88a ("drm: Convert drm_framebuffer_remove to atomic, v4.") Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_framebuffer.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c @@ -832,6 +832,7 @@ unlock: drm_atomic_clean_old_fb(dev, plane_mask, ret); if (ret == -EDEADLK) { + drm_atomic_state_clear(state); drm_modeset_backoff(&ctx); goto retry; }