From patchwork Fri Dec 1 23:19:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuogee Hsieh X-Patchwork-Id: 172675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1474713vqy; Fri, 1 Dec 2023 15:20:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFqqxyEfVzkKHtZOhsUHmQKdVH37C6vwQW3SqNAUQ/IAMxS0ZRPpPwMRPv3r8rXKuA0JKN X-Received: by 2002:a05:6a00:1906:b0:6ce:2732:1dff with SMTP id y6-20020a056a00190600b006ce27321dffmr281578pfi.57.1701472842015; Fri, 01 Dec 2023 15:20:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701472842; cv=none; d=google.com; s=arc-20160816; b=MPOOrwFJNmNb0kLaN8mRmE1TAY4JvHe8IyS8mKWv9NfRuO3R7W2gbaG9QZk4+DCunw I7a6nFn4WOmIN//P/hLZEi8u+OZ7abC2rvHP9sKKwcNZC2/epEbGqAA0COkuf8/Tvyxp bxmkl9UPWzAZKuzX/Ww7LhubVpzmdQRSw1vV018JcbjoCSqv2gq4IdnQ6eIGfgzyC4nW FnP3od7f8ldOtDHAJZjvcyXs0sCOhrsTqkHpDQI7J2mDsNenhSzwTDp+ySWcWFTxgmgl Tchdx6OR/aoOCNacbXUsU4SOKvbxl5YChhbYeNgmAD3O2+mBvgr8sCLCTo7aorhIJnxf JmIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3zeh5R65RoEi6uPniKX/YoBeDqb1N7/IYh+LS+VqK0M=; fh=WdvorNt9W2LCUPiGPsn75/bW5381IkpXRxF82JgZV7c=; b=ODg+97a0IGtil9oi5HL35c9aDCFqwyH4nx0Rac7nCIigEwVMgtRm5OHnjOHSFT95nZ lSIquDjIppR8KtRJwSctiYUhfytLNdt5zRVieupT1pnhr86PcyLbfhQjilzFNzRuQr2y 6V4ncq3pudNwv2THR5YH8/4phHuyzCiwAvwT2DivsevNPGLPboEP0Y0Sqx98Ktljb+7R 6vUeFDGixAs5vDyK1h/9fc8mdRbUaqcpl0Vs4KK5Er075+mpb8GptQlq3UzsIIfv9vR6 4aIOIj2Xg1KLYOmDwI7Z0sx8gWyUUhwPhoDDsYJoUUxwPk7CrWuh/myNwHQOKQXJYHck LeAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=daUT3zIM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id k21-20020a056a00135500b006c21adbc1cbsi4138144pfu.59.2023.12.01.15.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 15:20:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=daUT3zIM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 8D4A7837E64D; Fri, 1 Dec 2023 15:20:37 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441905AbjLAXUV (ORCPT + 99 others); Fri, 1 Dec 2023 18:20:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441891AbjLAXUR (ORCPT ); Fri, 1 Dec 2023 18:20:17 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2421B1AD; Fri, 1 Dec 2023 15:20:23 -0800 (PST) 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 3B1LVgth028824; Fri, 1 Dec 2023 23:20:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=3zeh5R65RoEi6uPniKX/YoBeDqb1N7/IYh+LS+VqK0M=; b=daUT3zIMS429rMg2hSe5FY2Hj/OG1YlxFFtD7NZEvLMCBi/qVdB2WNeqhDOy2xmLEcRH YJHdiQVWXRlRX4a6K2bJPuDGaFHkiXbZm0A7pmldKzAoEIADkUSk39AszRwJDu7vsJYp 2G7iCrnYtn9dprtPMi342A1Ad2zUwjqJWft1cheogEyKhdf3UsysdNv0N79C709U/job YiYoA5AQae+p1eAKQ7poo/RqmhHrTbd9SLdIBoSfdkTZ01hFL3oFxuO/Y6TmXQ14jmzV yCqPNqUv0pvOqlZk/2fGHV/F9Ipdsj6VEappuzQI9t8XR1MQkzTjLrCfnGSvxRxyYbCS Sg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3upvm1vc94-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Dec 2023 23:20:07 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B1NK6e6030926 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 1 Dec 2023 23:20:06 GMT Received: from khsieh-linux1.qualcomm.com (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.1118.40; Fri, 1 Dec 2023 15:20:05 -0800 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v9 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Date: Fri, 1 Dec 2023 15:19:45 -0800 Message-ID: <1701472789-25951-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1701472789-25951-1-git-send-email-quic_khsieh@quicinc.com> References: <1701472789-25951-1-git-send-email-quic_khsieh@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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-ORIG-GUID: PjjAwGMi1dbCM6vtiggvP7zwWrnnHXXD X-Proofpoint-GUID: PjjAwGMi1dbCM6vtiggvP7zwWrnnHXXD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-01_22,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 impostorscore=0 phishscore=0 spamscore=0 malwarescore=0 bulkscore=0 adultscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312010143 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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 01 Dec 2023 15:20:37 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784123586912854761 X-GMAIL-MSGID: 1784123586912854761 Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge framework, to report HPD status changes to user space frame work. Replace it with drm_bridge_hpd_notify() since DP driver is part of drm bridge. Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 56f8d91..c2e3247 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -340,26 +340,10 @@ static const struct component_ops dp_display_comp_ops = { .unbind = dp_display_unbind, }; -static void dp_display_send_hpd_event(struct msm_dp *dp_display) -{ - struct dp_display_private *dp; - struct drm_connector *connector; - - dp = container_of(dp_display, struct dp_display_private, dp_display); - - connector = dp->dp_display.connector; - drm_helper_hpd_irq_event(connector->dev); -} - static int dp_display_send_hpd_notification(struct dp_display_private *dp, bool hpd) { - if ((hpd && dp->dp_display.link_ready) || - (!hpd && !dp->dp_display.link_ready)) { - drm_dbg_dp(dp->drm_dev, "HPD already %s\n", - (hpd ? "on" : "off")); - return 0; - } + struct drm_bridge *bridge = dp->dp_display.bridge; /* reset video pattern flag on disconnect */ if (!hpd) { @@ -373,7 +357,7 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp, drm_dbg_dp(dp->drm_dev, "type=%d hpd=%d\n", dp->dp_display.connector_type, hpd); - dp_display_send_hpd_event(&dp->dp_display); + drm_bridge_hpd_notify(bridge, dp->dp_display.link_ready); return 0; }