Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6140414rwp; Mon, 17 Jul 2023 15:59:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlFtzvHewVD6dZfdVTIAiKVDKxvNyJG1j+vbuRKoZDwTMWpUAHZZwFnd2DqFGPuinpStNtCL X-Received: by 2002:a17:906:73d1:b0:992:1005:928d with SMTP id n17-20020a17090673d100b009921005928dmr12240234ejl.8.1689634744050; Mon, 17 Jul 2023 15:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689634744; cv=none; d=google.com; s=arc-20160816; b=Bq+YmaMhqNn523pICLxMEcOqM/L2ow7T57Ms3wiRiZ6ki/Ri8mzJXS9Of1MwSTv61j ulv0wPQSvAT5M7XPYXdADyw7PT6vk+7RJLJuRr6M9mP+Me60e1iDyptAxACt1EtG5s7+ pqrN8EvSqYMe+9uF3d+iSMd8ve7fh+x8YyoMYNo/jzur5wXiII8Qhwv6DU0ar49xXALS DTxUZRAupfAJ0KJzIZmIAfmCFbGrRWp5k0p1u6sWvnlPBQ/85/4D6CRCKt87PrD1lK/b sH7L1gfFDs6o0pEevm0ydH6o7GirqAjZUVahPweUtox8EbyBs2FUhfc5mc9MLXxQmCi2 41VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6MJknHTOvGIsh1ufa2YfCm6oqXwZLuROTT92LY6WcEw=; fh=h9uDWxvIcLiy4ZZIBC2ar2ogmZn0BSqC89VpzePzOVY=; b=QcycNZeO4FqWOj/mpsSUa82rAd20ZYpzDQc/fzWz1AsVisBDR7OQ2onevbz13tT1S2 4sxzrmGqoa8TX+BRl2aWdr5JQInmOFDAJ+M1HRGfxwVb02jKzBXh+qTUwdyuZh0nsVCG UVAW1UJ/GRT2FWACaUx1xS/89rgulqUhz8YVqlHUG6iH1uobuTEY59Ls95i63v8+LzpT kGvqYbYwjWv5do9p1EOSGFNMfA/P+RfprYYczpKhK798kTmh0+WKEFzT2lKbm7ZG9yzp sSQbXvV4rcdPQrqUTtZ2NVIFIr0wmxmG63ysbhsXFxAMHfJQec7zGQGMP6v8TdVDdA07 ZXTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ax6+58UN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a170906840d00b009929280d0dfsi282078ejx.434.2023.07.17.15.58.40; Mon, 17 Jul 2023 15:59:04 -0700 (PDT) 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=ax6+58UN; 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 S230373AbjGQWfo (ORCPT + 99 others); Mon, 17 Jul 2023 18:35:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjGQWfm (ORCPT ); Mon, 17 Jul 2023 18:35:42 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B125BB5 for ; Mon, 17 Jul 2023 15:35:41 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36HMTpRn006684; Mon, 17 Jul 2023 22:35:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=6MJknHTOvGIsh1ufa2YfCm6oqXwZLuROTT92LY6WcEw=; b=ax6+58UNRefdDPJopPx3ITJkFhe4Yxnn9LbTtgPIuwSmHquSVR2ubHTkC3Lmk1pi/pe3 o/3bE13Hx5hIfQOzWVvE8EBUfaWQb1GdUJ6jaa5294l+NCIJQbasdFbIzagLkwVc8Uko rDhxeCLTAaDEHXuuXXaaGVMB/ncl3BAaURl2ghvoU+XD50m4HKyElJCL3E4rkYT7IedS p/LGazJkzPq63keLcD0gFwuCGNauFWw0QU9Z+rsY3AL45WkNt5bFPCKmMChsJ0SugIii UmajClEprayMvaludcWt5iZ5sISb8B0eg57FBHQbXDs07D6/QejWRwt96zhmrW4V8p4B yg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3run0avpnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jul 2023 22:35:30 +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 36HMZ9gw027973 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jul 2023 22:35:09 GMT Received: from abhinavk-linux.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.30; Mon, 17 Jul 2023 15:35:08 -0700 From: Abhinav Kumar To: , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter CC: Abhinav Kumar , , , , , , , Subject: [PATCH] drm: remove drm_bridge_hpd_disable() from drm_bridge_connector_destroy() Date: Mon, 17 Jul 2023 15:34:51 -0700 Message-ID: <20230717223451.16783-1-quic_abhinavk@quicinc.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: hApjDzxgwLNOgSFs745jCdxe3Dh76AKd X-Proofpoint-ORIG-GUID: hApjDzxgwLNOgSFs745jCdxe3Dh76AKd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-17_15,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 mlxlogscore=810 bulkscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307170205 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, T_SCC_BODY_TEXT_LINE 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 drm_bridge_hpd_enable()/drm_bridge_hpd_disable() callbacks call into the respective driver's hpd_enable()/hpd_disable() ops. These ops control the HPD enable/disable logic which in some cases like MSM can be a dedicate hardware block to control the HPD. During probe_defer cases, a connector can be initialized and then later destroyed till the probe is retried. During connector destroy in these cases, the hpd_disable() callback gets called without a corresponding hpd_enable() leading to an unbalanced state potentially causing even a crash. This can be avoided by the respective drivers maintaining their own state logic to ensure that a hpd_disable() without a corresponding hpd_enable() just returns without doing anything. However, to have a generic fix it would be better to avoid the hpd_disable() callback from the connector destroy path and let the hpd_enable() / hpd_disable() balance be maintained by the corresponding drm_bridge_connector_enable_hpd() / drm_bridge_connector_disable_hpd() APIs. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/drm_bridge_connector.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index 19ae4a177ac3..3d4e25c2f3d7 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -187,12 +187,6 @@ static void drm_bridge_connector_destroy(struct drm_connector *connector) struct drm_bridge_connector *bridge_connector = to_drm_bridge_connector(connector); - if (bridge_connector->bridge_hpd) { - struct drm_bridge *hpd = bridge_connector->bridge_hpd; - - drm_bridge_hpd_disable(hpd); - } - drm_connector_unregister(connector); drm_connector_cleanup(connector); -- 2.40.1