From patchwork Wed Nov 7 05:30:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Airlie X-Patchwork-Id: 1707961 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A80B8DFB7A for ; Wed, 7 Nov 2012 05:30:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750761Ab2KGFa6 (ORCPT ); Wed, 7 Nov 2012 00:30:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55936 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750747Ab2KGFa6 (ORCPT ); Wed, 7 Nov 2012 00:30:58 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA75UROY010363 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Nov 2012 00:30:44 -0500 Received: from prime.bne.redhat.com (dhcp-40-183.bne.redhat.com [10.64.40.183]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA75UDEM021468; Wed, 7 Nov 2012 00:30:17 -0500 From: Dave Airlie To: linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Dave Airlie , Huang Ying , Bjorn Helgaas , "Rafael J. Wysocki" Subject: [PATCH] pci/runtime-pm: respect devices autosuspend timeout on config access Date: Wed, 7 Nov 2012 15:30:09 +1000 Message-Id: <1352266209-29796-1-git-send-email-airlied@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org So I've been adding runtime pm to nouveau/radeon, and on X start it does a lot of pci accesses. Now because the pm on these devices is equivalent to D3cold, we have to resume them which involves a heavy latency due to POSTing the cards. The driver configures the autosuspend timeout to 5s for this reason, and I think the PCI layer config accesses should respect the autosuspend. Cc: Huang Ying Cc: Bjorn Helgaas Cc: Rafael J. Wysocki Signed-off-by: Dave Airlie --- drivers/pci/pci-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 02d107b..12d3d52 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -487,7 +487,7 @@ pci_config_pm_runtime_put(struct pci_dev *pdev) struct device *dev = &pdev->dev; struct device *parent = dev->parent; - pm_runtime_put(dev); + pm_runtime_put_autosuspend(dev); if (parent) pm_runtime_put_sync(parent); }