From patchwork Mon Dec 5 17:44:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 29804 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2390252wrr; Mon, 5 Dec 2022 09:47:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OnJVC0YFkYn0oVM0FSKJskhl+HQcz35mCv1KCPlQ5I1gy8+ChsTJb1epFdbYoHPjj0DfD X-Received: by 2002:a17:906:c249:b0:7ad:9f03:fd44 with SMTP id bl9-20020a170906c24900b007ad9f03fd44mr55404346ejb.73.1670262450044; Mon, 05 Dec 2022 09:47:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670262450; cv=none; d=google.com; s=arc-20160816; b=TrEZXpzEcAUmXyVuBMmEyUwmympTX4JmQAzgzuiSKLkHpAsGbS8TqwyShWn2gibpd3 QnOqckCPNZJH5QCBTFL1+ZtIWIbxDQz+mFxcO0yjlcjIFDsejzlXmr6vNV6oUrltm5NQ 9Bs9uukYflu59D6A9cuhjAXBwi7zvRtbWXLMhouTfblAW6IQssQHEKwkyx+ZzZJ1dR3F 5X5U3U0mWkmXNQOrJfrjacgSQYP5VIJLugnIR7+RKaHduiU8zbVcCl60BCOSNk7Y13fq uSG30+awk35vSTqfHYE16jYnecpm7Lh4kki2gUOP569sK3MCZeI2yBtGJJgxszpQydhZ iwlw== 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=QBJ6OyS9FN0h+ETBBwHN8hXGZyWvIn2sICogPAEM720=; b=aHcahsM8YjbRZk5f6Qa9C9lVu5nsMekZJoxAfVLK5gGhjhoM4+JyuZpiAYSYCR7c7F Am4L5vCAoZwD14gYUapWfRw2oSmTaaA9KcWv4g2u9Y1Sl3GztXC5XsRd48bMVfrriJAz k0d3S7zkYhMurE7khxLhksQpr1rh/BsJ4SWBzbSofcSwtuingKx6SoDrL60ur3+DJTHc iri3t74OS/YvZIVgVDOH5Jo99fw4P6QAvieC/R3iN3EPLPa1Yjd2OQsSJz0YjhGgNGtw p/0H4TgQFhmm5OD3uzSVtPMBv4LqjxM8WcfC7b1a9weFFmhbIwxf6+HDdy8l7uB1gYHn Kgkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cpv3dKgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb8-20020a1709077e8800b007bd8ac3aebbsi12443797ejc.812.2022.12.05.09.47.06; Mon, 05 Dec 2022 09:47:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=cpv3dKgm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232490AbiLERpe (ORCPT + 99 others); Mon, 5 Dec 2022 12:45:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232357AbiLERpH (ORCPT ); Mon, 5 Dec 2022 12:45:07 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24E3B1FF9D; Mon, 5 Dec 2022 09:44:51 -0800 (PST) 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 2B5H40ZG014570; Mon, 5 Dec 2022 17:44:46 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=QBJ6OyS9FN0h+ETBBwHN8hXGZyWvIn2sICogPAEM720=; b=cpv3dKgmm691k96tW1v3MhxS1Y/CAW2Vl/9nXp2X+BrXVx2gEfdp+AxvnMf9GjRPsWYc BwYm1LvL8SUVY07ZXxS9H+KdAW4u/wcuqq7Rll8WL0JaujncKEaSaVTnqYtGsaxoKY7d ad5yNr981cy+n+hpxps2+APd5gtjlLONSPMWZx15SNWUIrFPApDJRZKkn66qdm7U+aVz Xg3w9OyiDTqZ/LBN5Aem48SiXFYAxaqX0AqHzKPNbuQ+2IhHrJeI0XLVtliA5iIE98b8 jRMy/IKYHd8Kjz5sKIH1g1fvly54tYB4WntQcrsFbnWvqsQJ4tRMvyKwyfLZemWT1Ei3 ow== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m7wsr4gmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Dec 2022 17:44:46 +0000 Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2B5HijNW006432 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 5 Dec 2022 17:44:45 GMT Received: from th-lint-050.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Mon, 5 Dec 2022 09:44:44 -0800 From: Bjorn Andersson To: Dmitry Baryshkov CC: Rob Clark , Abhinav Kumar , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Konrad Dybcio , Kalyan Thota , Jessica Zhang , "Kuogee Hsieh" , Johan Hovold , Sankeerth Billakanti , , , , , Subject: [PATCH v4 09/13] drm/msm/dp: Don't enable HPD interrupts for edp Date: Mon, 5 Dec 2022 09:44:29 -0800 Message-ID: <20221205174433.16847-10-quic_bjorande@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221205174433.16847-1-quic_bjorande@quicinc.com> References: <20221205174433.16847-1-quic_bjorande@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: wlgMVIqJsQHoulkcxZDc3cvMXRxNYWaX X-Proofpoint-GUID: wlgMVIqJsQHoulkcxZDc3cvMXRxNYWaX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-05_01,2022-12-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxlogscore=971 priorityscore=1501 suspectscore=0 malwarescore=0 mlxscore=0 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212050145 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751397118682235639?= X-GMAIL-MSGID: =?utf-8?q?1751397118682235639?= From: Bjorn Andersson Most instances where HPD interrupts are masked and unmasked are guareded by the presence of an EDP panel being connected, but not all. Extend this to cover the last few places, as HPD interrupt handling is not used for the EDP case. Signed-off-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson --- Changes since v3: - None drivers/gpu/drm/msm/dp/dp_display.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 17fcf8cd84cd..bb92c33beff8 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -610,8 +610,10 @@ static int dp_hpd_plug_handle(struct dp_display_private *dp, u32 data) } /* enable HDP irq_hpd/replug interrupt */ - dp_catalog_hpd_config_intr(dp->catalog, - DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, true); + if (!dp->dp_display.is_edp) + dp_catalog_hpd_config_intr(dp->catalog, + DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, + true); drm_dbg_dp(dp->drm_dev, "After, type=%d hpd_state=%d\n", dp->dp_display.connector_type, state); @@ -651,8 +653,10 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) dp->dp_display.connector_type, state); /* disable irq_hpd/replug interrupts */ - dp_catalog_hpd_config_intr(dp->catalog, - DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, false); + if (!dp->dp_display.is_edp) + dp_catalog_hpd_config_intr(dp->catalog, + DP_DP_IRQ_HPD_INT_MASK | DP_DP_HPD_REPLUG_INT_MASK, + false); /* unplugged, no more irq_hpd handle */ dp_del_event(dp, EV_IRQ_HPD_INT); @@ -678,7 +682,8 @@ static int dp_hpd_unplug_handle(struct dp_display_private *dp, u32 data) } /* disable HPD plug interrupts */ - dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, false); + if (!dp->dp_display.is_edp) + dp_catalog_hpd_config_intr(dp->catalog, DP_DP_HPD_PLUG_INT_MASK, false); /* * We don't need separate work for disconnect as