Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7977395rwr; Wed, 10 May 2023 15:55:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5k6oEVn/ewr+7BqaR3SAwnF8WBJ4x/abWEoJOzdd8KjfA82AMGNaIvc57Gb8gz7YUsPkzC X-Received: by 2002:a05:6a20:244b:b0:100:a9e3:17d4 with SMTP id t11-20020a056a20244b00b00100a9e317d4mr13800846pzc.0.1683759338746; Wed, 10 May 2023 15:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683759338; cv=none; d=google.com; s=arc-20160816; b=CmgHwLdxpgrtOhemK4NAVyhy3LR4CVq0+8C+p4XFHCMAq5uUqvJvYU3RkZoKWir1Km rXp79NLWOHAuH89IX/GS8eWZtTY2XBMhaY5cJUciMhm7PKE0/200og1hOuLOWK/sw86K u/4+5CTVzsz20A3SzqCYkp6/3u2i/l4+WxsZnPfn+fryO1/aV+YbH141CGsgFATDktO4 0QXSXaVNrzaX+7Vu+267ohv2sQfJ3Myb8ua7XsEKzSaGaB6amRT4xFHfmmy49rxKRj4z fOLoayNVLeiqFPTtxzObDkgv6WjrzzRetBg0BuLDny9/1QLZe0KxlvOc3di8x9wjNK/9 jMMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:user-agent:from :references:in-reply-to:mime-version:dkim-signature; bh=Lc9F8QaPJkxAnOe+Xl1C2QlUZazEe73HEcZR10o9E9A=; b=Gp1+FnBnLW7Ch4H17CQ8R/0na8B3lRLgLsaJfV5OyW8CMgfgItppk/oAMb9OdGysrm NZB/XnlL1G9b4/j+GF/gpA3I4H3ymBIpiXAXGnzqXe1n9ak9rDUPalRC+KtihSK5CJn/ Sr/zpX8761LaiVlffXzkTUohpON2GiF5VlB1LUmh7I2nIluYJFf8PjnbziagYMCULK0s Rscz6mjzOsMTuEArBw6vk+SmDrFSyLhT47UP2hBol2rRFJC94YL/5MKM6AhcnZ1D5h9p fu9s5xUZXwHKsu8wQnFkSJyAZALDkHlkGiTFzbu0OzOh3Fiz3EqFRVeRQNuMvk0c4cft dijw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="OUTeeS/I"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f28-20020a63381c000000b0052c6200e5e1si5152836pga.649.2023.05.10.15.55.25; Wed, 10 May 2023 15:55:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="OUTeeS/I"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236450AbjEJWrF (ORCPT + 99 others); Wed, 10 May 2023 18:47:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236038AbjEJWrC (ORCPT ); Wed, 10 May 2023 18:47:02 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E243598 for ; Wed, 10 May 2023 15:47:01 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-4f22908a082so5783728e87.1 for ; Wed, 10 May 2023 15:47:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1683758819; x=1686350819; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:from:to:cc:subject:date:message-id :reply-to; bh=Lc9F8QaPJkxAnOe+Xl1C2QlUZazEe73HEcZR10o9E9A=; b=OUTeeS/IjRvUewaDFMBR2nz8cQVKPl25aHSFeXlJeYsY5sLhfm5KCpbDTVwyFAON4i p6VtfvVDwB3dHDu2QM07grzKk89qjcZ8HcVr3Yn6w+WspTT6KaAfRU33H4l2AN+FSkyT 77GXjTUPUnZRizQz4h72jAQhbYda/SvDR/lD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683758819; x=1686350819; h=cc:to:subject:message-id:date:user-agent:from:references :in-reply-to:mime-version:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Lc9F8QaPJkxAnOe+Xl1C2QlUZazEe73HEcZR10o9E9A=; b=P1ToO2Jjgq7A2BRssLfu6+HUN67Omt6q69br/Yet9DK9f/0peIXGR6XeuAKU+JLpBd jKmEMkpqFM1WWKBhcZRaixWdahs8ewqnwIadCZAD0WrxmgMyIRVGFof01qRPzWyGkBaw /PcNLycxhwDTkr6ftyk6vVAW6gBtSxb1X2fee0P5tWokRyIZuFeDMs0r46jnQL7cLa7w t5azKNJ1k0w5Home7iSquiaSg6mPxm9a0TZbYw0En1g8I4eK20MjGb3kVY0JVQRCqMGt g7UTY7a9jwPc3OFE/uxVw7rqW/Huh9+BWVGBcOpQGlOf4pdktvKHy5SKAJb/proE6UyD L63Q== X-Gm-Message-State: AC+VfDxgol2LUxO4ZpbuC4iAc5kJOuR4i3EoOjqWCrLzP/7Z12hZ4DHQ 4UXzeikKNuvSzsqexNJuPWt98fUE35ZRA1YgfIR4Qg== X-Received: by 2002:ac2:4f8d:0:b0:4f1:2180:5683 with SMTP id z13-20020ac24f8d000000b004f121805683mr1967053lfs.41.1683758819344; Wed, 10 May 2023 15:46:59 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 10 May 2023 15:46:58 -0700 MIME-Version: 1.0 In-Reply-To: <1683750665-8764-3-git-send-email-quic_khsieh@quicinc.com> References: <1683750665-8764-1-git-send-email-quic_khsieh@quicinc.com> <1683750665-8764-3-git-send-email-quic_khsieh@quicinc.com> From: Stephen Boyd User-Agent: alot/0.10 Date: Wed, 10 May 2023 15:46:58 -0700 Message-ID: Subject: Re: [PATCH v1 2/2] drm/msm/dp: add mutex to protect internal_hpd against race condition between different threads To: Kuogee Hsieh , agross@kernel.org, airlied@gmail.com, andersson@kernel.org, daniel@ffwll.ch, dianders@chromium.org, dmitry.baryshkov@linaro.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, sean@poorly.run, vkoul@kernel.org Cc: quic_abhinavk@quicinc.com, quic_jesszhan@quicinc.com, quic_sbillaka@quicinc.com, marijn.suijten@somainline.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Kuogee Hsieh (2023-05-10 13:31:05) > Intrenal_hpd is referenced by event thread but set by drm bridge callback > context. Add mutex to protect internal_hpd to avoid conflicts between > threads. > > Signed-off-by: Kuogee Hsieh > --- This patch looks completely unnecessary. How can dp_bridge_hpd_enable() be called at the same time that dp_bridge_hpd_disable() is called or dp_bridge_hpd_notify() is called? Isn't there locking or ordering at a higher layer?