From patchwork Thu Dec 7 14:16:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175166 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4812806vqy; Thu, 7 Dec 2023 06:19:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzsLdiecz0D/rScdffKXPbYze2+al3e5YZkpjZOhNxbbX5t5aEu+yY8IXC5pcVZYYhdvWg X-Received: by 2002:a05:6a20:9410:b0:18f:97c:9298 with SMTP id hl16-20020a056a20941000b0018f097c9298mr1866798pzb.125.1701958768919; Thu, 07 Dec 2023 06:19:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958768; cv=none; d=google.com; s=arc-20160816; b=fmJPKxW2iQDVvZHJdBZYQw7uapXyyh8aaYoiVVVYfGVSODZIX7hWQdEzHGnf2PTkG3 /pl4OQvEyct2ecIESw4niWNTnCE/h8epCBJmnpIog9z8A+2M3gdNU/eCA7BwId6jVHLN B3Pp89PkqMrJOEDDqWRs4XIau1P54NJfYJWZXTZbfvSjgFQMnXKXwqYhlxJw94tiElVr AbxkmABI4H319lvjAEewgmFdJ2rkNl1DR3CXuM88tG0z3+L+TcEIb02g10aENBlilEwu KNg7D5zyWHCaOnt9HG791ju2gx6JRI1mce2Xs3skxSu958xojAiowBl6mFGcA5r0TFgV neug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9yGi3UQjgH7vKIKdKQCwE11iHS9JPf1l9kS7cSUyqbg=; fh=yrurfj0wqsNBtuv2/DS7hXM5gjUdNl0RGba7zZuGnHQ=; b=tXAnYOFEAW7N86GPmH6+GeXOmDtwOVWksdS7LXrlILC1z6JT8tiIpVGVwEDq7jAA+E XYBwC60p3xJ2OfS930szbLqkJBoHhcqVgOGfH/+nvWX6CHVNKFQ/9GdyxlIBXm5B9mMW t2FNFzgHjeTsPwoHaqjwDoc0kLUSEMYEKnrnc3rd8gowDdCzDb5Cqps95AKVKT/MsM+C LY9kUCVuFYONB0pPior6IT1+BdZQTHyiUSfNynm6/FqnuptJPQ14/9ckJKJIwjFHxrdu agseAZi1x/2v8zhviv1KR1Et2Hnp9EusLGCyyCOQepy+oQG5RoJfJ0eysgGsc+9S7rvl U8Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kxLmN75T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 4-20020a631544000000b0059f0cebd04csi1210904pgv.722.2023.12.07.06.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kxLmN75T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9CA9E803BAAC; Thu, 7 Dec 2023 06:19:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443318AbjLGOTB (ORCPT + 99 others); Thu, 7 Dec 2023 09:19:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443293AbjLGOSW (ORCPT ); Thu, 7 Dec 2023 09:18:22 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC3721BFB for ; Thu, 7 Dec 2023 06:17:34 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-54cb4fa667bso1322509a12.3 for ; Thu, 07 Dec 2023 06:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958649; x=1702563449; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9yGi3UQjgH7vKIKdKQCwE11iHS9JPf1l9kS7cSUyqbg=; b=kxLmN75TgX5uFIBJuDTFH1+xNWuzgedppS0kPCGWDoBGRDA7SJpPXO3kMHuPtS+3jS 8/34YgTmoAYy/FBfScUVsXXnid5r/hCPz0oJeFAETn6vrcCyoAV6FH/vSgLiqkBT9YTz +vRjo8hDwR1xJ5c7Oi8himUlFU6vBYp0xsuY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958649; x=1702563449; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9yGi3UQjgH7vKIKdKQCwE11iHS9JPf1l9kS7cSUyqbg=; b=ptHO4dq35Q4f1QrpfS8n9u6CHLM7AS5p/H/Dxkf2mbl707k7IE5LYB8LwtJCIyIISA VSHUsQYlv103Oue23u1DWjES3q15FmKhUlaGRcv8iAbUx1qS2vFn8KXtpuVnMBkMuDuk G1oQ4tjH2xQ2RxDr0Hx/nUkWsS1ePCBWbtm30CLrb0OczdegeWziWZupjf5Gs8qX8vH1 Lt4oSSqVssuu0L8ss2lHz6yYRoxBSL7tUEoxBvPacwnm8wLFQBlrowPzjnq5CwPfL45n M3gWz0hrzuw5cUtFUsIIt5rvH3OeaAM+WPs9pdiMjWV+kPWRB3Lo8rgq/XJEcKFHtQlF 3pbA== X-Gm-Message-State: AOJu0Yz3jhx9b84F10N9ehEQ0df6Vmt1TV9l5zAVGc9dgTLxTXnKdgU2 3oKRXE4pZ++rUZ2xhJ8xsh7f6Mb8ftSFG/lRW0SfKg== X-Received: by 2002:a17:907:b88:b0:a1c:eea8:e34b with SMTP id ey8-20020a1709070b8800b00a1ceea8e34bmr1371325ejc.100.1701958649228; Thu, 07 Dec 2023 06:17:29 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:28 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Daniel Vetter , Dave Stevenson , David Airlie , Frieder Schrempf , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Robert Foss , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 01/10] drm/bridge: Fix bridge disable logic Date: Thu, 7 Dec 2023 15:16:30 +0100 Message-ID: <20231207141723.108004-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:19:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633117786104584 X-GMAIL-MSGID: 1784633117786104584 As explained by the comment of the fixed code, we need to find the next bridge that hasn't set the "pre_enable_prev_first" flag to true. The code, on the contrary, was doing the opposite. So, the order of disabling the bridges couldn't be altered as required by setting the "pre_enable_prev_first" flag to true. Fixes: 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init order") Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/gpu/drm/drm_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 30d66bee0ec6..f66bf4925dd8 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -686,7 +686,7 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, */ list_for_each_entry_from(next, &encoder->bridge_chain, chain_node) { - if (next->pre_enable_prev_first) { + if (!next->pre_enable_prev_first) { next = list_prev_entry(next, chain_node); limit = next; break;