Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8003990rwr; Wed, 10 May 2023 16:21:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ79eIcnB3c/fAoSn+71jE3Gy/HnJOLKsCAzXkn2YcxarYW/bjsauJo9Rm5RLwKbc1WwG9lN X-Received: by 2002:a17:902:d504:b0:1ac:3f3c:c154 with SMTP id b4-20020a170902d50400b001ac3f3cc154mr23948553plg.41.1683760904541; Wed, 10 May 2023 16:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683760904; cv=none; d=google.com; s=arc-20160816; b=P13JvzINFsFDiGs3YRDSZLorP0ziAI+KGrlyyq8lbMbNOUI22T1uCPuDxhj3b6s2Z/ dzJkwzyMRX//6klM47QB7MwxZSp4jI7oNIL0BdgE94DZo8zk7117D4lpTjfrQ0vVgRZR ztz8OC7vnrFYbTam1LJPyN4LfzSM6+Qsa/+gno3p9JyXmeoz2parR72wsVmSjdrI276b qtoUt3Bz6t+uDiQOmcIgFRR++8hI8mOw+7RcF0RxlTXP/z72L0PX1ASVCr6Q6MS1o4VD x86Z5PeJXxGTA/VZ2DuFNftY+FrWb15oPImkKXB2lN+MH2bby0QNJUWjimXU6Vfk4uTn WhLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=HjDcgjS5DZW6UuYV8r11Pc/FqhPUIigxzCzfrJDDsV8=; b=ILhOyKrf+ZZdOl2ewSXuSGou8yy3rsRp9+RKDwwZ4szav7NMbBVAgqhP5jQZHhdBR1 uZ9FC6YpbiOWC0Yzkgk6/PDZFIeWMsMtFXGIBg58FkrF1VJQzCs25bTynrf05QM10kmO 0r4v3JKwmv7Jb5cenOoJfS4AQYBrQbNesc2ao99my3KaC5TXDp3NpRX79mIfCPYJbAaQ RHZaCZZBtymj+oncFYpVp0iO16f1u17g22+ZJohi+lGB9Q6kX7P3nE5APkBMtnMtCaPB 3DljvkLC5juiZRj30FgsIm2iGRdn1gRB4w659LC01uNYNxXFmjjnVGIiG/9uSx852B0r XODw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=b2UTSaL1; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a170902db0200b001a97e24eb34si5535316plx.201.2023.05.10.16.21.30; Wed, 10 May 2023 16:21:44 -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=@quicinc.com header.s=qcppdkim1 header.b=b2UTSaL1; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236863AbjEJXLl (ORCPT + 99 others); Wed, 10 May 2023 19:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235708AbjEJXLj (ORCPT ); Wed, 10 May 2023 19:11:39 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96FB2D3; Wed, 10 May 2023 16:11:38 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34AMsMj3026708; Wed, 10 May 2023 23:11:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=HjDcgjS5DZW6UuYV8r11Pc/FqhPUIigxzCzfrJDDsV8=; b=b2UTSaL14g7a6n3Ef9MHaDiNmuUqqjzb3aB40mGEjZxLiHNRB9GpvikZGFqbb2X/89Cb QjfSVPcLx377UdWB44Uoxv/t+dpGIbUvI0Jt3oPMRkFRBa4oBNe06+krEAtpvZwio3Wi EIBv/C6N9BlCZ309QIsLyoz7qO3OewjM5yoM8gf4ZhzHUuO6iu5o/Oj/ZYRVNcf9AqzB ElerFEYnYhqVKh6/SEpok43rABeDH/m8bdGPuZ49Wu9e31yOM7bR9hQ/nIGK9zoLmIKg VO1f6sYIRUJ46lC50NCTs/UP+DuB/A6ze+jLL+3o+kslec8J0Vd2XASfthLpJHjDYdTX Xw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qg79csqmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 23:11:29 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 34ANBRr9015221 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 May 2023 23:11:27 GMT Received: from [10.134.70.142] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Wed, 10 May 2023 16:11:27 -0700 Message-ID: <74ae5514-2b04-9363-902e-cb4d7cbe1128@quicinc.com> Date: Wed, 10 May 2023 16:11:26 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH v1 2/2] drm/msm/dp: add mutex to protect internal_hpd against race condition between different threads Content-Language: en-US To: Stephen Boyd , Kuogee Hsieh , , , , , , , , , , CC: , , , , , References: <1683750665-8764-1-git-send-email-quic_khsieh@quicinc.com> <1683750665-8764-3-git-send-email-quic_khsieh@quicinc.com> From: Abhinav Kumar In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: N1Y7ho_dLycMuuFUqlQKFTZn30bqDzLf X-Proofpoint-ORIG-GUID: N1Y7ho_dLycMuuFUqlQKFTZn30bqDzLf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-10_04,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 mlxscore=0 suspectscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxlogscore=712 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305100192 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 5/10/2023 3:46 PM, Stephen Boyd wrote: > 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? Ack. We can drop this patch because we are protected by bridge->hpd_mutex in drm_bridge_hpd_enable() / drm_bridge_hpd_disable () and drm_bridge_hpd_notify().