From patchwork Fri Oct 6 22:55:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuogee Hsieh X-Patchwork-Id: 149461 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp639145vqo; Fri, 6 Oct 2023 15:56:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExRzlzrTmUXx5NhlOX4/NGtlw4DQBaZ856Ppv0UdgsuNUAZ7wTzfghWaSLuEi1tb+RbZ3L X-Received: by 2002:a05:6830:22d2:b0:6c4:c607:7346 with SMTP id q18-20020a05683022d200b006c4c6077346mr10062968otc.23.1696633017709; Fri, 06 Oct 2023 15:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696633017; cv=none; d=google.com; s=arc-20160816; b=XFA9zSbjGIBiZcfzC+qX87HICNd9/HMzSwqlqEeay4gZGK2DCQJTQYXcl+9ZCilGcd Ncvmrd9v8dtI5s8nkh074xyajZjZ3aRsqw7kEXTupHlXE24L5TAdggXflkzrzyKxyPh2 yvTEBla6XPWy/WNt5MgGhfAa2kWDgwmbRHzzvukk8CQDaJK1S87OAHWN/Dj2V3jE+Ahl EtzvSW19W0QbAtcX3zqGlFMgHuBeU4/P82rHxJLlETYdoAljJ4K3VL4GdwaYcqRwPGpK YSTZLSFA+0X3fltZNLU4lHfsvtVS+4szOVLrWiyUEWCxV03xMgJAKQy6jI/FnrvDAOar hzMA== 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=NX9udI4OjYVPmeSaybqsrXzGO0Y4SgBxWQnof8yCP2Q=; fh=WdvorNt9W2LCUPiGPsn75/bW5381IkpXRxF82JgZV7c=; b=sBKyFHILweVPR1PQhLD1kYXd52mj0xyfr6yIwkuj89awAhN6JrJOsZueeMc2VarnWc JP5fcN5O/bvy4VlbVakts+gSqUV+yuPw6vPL/kPC51dMlRwu8ncSHG8kdTLqkSFh7RjA pFR0q7VI8xOoxW/sa5qBJFHnwWvj3a4dxjOkJlybzJ9bPf2aN72ZcUMEOToGIaYu1pe2 Ir3qf+DuanSJcYMyhxyTYOog2Sa1O2+O22nlbdO3WiK9wP6uGPyXzQ7qksO+3bz6IQ5T CPSAxqsJkmGP7OLeOYph+6YqII50WxZrYIqTisNv5zdnouRPT5nDWPS/h1c7icAoBUn6 ebbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=HGGLaXZk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id 9-20020a630f49000000b0057744d09d2fsi4702073pgp.18.2023.10.06.15.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 15:56:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=HGGLaXZk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 198F28115455; Fri, 6 Oct 2023 15:56:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233932AbjJFW4C (ORCPT + 18 others); Fri, 6 Oct 2023 18:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233769AbjJFWz6 (ORCPT ); Fri, 6 Oct 2023 18:55:58 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27A43102; Fri, 6 Oct 2023 15:55:51 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 396MhDAv029357; Fri, 6 Oct 2023 22:55:26 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=NX9udI4OjYVPmeSaybqsrXzGO0Y4SgBxWQnof8yCP2Q=; b=HGGLaXZkZP3ss3u+OGedskvFdHXHxYdV8NmxnwBdJpknL06E4WiBs3OBsg0yUHbdaJWY YPXFQX5TjNkfd9GlqGhz4/DuoICQFaNE9XGPlkZcns6fdGyL0LGJmfc/ekl3k0eIo1NS ry4a8E83K69nuye6a8/rze4s+iQXmeF+bNdhs56HodBHIOnlWRACjZdt/vgN8z6dF1OY Xhlfk52B+xii0TuNDAoz9Q11jM7Mp2zVXbuH1QRQq+t1Fih+BtfRsjhgiJVC9iOdmNwo vdbrk99ZUggbzN9ir/YJ7VigI+vBwCATS6QGfNdW7ri5rXTT5pTV9xZFYzPvTMrERKVT 3A== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tjf5m9twj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 22:55:26 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 396MtPGd015696 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Oct 2023 22:55:25 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.36; Fri, 6 Oct 2023 15:55:24 -0700 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v7 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Date: Fri, 6 Oct 2023 15:55:06 -0700 Message-ID: <1696632910-21942-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1696632910-21942-1-git-send-email-quic_khsieh@quicinc.com> References: <1696632910-21942-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-GUID: yRs-ER4QoD3PgTBE2QXye3QrWThbI3Dq X-Proofpoint-ORIG-GUID: yRs-ER4QoD3PgTBE2QXye3QrWThbI3Dq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-06_15,2023-10-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 priorityscore=1501 impostorscore=0 adultscore=0 malwarescore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310060177 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 15:56:34 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779048662880259030 X-GMAIL-MSGID: 1779048662880259030 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 9e51876..32663ea 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -356,26 +356,10 @@ static bool dp_display_is_sink_count_zero(struct dp_display_private *dp) (dp->link->sink_count == 0); } -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) @@ -385,7 +369,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; }