Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp272105rdb; Mon, 18 Sep 2023 14:52:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEI0GWC8WlMotnetDn3P8dLEMXx9BkJ4jUmpjWVJqgl4w1pcqHFL6WT3NXDHIZxzSDuLGO X-Received: by 2002:a17:90a:1189:b0:274:2523:fc7f with SMTP id e9-20020a17090a118900b002742523fc7fmr8123546pja.47.1695073924827; Mon, 18 Sep 2023 14:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695073924; cv=none; d=google.com; s=arc-20160816; b=UoyogWoEcV1x6i+BB7kke2w8jlgco5u7tWU0dJQO0u9k4Qsud9gyu2tg+JE93i/Pqi 5DhNBA3p7T8IewV+h4/R0g59M7Y3F4Faw2RIfvWqbGcbUaeKICIezGhqIL/QgheOhWFL lvOzXJ1iM6UF2HXTGuULKVdA/Et2UeD0wV1qchMiNpnQhn1aqw4FC7iK6eu7XJOBprvT Gm9AHuUsVmsHRKwxoR84aA9rKsigham5Ociu00R9UfSWHw/Oi+YflatnhjGWeBWQvp6h 2sHE3Y2ldkTBCzMlpl4DOArmyLw3sM4QC3ZfGoHqilhGDyYbt389jsePAkTEs5JvTssW IjHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=m9ycPkoqh3F+kHpg0TZyKjSV6+fgyQLXKdhx826xOxg=; fh=sqsfmfyJwUJv6m2jYDJZFZGhueTiUiMY+SatAtIaJFA=; b=Z6W2vamDZ4HOXBpJBKnQX8dmNvACQ0lawzN72hCmkSEaPqdaTDt6uzua+wq05RTWAj Ebpnrp1EH6rwZDvy5W4mbv4n6xoemFzCycQB2F5ISza33TR0d1pjq8s1Qlxr5AcXdZqn 7cPqC4RPjIVrMHmTZ8chofTo56Pg1Rdxspa1PWGVGzLRZG0K14gVyfw9/lvDAFd0P1Qa EIDPiQc7A7roheFkpUABdlBV6bIrnTBXPEUKnzLhgLu/6QVEGGqLJqWIfn5++NAa1MLZ TPGAEbNLtarkJoq432alJwVjt6L1yjsMu/ByceMvQI+V4Bn5MMW6VZ3oqiWS908OXfaL aEqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XR8jDin4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id oj17-20020a17090b4d9100b00274d9ad80dbsi3945799pjb.121.2023.09.18.14.52.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 14:52:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=XR8jDin4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 6F16A8081BD2; Mon, 18 Sep 2023 13:16:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229790AbjIRUQq (ORCPT + 99 others); Mon, 18 Sep 2023 16:16:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjIRUQp (ORCPT ); Mon, 18 Sep 2023 16:16:45 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A29648F; Mon, 18 Sep 2023 13:16:39 -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 38IJdVsM020599; Mon, 18 Sep 2023 20:16:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=m9ycPkoqh3F+kHpg0TZyKjSV6+fgyQLXKdhx826xOxg=; b=XR8jDin4k0rlT0vPG5CAMyTFoXHpVaNaLqJL0mQmbjuxN9ZVgSzyzv2FGeF0G5cUzkdz BJ0B8TA6Dt3VvAFle3EtYBRNyC0KvM/e02mseHK4vra1DVaC6Zup75Jdg6YkmIOT/C4j P7/R0xnToi/QJPaLe9bMstfJ3Oqz1WcDRgK51O+o3W1wFFLlnuZlk0U6UOIHmfTq+ZLo DEuNAHtsGKiOahuAlrLgVH3E5fSy+Qh5NWNrDppnPOJMQrfR+lumJ8cu5xkqevX9xSlB xaWP8O8I65JBK4nGLoMd9AVLMTWc24kADcDQ50gqRagnhxUX4FlPbRBaMsSwlUfco56X RQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t6qf6gx82-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Sep 2023 20:16:18 +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 38IKGHm9024910 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Sep 2023 20:16:17 GMT Received: from [10.71.109.209] (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; Mon, 18 Sep 2023 13:16:16 -0700 Message-ID: Date: Mon, 18 Sep 2023 13:16:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Content-Language: en-US To: Dmitry Baryshkov CC: , , , , , , , , , , , , , , , , References: <1694813901-26952-1-git-send-email-quic_khsieh@quicinc.com> <1694813901-26952-4-git-send-email-quic_khsieh@quicinc.com> From: Kuogee Hsieh In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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: FSoKitydHwGDgxHFMPdmw9NlfXjdQMtr X-Proofpoint-ORIG-GUID: FSoKitydHwGDgxHFMPdmw9NlfXjdQMtr 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-18_09,2023-09-18_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 suspectscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309180177 X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 18 Sep 2023 13:16:50 -0700 (PDT) On 9/15/2023 5:41 PM, Dmitry Baryshkov wrote: > On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh 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 > Reviewed-by: Dmitry Baryshkov > > 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 >> >