From patchwork Thu Jan 21 15:29:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12036713 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9FA7C433E0 for ; Thu, 21 Jan 2021 15:31:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B1EB23A1C for ; Thu, 21 Jan 2021 15:31:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B1EB23A1C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PA59//SQZL+gfmnZIEQdD1Y1Ifrg4UL1tIXWLZr1Kl4=; b=rwZsAmHfZT8WScr2AvGL0LkBv AwpNmHZHLfyQg66KRDT8FpXwf9VWVMevnmaPNwTZfPCPtvvuHDe5f1ka7Llo9dhOraNSB5XMWl1EP mmPyrHz1RcCkABGt6xrS+1DynCtI8ijbg/J8n4/e4or0KniTncLseYPArGrMxp9lp4OohD4r1hmSi Cv1vGYj2A7nl5VeDdchJ3OkYWpHYMRSh5n0OHnP1hJR90F+6tyj3kBA5o9I0kybZeFHmWnTm798T8 RoenAUzU6xZre5qhL7/RQEsMVz81YWfAnolgSvYM3u7S6pqIFCPJE6Ud6xbrrc6bt8PT1Mvric3MH Dq6XgzVCQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2bub-0006ZT-7O; Thu, 21 Jan 2021 15:30:17 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2buY-0006XY-GZ for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 15:30:15 +0000 Received: by mail-wr1-x434.google.com with SMTP id 6so2158690wri.3 for ; Thu, 21 Jan 2021 07:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7nrYkMQbuVgfvxrNAaxj1DJfSWzLfMGK2H67+P9eVec=; b=MdVP3BiEfvBL7u05q3cxfqSP8KxzxIt6ZCiJsGes3iM6JOYlSNQsJLzWu6AHyBPi45 rpK6XfZ9BcoPVOWjNw+SdaOO6wSxEORBqFh11IwYn10xcl4kWRMu7a6HXSoQ08wa9ETT nZnhsPGCiBJLKc5zKiQQEt3cKZM8U7wzSadC8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7nrYkMQbuVgfvxrNAaxj1DJfSWzLfMGK2H67+P9eVec=; b=foORfYjGkT5ry9cWizHIZ2uDGBhOudz0sI8bFW82X7lXHUZf9Jm/STy3jGH1CiPac7 SLVusLBziPl2OK487LU+4BlE2aunDg54bbmcI1irp3tgoJHLy4Z2VztH5cIN/STP5W7p 6se86765SinTWY68cNA1ezRpn+mm6NjRFsIewTTLOJRHBtag2KbwtaD3+D+l4vf9S1Og /0aeeeCE0bAUSW6OCBDKC1iAfjfk/Eq/Hnlobg3M05Kb6NY2fcX8xQpfhfGwPcfIxVT2 wTb4iL7m0twDOv8xCjEeBM9Auu8ofw3B/vshH7uIZn+AeUEPK7sFlIcXcuCtF85vdE1I GYnA== X-Gm-Message-State: AOAM530zgt0yglcIZYyeZ0n6ci12ZIm4NfY1+a7cUw93KJqEb0wq0KdD ehpr5D10CM32o8q4xJWoW5YrKg== X-Google-Smtp-Source: ABdhPJwmn73GygtDXRM97hI2/oCQgUugFzapvV6cWgd9qQYKv79LTFcBpZbBdCvrSwQzTDIcgBpfXA== X-Received: by 2002:adf:cc8f:: with SMTP id p15mr14876332wrj.199.1611243013004; Thu, 21 Jan 2021 07:30:13 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id f14sm8269866wre.69.2021.01.21.07.30.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jan 2021 07:30:12 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 07/11] drm/imx: Annotate dma-fence critical section in commit path Date: Thu, 21 Jan 2021 16:29:55 +0100 Message-Id: <20210121152959.1725404-8-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210121152959.1725404-1-daniel.vetter@ffwll.ch> References: <20210121152959.1725404-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_103014_651348_871A911E X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , Philipp Zabel , Daniel Vetter , Sascha Hauer , NXP Linux Team , Pengutronix Kernel Team , Daniel Vetter , Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org drm_atomic_helper_commit_hw_done() is the last thing (no plane cleanup apparrently), so it's the entire function. And a nice comment explaining why thw wait_for_flip_done is ahead, unlike the usual sequence. Aside, I think since the atomic helpers do track plane disabling now separately this might no longer be a real problem since: commit 21a01abbe32a3cbeb903378a24e504bfd9fe0648 Author: Maarten Lankhorst Date: Mon Sep 4 12:48:37 2017 +0200 drm/atomic: Fix freeing connector/plane state too early by tracking commits, v3. Plus the subsequent bugfixes of course, this was tricky to get right. Signed-off-by: Daniel Vetter Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org --- drivers/gpu/drm/imx/imx-drm-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index d1a9841adeed..3ed1cc07cad1 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -81,6 +81,7 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state) struct drm_plane_state *old_plane_state, *new_plane_state; bool plane_disabling = false; int i; + bool fence_cookie = dma_fence_begin_signalling(); drm_atomic_helper_commit_modeset_disables(dev, state); @@ -111,6 +112,7 @@ static void imx_drm_atomic_commit_tail(struct drm_atomic_state *state) } drm_atomic_helper_commit_hw_done(state); + dma_fence_end_signalling(fence_cookie); } static const struct drm_mode_config_helper_funcs imx_drm_mode_config_helpers = {