Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp818073lqh; Thu, 28 Mar 2024 18:47:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW5TlyjC474O4TA3G5qF9AViVBHERi8ta/yPJuqaMAewwedcyEPnuRKCwYTYBnTaycSqba2+92a2orygkg6amhWdgB+3fQ3FVOV3r7wlA== X-Google-Smtp-Source: AGHT+IF55lPzltAu36x3XLK8OxayIysWINz9ThGgbvHW6pNI1lkc0eyUdvbY0IAA8aIJKbe/mWbU X-Received: by 2002:ac2:5390:0:b0:515:845f:6008 with SMTP id g16-20020ac25390000000b00515845f6008mr733361lfh.57.1711676842748; Thu, 28 Mar 2024 18:47:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711676842; cv=pass; d=google.com; s=arc-20160816; b=xR2WYbXpRVdyCFappOvSCv3l8LvAzkMurqs0dmVZJGjFGhIHPla9tCcnwtcDqyAFEX xElt8rDeUToQ679hdd2qVtwmyY+8me+fXDBxKUA+BQUa/g80NgBVeE5vpBYd4QoFfDX9 vqFR9amnFlTbxnoe8Bw53gdwocx7YhJ9J3RZVwuzSlJ8Lofi9v7mFFP1JB32KWEJ6V2p 7G4uv0/keBayfifurZlICkttzahORMIjR9M6udQtGcKdE/Me2Zypkdcphsu304akVWjU TR8Bd3dYX94HONacbAyg+Lh32qKBzPo4A0fptUs+1vdQanNNW+rPXB+79Zff97ETmEMk 51gA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Qm1gZFAKo7P2AmUjvUjLL//GeY28er1Yk8y2KajYbD0=; fh=zznoHtEHkzhwvt/HLaxwsVTkeKw0gCRmo2k+/1ZjXO0=; b=onEtgwMuFkkhwUF71+R42TD+gdCGsAsC3C1tmuBWO67w0H84ZkaMKaM+RMCVdmp3EE kLlNCBc+SziUsBcjavawDd6ssUSDdfArAjwUHqRcprZsAeU4biOg46xduUFeBYB3D5zZ e6TEa9zldUH7b2ZdoyoWJ7wAKV+B6OJ+kJc33tsII0zwRF1AfVEg6szBTxRXeNkmDFMZ B96P5rB7RSO8xkvip3Mt9CLviVnGKAcVfykWVohCECxDJEJWiagI4XQ33ARYm4jhaLmO 1YIK1o0lv/UeP8ZUZRXnqZWo+Y460EkimB/r2XPJUoosScxCFSsvJmjHO15tiEKTQJr2 Z67A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="SzaX/4y5"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-123974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j20-20020a1709062a1400b00a47103b1f7esi1283917eje.212.2024.03.28.18.47.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 18:47:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="SzaX/4y5"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-123974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 775B61F22A24 for ; Fri, 29 Mar 2024 01:47:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1C88182D2; Fri, 29 Mar 2024 01:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SzaX/4y5" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 909524404; Fri, 29 Mar 2024 01:47:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711676834; cv=none; b=esh3zl54SiTwMcfh1tPQ2jyc/MteYNye/070C/oe7CV8rtihuhPzRmj+14UUJjyMGISc6vZ7d13B1dZThLueBE6M+hk1p6mHRGa+ZcC1IaJ4hKJokkrUd4uv3Qioh7CcIMU/zw8Auhr051Dq5PFiUNML1pDHVfKbHAXKerND4xg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711676834; c=relaxed/simple; bh=F/sT9vaXPLUPwUeBzt5/uud/lk3lyS5/k6aWahlMOCI=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TpHzGeyBFwyM48Vw4VbYe97BAIiWYfgzfOHG2Ca2tQ1VR+HpyGMh1Itgrey6QfVD7LGWoz+C+emS8+SzT9SYzPGz3szr1Vw07/mDzIPmvQTRCN5dpGbH2p3onckktrMyR48i8sjiXWoBm9i+aCL/We0GXd+NvhIfXbklh9AdzKg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=SzaX/4y5; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42T0Ym6D013197; Fri, 29 Mar 2024 01:47:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=Qm1gZFAKo7P2AmUjvUjLL //GeY28er1Yk8y2KajYbD0=; b=SzaX/4y5lVN6F8A1QkBk9qkCTVLzooZ42qcK9 9nE6o/OsWfkQ9QZ8+FHnyatHc3zDki8huP1CoViAI1ft8rs0Zi6a/NfjYKQJwKaa 5O1ubtePcZa3rMoQybLumcteycKQ7qhi7sqBpirMaBxdT1atblN6sGgVbD0uN4e9 EE72n/7AhRe/oQ3djjvxrnVjJ0hDyF4ZRyOu9nMgGxG+9wXelc80veKDnRSqRe2E wExJE/+LM1iyaadOg1PwhWvU5xFJFMW4VdkHiTy5/RIvgdxV8tMaxMXWelhwYN7r x3bF8Gk1Igod6n6b301Bw1bNaVjj76yaVM3Gi8mVpf7kPLmSA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x5fs88fqk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Mar 2024 01:47:02 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42T1l0VY007397 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Mar 2024 01:47:00 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 28 Mar 2024 18:47:00 -0700 Date: Thu, 28 Mar 2024 18:46:59 -0700 From: Bjorn Andersson To: Abhinav Kumar CC: Stephen Boyd , Bjorn Andersson , Johan Hovold , Kuogee Hsieh , , , , , , , , , , , , , , , , Subject: Re: [PATCH v1] drm/msm/dp: use dp_hpd_plug_handle() and dp_hpd_unplug_handle() directly Message-ID: <20240329014659.GA3478031@hu-bjorande-lv.qualcomm.com> References: <1711656246-3483-1-git-send-email-quic_khsieh@quicinc.com> <1711656246-3483-2-git-send-email-quic_khsieh@quicinc.com> <55debb0a-c7af-ef71-c49a-414c7ab4f59d@quicinc.com> <23de89e9-3ef3-c52d-7abf-93dc2dbb51a4@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <23de89e9-3ef3-c52d-7abf-93dc2dbb51a4@quicinc.com> X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Mvc90LBEJ9wz1w-GwCBhTGUkO7Uz7eFJ X-Proofpoint-ORIG-GUID: Mvc90LBEJ9wz1w-GwCBhTGUkO7Uz7eFJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-28_19,2024-03-28_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 phishscore=0 mlxlogscore=970 spamscore=0 suspectscore=0 mlxscore=0 adultscore=0 malwarescore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403210001 definitions=main-2403290012 On Thu, Mar 28, 2024 at 02:21:14PM -0700, Abhinav Kumar wrote: > > > On 3/28/2024 1:58 PM, Stephen Boyd wrote: > > Quoting Abhinav Kumar (2024-03-28 13:24:34) > > > + Johan and Bjorn for FYI > > > > > > On 3/28/2024 1:04 PM, Kuogee Hsieh wrote: > > > > For internal HPD case, hpd_event_thread is created to handle HPD > > > > interrupts generated by HPD block of DP controller. It converts > > > > HPD interrupts into events and executed them under hpd_event_thread > > > > context. For external HPD case, HPD events is delivered by way of > > > > dp_bridge_hpd_notify() under thread context. Since they are executed > > > > under thread context already, there is no reason to hand over those > > > > events to hpd_event_thread. Hence dp_hpd_plug_handle() and > > > > dp_hpd_unplug_hanlde() are called directly at dp_bridge_hpd_notify(). > > > > > > > > Signed-off-by: Kuogee Hsieh > > > > --- > > > > drivers/gpu/drm/msm/dp/dp_display.c | 5 +++-- > > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > > > > > Fixes: 542b37efc20e ("drm/msm/dp: Implement hpd_notify()") > > > > Is this a bug fix or an optimization? The commit text doesn't tell me. > > > > I would say both. > > optimization as it avoids the need to go through the hpd_event thread > processing. > > bug fix because once you go through the hpd event thread processing it > exposes and often breaks the already fragile hpd handling state machine > which can be avoided in this case. > It removes the main users of the thread, but there's still code paths which will post events on the thread. I think I like the direction this is taking, but does it really fix the whole problem, or just patch one case? PS. Please read go/upstream and switch to b4, to avoid some practical issues with the way you posted this patch. Thanks, Bjorn > > > > > > Looks right to me, > > > > > > Reviewed-by: Abhinav Kumar