From patchwork Fri Oct 6 21:38:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuogee Hsieh X-Patchwork-Id: 149412 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp608557vqo; Fri, 6 Oct 2023 14:39:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2udEnZYoU63chJX6G89OW8Yq9y5/Ya/nvj1cZ0brfV8xVcA2EWfgKV/itfImD5TxQ+3K7 X-Received: by 2002:a17:902:dac3:b0:1b8:c580:5fb9 with SMTP id q3-20020a170902dac300b001b8c5805fb9mr11489389plx.14.1696628361155; Fri, 06 Oct 2023 14:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696628361; cv=none; d=google.com; s=arc-20160816; b=w4CEKR3SvwwJ+oBNs3oqlWTF2WM2M3tMCFsSWyI3v9ns1s0+HRFAeRNaWVYtSz8bXS bZzrxzZC1hR9zPxr6j14BVZ2UGePVhP9bvXIKJlXBJajsnD02G0n4xArxGLi//gWtFAE AKExrAU2rW0ReHcKfSFOXLum+B918ivwHY8u4hmN4JDmNBoh5GGqZJVKa7ZeisH938Qs Vgc3N7qy97S7Jbw/51Sy1qweclYmC1nW0pR1eCmyEWVJ355KI4OSYmJUSmHBrmMmxIxa yzHtQgGdETgb3py8CSKbjR1GDmnKptlIz8tomDs3/NOP/dvbm0DurnOAegMLdaesEAeA p9EA== 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=Xwf2UlOdybu4eEqeBZIRirWSvj0NQ2DbC+7ra0yXIRHcEjM1z4ZQlddgzsbZ6UBe4I kYwxH3BmMXO6MNvlR8yDDGoGuewhuGQvy8ig0E2QwYQpZipGVIYTPTdxBUbdm3HOtGzg Ljg0DzwVjvfFY2jaGJ2EcDUQSAlrAnYzySC72kGaUzmgmsr1aw3IGkpC+TFcg4qclgif BKEMTQkdEDKt2y70RtLd/bAGv/A6Y6VPW3CNVkOVSb5ADVEFG8OiUUIv/oYpZ0opIu/a n2+WOFVFbVdN0o6+s+Yf8xJXtyF/VFdTFN0zkM22mzwTBTT5ocYMchoUola/jJOuMJaz 5+Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=im8BKtq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id h11-20020a170902f2cb00b001c2109a8576si4233559plc.652.2023.10.06.14.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:39:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=im8BKtq0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 3166680BE2C7; Fri, 6 Oct 2023 14:39:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233728AbjJFVjL (ORCPT + 18 others); Fri, 6 Oct 2023 17:39:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233703AbjJFVjF (ORCPT ); Fri, 6 Oct 2023 17:39:05 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F1B8101; Fri, 6 Oct 2023 14:39:03 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 396KQvZf019844; Fri, 6 Oct 2023 21:38:55 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=im8BKtq09em8A5UDmcWiKXfaEFy2EogaioQdUJB7RPLXRzjQp+0jIuytBYg+g83AMUoJ ho/0cGVpRXqblclBSaFi9GgN0IcYSPl8/OMuqCo9m0UL8t7Sh6dST97ul11E6667PfTD OIOeIpKxL9Uf2emLdeRz5+Dxb4W+RRw3cBdDw2b6m4DDULThw+N44YMYwSBPXd/0U+zt SeXxKjS/RTK7FWvx02pB/dBNps1wS4Mar+SbV1dlnsN/+jSfdu6MvWE5j1IZCygKSlGo 9n2QN5OFZi0Ysu2Q5+aVf04Vp8uTEEHhlukxXPT0X/OqrzLQT1VVG3KlMIWtZCbWxAu4 Kg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tjnddgnkf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Oct 2023 21:38:54 +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 396LcsrF026427 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Oct 2023 21:38:54 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 14:38:53 -0700 From: Kuogee Hsieh To: , , , , , , , , , , CC: Kuogee Hsieh , , , , , , , Subject: [PATCH v6 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Date: Fri, 6 Oct 2023 14:38:34 -0700 Message-ID: <1696628318-15095-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1696628318-15095-1-git-send-email-quic_khsieh@quicinc.com> References: <1696628318-15095-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: hFdIzI-IB3CXZR0rCH_H1RuKz0fyDscX X-Proofpoint-GUID: hFdIzI-IB3CXZR0rCH_H1RuKz0fyDscX 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 impostorscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 mlxscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 suspectscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310060166 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 06 Oct 2023 14:39:20 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779043779957461077 X-GMAIL-MSGID: 1779043779957461077 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; }