From patchwork Mon Feb 19 13:21:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna chaitanya chundru X-Patchwork-Id: 203073 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1279376dyc; Mon, 19 Feb 2024 05:21:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWNnBSMaiILunfLCE05EjBaPExJsRD/sVGzxXAW1qEY/vBDjURluaEAy0uZnA88JAxtjvcLYfqW7M+2l8Q2X7UDI/v/7A== X-Google-Smtp-Source: AGHT+IFfBLg1PaQughSv5QXXi2S3Roz61iaIcOBNUmDYroAOUtdZEtsLqCxgYfCeEE8SWBPtKJJH X-Received: by 2002:a17:906:f2d1:b0:a3e:9ce3:1bd with SMTP id gz17-20020a170906f2d100b00a3e9ce301bdmr1452489ejb.16.1708348918514; Mon, 19 Feb 2024 05:21:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708348918; cv=pass; d=google.com; s=arc-20160816; b=b13t78SVLGaAoFr9tzwzDamfMzXbS5Jx7P80SaHOIQWe2jXsGv+3uagVMu/irRVkw+ Xcu0p0RgD6D6IOD9cJYNLwtLWnE6OnUaG0XGSVegDZr6+5xMolgh8ShRriYQ3B7nsM23 mMAzatKg8d4c7Mv8MSOUXFPDnaN3ZMHFr1VKXXPjoT0ku0pbXezLm9arHlrK5N5Sz3Jc vQskj+0ZsQ1FUGShk4cW+7eTFHbu6LSjTwnckFxlQv8LAQsQwSzodootEUUjw2xRxaxc /wRGdEAnV1jpf3Rl3aKvXzQzFC9qMrsCUGRtxyxa9R6DZ9TgT7ebQOz0uADUJAvRk7h/ ek3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=F7iD/VqgEIiLKlYBQdbtCp2S7O7L8FqKjuOYcPetuLs=; fh=Y45W6gNqcLJQ20Kkv5RbmoHaySKcJQw1vc3n52ecCq0=; b=dq/C8dUNmxfPpkcZya3DfXCJwRL0Lnp5xu+Mber2ojlGqGvwexpGPvVqKucrXkJmMq fepo+gWgBjcY9PS6cA18klYr6t5AtAd7Kl1qqIZMuiMZq4cyM+9hWzGmMNhrF6VtJltG r1asbKjuCBUSadYWbr/58XvXUENIITWMTPWcLA1XKuzgl3r7X0r6ioJh8YZwzk2EVdLe ybnfcPkz1DZaM6eE6zhZcoPRhuqj9eT4/I7rSQ0hLjWJd5NP9IyheMaG8I7N/zcdXp37 q1hCWbfpA3s4pUbIJOJIbQuW7lUEvx04XGEqoI8CED9fpUxvkHilugIY/CnXj04+Acum VUVA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=B5QVJHKv; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-71397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71397-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id go18-20020a1709070d9200b00a3ecefe72besi303152ejc.250.2024.02.19.05.21.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:21:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=B5QVJHKv; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-71397-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71397-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1885E1F2269F for ; Mon, 19 Feb 2024 13:21:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6688F364B1; Mon, 19 Feb 2024 13:21:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="B5QVJHKv" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37BFF2E834; Mon, 19 Feb 2024 13:21:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708348900; cv=none; b=Lzbd3c9OHoyROggHBBH/aBSm71o4Z6QB01snM+rjWsktQZ3tpfWYIz37Up2kTNIjrDeuREe7FSdhN43BiJjpFZHwoh9/Cmxl7A5ug5jSvDkWQAl55MtddjG8Tpv5z8JSItFcHFYycsPkqb6L7HZ7iC4SaIvYSr7t98IW1ZF29s0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708348900; c=relaxed/simple; bh=lC+Va8VKJJRnjPL1NP5hZ/mWgsIad/xDcJU8KKEla+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=JFFpnWpwyhOYvMcBpiBFf+VQw/ZnZBxw+G15eQY1RTWWMwYJ+O07A0Tfn+u/iTuI/4CLu2kTLkWfEigIj0IwI+4dGITBjSFqOXhvYoAD1w1mJrQRuossB4n021itcTI2jbsRzLVJqqsK+ofqxAv9DL8HNPqgKU/4rVmaDuYQa60= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=B5QVJHKv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41JCiNFU018209; Mon, 19 Feb 2024 13:21:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:to:cc; s=qcppdkim1; bh=F7i D/VqgEIiLKlYBQdbtCp2S7O7L8FqKjuOYcPetuLs=; b=B5QVJHKv8YU0U2gA/Dr Ek18Kx8ENx8SUHM8/c3QrlzhXlWF2baE5BpvaDCQwOGaKSUz31EFTaY5SUb9cb2V ALNkGi1BWXNNyy+cDdJYKjXCElDRNKJ0tQ4HJYm5frBBtyfa/5BXByIOtn5A+pVn pCYjQEhnrxPD0MswXlRQf+R9+wHtB/xloHz35IfNLQzLWgfZhhEatGUx3odu1316 xWbgYh9enM/VXhPHF7ZPurgf7xEU5kw/3ps23fK0P3GUtdbtjoOSeXGjmL+jOPVh dzNxZTEsNh/XTH3T9Wrkxs7MPFS/n2bLaCx7LEiSmGZW7gbRNd0WXLZDx0MosMM/ muQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wc78qr24j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 13:21:28 +0000 (GMT) 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 41JDLRWW015729 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Feb 2024 13:21:27 GMT Received: from hu-krichai-hyd.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.40; Mon, 19 Feb 2024 05:21:23 -0800 From: Krishna chaitanya chundru Date: Mon, 19 Feb 2024 18:51:10 +0530 Subject: [PATCH] PCI: dwc: Enable runtime pm of the host bridge Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240219-runtime_pm_enable-v1-1-d39660310504@quicinc.com> X-B4-Tracking: v=1; b=H4sIAMZV02UC/x3MQQqAIBBA0avIrBNUiqirRITmVANpohWBdPek5 Vv8nyFhJEzQswwRb0p0+AJZMZg37VfkZItBCVULJTseL3+Swym4Cb02O3JjZ9l2sja2EVC6EHG h538O4/t+PxSkQWMAAAA= To: Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas CC: , , , , , , , Krishna chaitanya chundru X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708348882; l=1466; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=lC+Va8VKJJRnjPL1NP5hZ/mWgsIad/xDcJU8KKEla+E=; b=uItbQ0PRyWCOqJ4GM6tXMhioNvyuGlpf0qLZwqb0FVXGXoQYKMkFJHVBAc37WwDCbpYKHRX7x UJ461EQdg1YDr+nAnerFDyH+ncy8TJhTaA+qCHcnls78GuO+vvzG6FQ X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= 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: rIGyQEr32HOD5ThTKYpcNVhD5kBNqavq X-Proofpoint-ORIG-GUID: rIGyQEr32HOD5ThTKYpcNVhD5kBNqavq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-19_09,2024-02-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 adultscore=0 spamscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=785 phishscore=0 malwarescore=0 suspectscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402190099 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791333675786276259 X-GMAIL-MSGID: 1791333675786276259 Currently controller driver goes to runtime suspend irrespective of the child(pci-pci bridge & endpoint driver) runtime state. This is because the runtime pm is not being enabled for the host bridge dev which maintains parent child relationship. So enable pm runtime for the host bridge, so that controller driver goes to suspend only when all child devices goes to runtime suspend. Signed-off-by: Krishna chaitanya chundru --- drivers/pci/controller/dwc/pcie-designware-host.c | 4 ++++ 1 file changed, 4 insertions(+) --- base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d change-id: 20240219-runtime_pm_enable-bdc17914bd50 Best regards, diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index d5fc31f8345f..57756a73df30 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "../../pci.h" #include "pcie-designware.h" @@ -505,6 +506,9 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) if (pp->ops->post_init) pp->ops->post_init(pp); + pm_runtime_set_active(&bridge->dev); + pm_runtime_enable(&bridge->dev); + return 0; err_stop_link: