From patchwork Wed Oct 4 16:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuogee Hsieh X-Patchwork-Id: 148413 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp254757vqb; Wed, 4 Oct 2023 09:28:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDgl0Z/Yv9wW3bARyJ50NrMRMJyBJ4WrwqnW0UwU6uA2wqLw1wBLx9DcfUpzDQwliSgK7n X-Received: by 2002:a05:6a20:549a:b0:159:beec:79ba with SMTP id i26-20020a056a20549a00b00159beec79bamr3612209pzk.2.1696436890187; Wed, 04 Oct 2023 09:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696436890; cv=none; d=google.com; s=arc-20160816; b=WPXW8sRCJBfK0wgrbkpKjSaW9XZX7lP8m6pGou5x9s5wQtfvrR43Xn+Nw0i9+Pm5ox E/mnKHCbGaqq7QZ/vmWS9vBt4oxgUWMFWrHXICIeFxjY7+0SWCiuCIWqgPTHmXYU2dZ2 XQYN8V3Rv7oAYEtFn+C8zkLuC6MlOGlMq6fCmMyCYWI3lBr0vBqK3WSjmbAKAjCTaJap GP7wb87lXDEMQvw6//opOO0qqQa7nHmD3ngIS/OIXBrEHCJWsZY1cWWNJWg4xz4gFGxt a6vQ4BX4N+6dHKC/onLs/UE6J3J06923vu+7b2Oql1+r5FQmowbwYXTQfWkN/DUcnvrz AUgw== 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=ybXUQcbXZ7hlhkPfScdq7xQXG+8g88ZUUgRCOdSXjxOyf3wPQPOczyoDNpUIOSzZ4b hGXNZzCbdn4RRy4rMqFTnhWqqYOpLiiQiWM5kNSBUg7vrsW019ifTBegO5ctAHL/WUIQ YZc875Icb91q7x2sijQbD5pAsqgJnC1Qack/egZe5fJDqznKjvnDB744FOBh/uznCYUy feP+Twjkmf3Lrpdu7IAgOQHvKkACElgSkY/yZ5pHPrHyYSwReihOksP/cO2k1h3Kt7Mn o0PN1GY+Hq8eWb9Qj1wiOexM6q0rg20VsEkUbzXhfEqCg6AXF7j1KrQ2A62NTmURP7B8 7cow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kGlrapZ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j22-20020a170902759600b001baff05d890si3800193pll.313.2023.10.04.09.28.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:28:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kGlrapZ5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 210DC826FADD; Wed, 4 Oct 2023 09:28:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243398AbjJDQ1h (ORCPT + 19 others); Wed, 4 Oct 2023 12:27:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243313AbjJDQ1a (ORCPT ); Wed, 4 Oct 2023 12:27:30 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45780E4; Wed, 4 Oct 2023 09:27:25 -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 394FAY3x028686; Wed, 4 Oct 2023 16:27:17 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=kGlrapZ5JFnnCFTj8OlIhJQsX6SUmMYcyiW41qQM3t/3QztOF+lCOQmACsF14/b6kPVV SQ9j+NwzXXzk33jlX9yWe1uvSIvivhSaqEzc1NBTpM6h7TSTrq0NUQDkJE12lbUNZcyN GL9KvFPFK9IIZS9GH49yK0wjGhv2qMK8ObAxNnCDt/UrhCyaItXpauhZWglPlCtXLr9m 0f1HDHPgI6vLSkSETPO8Qo6M/tSsKIos8ZmbSSO3D4OtOttHtiRBNa4+Hy5E+ev9Uw2R 85ak6SXSb/H5nDIRuZwMQ6I8J+RsN+rR402PbGvJnZSszBZy7aQfkCi8Hmn5Nal3z/7o fQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3th18jhhht-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 04 Oct 2023 16:27:17 +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 394GRGcL011689 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Oct 2023 16:27:16 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; Wed, 4 Oct 2023 09:27:15 -0700 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v5 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Date: Wed, 4 Oct 2023 09:26:57 -0700 Message-ID: <1696436821-14261-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1696436821-14261-1-git-send-email-quic_khsieh@quicinc.com> References: <1696436821-14261-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: zUsbNilOj-q9vcxFE2r2V6m2OZwqFPw9 X-Proofpoint-ORIG-GUID: zUsbNilOj-q9vcxFE2r2V6m2OZwqFPw9 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-04_07,2023-10-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 bulkscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 adultscore=0 malwarescore=0 suspectscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310040117 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:28:01 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778843008538224680 X-GMAIL-MSGID: 1778843008538224680 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; }