From patchwork Fri Oct 23 12:21:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11853123 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 CB4EFC64E69 for ; Fri, 23 Oct 2020 12:24:38 +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 5819A24182 for ; Fri, 23 Oct 2020 12:24:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Fww0rbEa"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="Ahjvu946" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5819A24182 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=CyPQA4pqFQLS8OQYBfwL5A6HXgKlfXXrIL5oNAPpN9c=; b=Fww0rbEaVH28Mg6p5Td0bmh1p v/KdH0dlG4fg1VqR1myeIZG7FTxYW7bnkAcrczfDwW2IB5bdRRSObwwJit/qEspGr67sFe4EDyQMm bvG+wveLrxVRi6SWlr+Wfw82WHAwFgCdnpSvQdiUHisAWrLsxKqPx47u5ZuHlqjuTLlCnVqdfv7Pp tn5NYtsvgNBf+b/dXPyFuRZZZqF0bn67XWB8lpCdkkXv/rF4GtyH3qjAOZylFl10pudITkC2uZ63u GplTnVhh5M7VKwZPGxX6ANiTQUZQiY6wdTpMulImjgZc6slJmKnE6VlUSV/Bi3GKqQaP1Rel7GydQ 3htkyiJRQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVw5i-0007iV-4C; Fri, 23 Oct 2020 12:22:42 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVw5c-0007gq-MM for linux-arm-kernel@lists.infradead.org; Fri, 23 Oct 2020 12:22:37 +0000 Received: by mail-wm1-x344.google.com with SMTP id k18so1285969wmj.5 for ; Fri, 23 Oct 2020 05:22:36 -0700 (PDT) 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=KECdI7UHy1NcU7aeE9FximYHTQ+5TI/l/3s4CqAmbMI=; b=Ahjvu946vE1T+xMU2k+XRI42eiLtxjGVWsVgyVwHJBIx77D6/C7dwj/Me/xCT09d+z aIONXVRCqC8lUNhvVhEtP/qvNG+eeRCX3vxDNaExszHac2/GbHhJqCl0wVuzBfiwm0q2 9TU7pgTlpxZyVlswylTWMh0RiHYwIh8yTCf3k= 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=KECdI7UHy1NcU7aeE9FximYHTQ+5TI/l/3s4CqAmbMI=; b=F5O3QeEd07Venx/u0HtZFIbMGjYhhBrikVKsqMb0jg/NB631lLyUhAiK+otLjSoUHG eV0yGkRGVEwSCuo5PfwC82/4mQkISvJK8dqrzLa/5w0ni11bIytxfSneVbvB1KO12Wsh lpwMc4ii9DFWXek2spf6qHS6tdN5xERhEslPnBkZzSTnCGjyxifrPEFmN5vGOPO7vuVT nvZgK1Il4Djb7IEuE3YZXylRZ7GdKNnhsNxIJiXQpoAPMEanvO6Q0PoVpQx1YdVtBtfk K1jA7rDJTTilkAsOpFm3RC7jeLthCPQsxWxoNAoZYw9FHyE6h1q3G4NkW3jl7gQioRuI 7jHg== X-Gm-Message-State: AOAM532BPQOjWG1FPpEeX05L/5+c+6STycul+papGNWqlZ0BsjXToosZ u6nS/2V+IOG7wcOBX3n3aNx4+A== X-Google-Smtp-Source: ABdhPJwMomqCPl0n8vP9asLZ1SDNXT5ky/eYZSgG7qkX/A+gVEBjqXOzP0WvhSg8wJIRQx+wtE1AhA== X-Received: by 2002:a1c:55c1:: with SMTP id j184mr2089050wmb.180.1603455755936; Fri, 23 Oct 2020 05:22:35 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id y4sm3056484wrp.74.2020.10.23.05.22.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2020 05:22:35 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 12/65] drm/imx: Annotate dma-fence critical section in commit path Date: Fri, 23 Oct 2020 14:21:23 +0200 Message-Id: <20201023122216.2373294-12-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201023122216.2373294-1-daniel.vetter@ffwll.ch> References: <20201021163242.1458885-1-daniel.vetter@ffwll.ch> <20201023122216.2373294-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-20201023_082236_796476_3518EFE3 X-CRM114-Status: GOOD ( 15.07 ) 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 , Pengutronix Kernel Team , Daniel Vetter , Intel Graphics Development , NXP Linux Team , Philipp Zabel , Daniel Vetter , Shawn Guo , Sascha Hauer , 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 7d00c49fd5a5..0a6db8eeb25d 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -80,6 +80,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); @@ -110,6 +111,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 = {