Message ID | 1694813901-26952-4-git-send-email-quic_khsieh@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp1518827vqi; Sat, 16 Sep 2023 00:02:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5nNYnABIDB2DiQyAewS9Kq0O5s9qrw1dBoU7/VechMLi4w40+NZaOsoVC5UlYgqAB0Fav X-Received: by 2002:a17:90a:fc89:b0:263:ac11:c6d2 with SMTP id ci9-20020a17090afc8900b00263ac11c6d2mr3322164pjb.25.1694847727469; Sat, 16 Sep 2023 00:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694847727; cv=none; d=google.com; s=arc-20160816; b=1CQKeawZebKLyPJGmpIg/n7jNl6McivL8sZw6pUfA+Ry2zEr4iE2y019JM2m+ChROI P5hOAnHpB4h6p/IMB1hFGOp9qBBwhyZgNba3nny4Pf40+MQoKNgLEyT9yuTGBgLEuDu1 yAPx+gc+n1uTHvfyMpx4jfAlsdUymqjp8GVWpIBbEMRWelgY7CCGghlxy/PG/3Acsh1o Dkampxg7mCkcm99Twoa0l5nqajyzDIYuWOwPQNZRMXumSRkIemdnv+K9RR5RvEIiBs47 LJmpC+pS72wiiclih9wT7P+Ky4NgkT6gYTB1ux0ickM9DOXWynEWgqcsAJolaFmqyayB X3Lw== 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=tvqJlZPnIQvi3eRqwLSsS7DRdpSpQGJ5BgilDqKDByiUPQeLoZHyZ3U3Vv0ln9Tup0 qmOwxQ7w5uqv+HyVZK1ylqpeg6lm41fJL243p6fwa6RIh6LuZkvmbPRcwV1if57gmsLQ dzycU8U8UkgMp0APGrXRttBm+HWJ7fkf9AwPX5z8154DMyBF2MzGU1ehQPjWm0K0+1RV K8xckmgomnrApSEfiyoHIfHywPQcsj/7TnyvvVIpAyznMmrIaOxfnidKl0g04bbCYv6v zoYuVZToNl780fzWrt47Va9WH8WhGmjKkasOmVbH1dUjtOEvHcJDnElpwaMno4QLAIyg Ddpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BQTV62v0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id q12-20020a17090a2e0c00b002736ff3cc79si6492991pjd.23.2023.09.16.00.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 00:02:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BQTV62v0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 1D76E858B033; Fri, 15 Sep 2023 14:39:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237893AbjIOVj3 (ORCPT <rfc822;realc9580@gmail.com> + 29 others); Fri, 15 Sep 2023 17:39:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237854AbjIOVjG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 15 Sep 2023 17:39:06 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1079B8; Fri, 15 Sep 2023 14:39:01 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38FKfqP7029458; Fri, 15 Sep 2023 21:38:42 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=BQTV62v0c0P98vjO0n9W/BRYJJ2AgzwsRMvmINaXtndW2zz3KDHsWBBpb2tOb5eFpVak OofxaEgZmeCeLIAmxpgbFJuqPUlOj0La/KV3Iab3DyC/A4UK33XL/xl3HUF+JIZXPcqf 6chKgfe6nUMLojI9dtGFV0f+UqtKOMgGxSa5RmiIIgGaCYLKUUbpRajh/Deub9zbq6mu 9AaphvwcdMNW1IUtxyYIKiAhk20s9jvo7KLXM80F376EC2vBSLxN8OD5ZJEA2qNnAHfn PkVIpLoVVkfTwpfEspKMKmSQ13zrcRzV1Zyw/qSb7kgNs/dtn04d+dGPdh+25hpqaTvP gw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t4g2xjaj1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 21:38:42 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38FLcf7a014512 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 15 Sep 2023 21:38:41 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 14:38:40 -0700 From: Kuogee Hsieh <quic_khsieh@quicinc.com> To: <dri-devel@lists.freedesktop.org>, <robdclark@gmail.com>, <sean@poorly.run>, <swboyd@chromium.org>, <dianders@chromium.org>, <vkoul@kernel.org>, <daniel@ffwll.ch>, <airlied@gmail.com>, <agross@kernel.org>, <dmitry.baryshkov@linaro.org>, <andersson@kernel.org> CC: Kuogee Hsieh <quic_khsieh@quicinc.com>, <quic_abhinavk@quicinc.com>, <quic_jesszhan@quicinc.com>, <quic_sbillaka@quicinc.com>, <marijn.suijten@somainline.org>, <freedreno@lists.freedesktop.org>, <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v3 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Date: Fri, 15 Sep 2023 14:38:17 -0700 Message-ID: <1694813901-26952-4-git-send-email-quic_khsieh@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1694813901-26952-1-git-send-email-quic_khsieh@quicinc.com> References: <1694813901-26952-1-git-send-email-quic_khsieh@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain 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: VaSfYQWbPA2u2XRybkyE310bkCr842Do X-Proofpoint-ORIG-GUID: VaSfYQWbPA2u2XRybkyE310bkCr842Do 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_18,2023-09-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 phishscore=0 impostorscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309150194 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 14:39:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777158500744331459 X-GMAIL-MSGID: 1777176650514197700 |
Series |
incorporate pm runtime framework and eDP clean up
|
|
Commit Message
Kuogee Hsieh
Sept. 15, 2023, 9:38 p.m. UTC
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 <quic_khsieh@quicinc.com>
---
drivers/gpu/drm/msm/dp/dp_display.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
Comments
On 9/15/2023 5:41 PM, Dmitry Baryshkov wrote: > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote: >> 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 <quic_khsieh@quicinc.com> > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Also see the comment below. > >> --- >> 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) > Note, this part (resetting the video_test and setting of is_connected) > should be moved to the dp_bridge_hpd_notify() too. Please ignore this > comment if this is handled later in the series. I think keep them here is better since eDP does not populate hpd_enable, hpd_disable and hpd_notify at edp_bridge_ops at drm_bridge_attach(). Keep them here will work for both eDP and DP. > > >> @@ -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; >> } >> -- >> 2.7.4 >> >
On Mon, 18 Sept 2023 at 23:16, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote: > > > On 9/15/2023 5:41 PM, Dmitry Baryshkov wrote: > > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote: > >> 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 <quic_khsieh@quicinc.com> > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > > > Also see the comment below. > > > >> --- > >> 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) > > Note, this part (resetting the video_test and setting of is_connected) > > should be moved to the dp_bridge_hpd_notify() too. Please ignore this > > comment if this is handled later in the series. > > I think keep them here is better since eDP does not populate hpd_enable, > hpd_disable and hpd_notify at edp_bridge_ops at drm_bridge_attach(). > > Keep them here will work for both eDP and DP. Having them here doesn't work for DP-with-external-bridges, which will not use dp_display_send_hpd_notification. > > > > > > > >> @@ -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; > >> } > >> -- > >> 2.7.4 > >> > >
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; }