From patchwork Fri Sep 15 20:48:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuogee Hsieh X-Patchwork-Id: 140917 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1460394vqi; Fri, 15 Sep 2023 20:44:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8l8wN5/Oh1sZMVhAMOJWL8qEuJGQMQ20axDwoyiy0/cjPkBrBTmQ3f6LUDMjHfpVz177+ X-Received: by 2002:a05:6870:6386:b0:1bb:f801:411a with SMTP id t6-20020a056870638600b001bbf801411amr4786923oap.11.1694835889700; Fri, 15 Sep 2023 20:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694835889; cv=none; d=google.com; s=arc-20160816; b=wN+1t0IhVen8f3jInyUl8+XmCOyZgpoY+la6eIBRUQMi3X3BUie3JhLuVdrIVU6pKF X55gSIcV+OqGnP+icvkxTk/b4wDrst9aPP4L8mFQdsznN/gHvA/6qgKVuidULbDa6OFP 1s86re6xIPcxx/4hY8riwIu8ptN9RW/SHqh2Dhez+yW6F6wq8knW+wqg1PioktuxLR6W V/hKzNx0F29vctddPkrIiqm3h6dO83VbE86tfH+ogAS5HcyRllXcHd6Z9WNtGtXwfq1T hPMApBW5PtTqNiVKimLGdncb9awlIvgFA7UHg5z8JgN82G50tbT8tN6w6xGswBdbhLmu /q2Q== 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=Zy5mluxT6yrUoI+hSAeHWvE0fMAoRCVNMZk2k+w9SBE=; fh=WdvorNt9W2LCUPiGPsn75/bW5381IkpXRxF82JgZV7c=; b=mKk14OU0aQDvvH5VE+gT2pGFIf2xZrfGzNZTxosFXYP8hNnW4mItAGfZTFfziLzNhf ZrnpBBkNy6Su2NlPt0iHsibMS3i9hDpqPLggm0PKw9tv4zm28z2v7mC0x5kHAqpNLZoR H8R0REd7EqOGBSBYnzyP1UMGae34WAhpAE7XPDWyGPL5ULf+n8TqnZ5W6IPFexfpwmwi 7LErwXGJ7ZdpQCrCA41OYIZXffnumPKgdcpUYy22QSDpZZ1AVYG0r+wn0FsGzCvL/hZ/ a4Rs03WJDGy4dCqYFX6X1qT3hoFw30ql7HrNoFa5/jNNH2e/Q4x8b/aX+tc6Vt+ByEX/ bFXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CBMwz4PO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id dc3-20020a056a0035c300b0068be042fe24si4230444pfb.356.2023.09.15.20.44.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 20:44:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CBMwz4PO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 92FF984A3737; Fri, 15 Sep 2023 13:49:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237637AbjIOUte (ORCPT + 29 others); Fri, 15 Sep 2023 16:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237647AbjIOUtP (ORCPT ); Fri, 15 Sep 2023 16:49:15 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E1A2D62; Fri, 15 Sep 2023 13:48:39 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38FEV9c2011130; Fri, 15 Sep 2023 20:48:31 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=Zy5mluxT6yrUoI+hSAeHWvE0fMAoRCVNMZk2k+w9SBE=; b=CBMwz4PO/Lk66Zam9ydhMPbIy5fw9OWuzlJ1ujCWJpNqQXm/nOWDnp/dy5xpPEP8BsaC WU2hIn2+FN9o1KpZxhj6Ev0q4DJr55FvUMd/41L5k1rpRh4xSjpzkh8M36qPhKSyGs2i gAvTUj5wI3ikEpLkOux4c5IUjzxan7so+Fm6yBQUI+LjviSXJUmE8c+FKt9BRBBdphHx nfIzg6GesPHb95ZQemQq4Py4LxToY92MhLJhdCDOmjQBjMovaNcUiv51TT0qEe/A+uYt Z06AbHNQiTUd3ZN1doByqd1+0ViC/coMtp0M/0GePDd3QkuHVcbdr4ROThpGXYR+BVmY Kg== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t4g86t3sh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 20:48:31 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38FKmUWT016913 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 20:48:30 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, 15 Sep 2023 13:48:29 -0700 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v2 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Date: Fri, 15 Sep 2023 13:48:04 -0700 Message-ID: <1694810888-24461-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1694810888-24461-1-git-send-email-quic_khsieh@quicinc.com> References: <1694810888-24461-1-git-send-email-quic_khsieh@quicinc.com> MIME-Version: 1.0 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: shg_3opFbqDJsEng5DSgvMfMBxFRY7bR X-Proofpoint-ORIG-GUID: shg_3opFbqDJsEng5DSgvMfMBxFRY7bR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-15_17,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 bulkscore=0 impostorscore=0 adultscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150186 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Fri, 15 Sep 2023 13:49:59 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777164237538279538 X-GMAIL-MSGID: 1777164237538279538 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 --- 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 18d16c7..59f9d85 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; }