From patchwork Tue Mar 30 02:53:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 12171525 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=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 A3D98C433C1 for ; Tue, 30 Mar 2021 02:54:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EA756192B for ; Tue, 30 Mar 2021 02:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbhC3CyR (ORCPT ); Mon, 29 Mar 2021 22:54:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230506AbhC3CyD (ORCPT ); Mon, 29 Mar 2021 22:54:03 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA959C061762 for ; Mon, 29 Mar 2021 19:54:02 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id h25so10697009pgm.3 for ; Mon, 29 Mar 2021 19:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qI/3Hs2aK5j95IIJ6CXgbrMKhpGuwzEJEjubXc02oD4=; b=XVP5azCVkEZItoAwFhpabdgCE8YXvf2qCEpXn6Xgov2pwKSL15Y4UHoC05ptJsLGKx kEtelr+AEbMj7ivpuDloxY5vjyCH7q7CXiqDGjOvSdJnxhx1w41xPHavLLmnWDgXtNJB xf7gMchT4RbZOOtz0mslmlsxDTRC1wWZZ1otA= 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=qI/3Hs2aK5j95IIJ6CXgbrMKhpGuwzEJEjubXc02oD4=; b=CkKnHpDWzVoEpM7T1TSKBbk8zYWyMNvQKNsxYvaysMq1stpndvR990BWiLIGUHMnGa edmWmVOIdjb35v4elRwaxy7EDo9ttzPJOBpnK63JwZufto6W4Hz6MicKkcJDjeuHr8co +aiMpJ7lF3O2wgtqSPs0yH1+oaOn+z7rUy+6ClNOGZFCETQffX+62cJ4bXMTCHkJHc0R knMvYUvhXroR2SJbFmkA7TMI8lCMtHHPM+nQESQ21qdhdgkmyC4EU6YV0mk9zr/Dq5rg rDaQ7/XHyHj16NR+2zqXrxMeSQ700uj7+e+E9crQUVnOugxa96fhgSWASaZbtvEV8bOC gikw== X-Gm-Message-State: AOAM5306qGEdk37pBpM6Tqj60PjW413bcu9fy2uH41rT9ScmDIBS0TIM qh+uYa7A09fcHcszZSsFIUW3Qg== X-Google-Smtp-Source: ABdhPJyZiJrPuAbzqL8NKVXxk3Sum/s/UcvHx89hqsPS7SaR6LwBWLGagqLg79BtkIOOhi/X2lPw2Q== X-Received: by 2002:a65:56cc:: with SMTP id w12mr26587564pgs.354.1617072842326; Mon, 29 Mar 2021 19:54:02 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:f599:1ca7:742d:6b50]) by smtp.gmail.com with ESMTPSA id t17sm19152706pgk.25.2021.03.29.19.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 19:54:02 -0700 (PDT) From: Douglas Anderson To: Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Sam Ravnborg Cc: Bjorn Andersson , Stephen Boyd , Maarten Lankhorst , robdclark@chromium.org, Stanislav Lisovskiy , linux-arm-msm@vger.kernel.org, Steev Klimaszewski , Linus W , Douglas Anderson , Boris Brezillon , Daniel Vetter , David Airlie , Laurent Pinchart , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 01/14] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() Date: Mon, 29 Mar 2021 19:53:32 -0700 Message-Id: <20210329195255.v2.1.If62a003f76a2bc4ccc6c53565becc05d2aad4430@changeid> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210330025345.3980086-1-dianders@chromium.org> References: <20210330025345.3980086-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The drm_bridge_chain_pre_enable() is not the proper opposite of drm_bridge_chain_post_disable(). It continues along the chain to _before_ the starting bridge. Let's fix that. Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Douglas Anderson Reviewed-by: Andrzej Hajda --- (no changes since v1) drivers/gpu/drm/drm_bridge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 64f0effb52ac..044acd07c153 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -522,6 +522,9 @@ void drm_bridge_chain_pre_enable(struct drm_bridge *bridge) list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { if (iter->funcs->pre_enable) iter->funcs->pre_enable(iter); + + if (iter == bridge) + break; } } EXPORT_SYMBOL(drm_bridge_chain_pre_enable);