From patchwork Thu Nov 21 15:47:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3219621 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D12E8C045B for ; Thu, 21 Nov 2013 15:48:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 485F62078E for ; Thu, 21 Nov 2013 15:48:09 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B235120763 for ; Thu, 21 Nov 2013 15:48:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E12A1105AC9; Thu, 21 Nov 2013 07:48:00 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f175.google.com (mail-qc0-f175.google.com [209.85.216.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 59C6AFD7A0 for ; Thu, 21 Nov 2013 07:47:59 -0800 (PST) Received: by mail-qc0-f175.google.com with SMTP id x20so436790qcv.6 for ; Thu, 21 Nov 2013 07:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OTGFNcU7wmejrfVrQY/Xwr9o9vdcQGNduVu8rp+6IQQ=; b=c9SxUBeV+ggbXMtIFhZ2jCWmd954obF6zIR65fmHvmpZ7U1Vf+Bro65JgrklL18NMw 3PI8xCpJ/HdzduEm/1eEjcfaOLOZhUQ1/YG/nHAxkd40kmc4PyAnjQz36CctzyX9Bj20 lgcoa09vZW7iWvRMd/0PpAR5JHvtXl3Ce9PHIg6vkPU9Fbh92jO4mkuTl74yGgcyRVAb 3lB80GqWWtW+RDx9SJayi0olq7e5Y4WRDV6pYTFBDQA6PAXoSG0rE3RPxBAoMYnUoD3c 0t0O9OBDXpOimeegpCK9/bqoqG8SRxjU0chWyASP5Sdm2r/kBSpUjb+YzKGnrNS3hcyY f38w== X-Received: by 10.49.41.104 with SMTP id e8mr12378774qel.1.1385048878940; Thu, 21 Nov 2013 07:47:58 -0800 (PST) Received: from localhost.localdomain (177.204.119.127.dynamic.adsl.gvt.net.br. [177.204.119.127]) by mx.google.com with ESMTPSA id x10sm26518341qas.5.2013.11.21.07.47.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2013 07:47:58 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 21 Nov 2013 13:47:20 -0200 Message-Id: <1385048853-1579-7-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1385048853-1579-1-git-send-email-przanoni@gmail.com> References: <1385048853-1579-1-git-send-email-przanoni@gmail.com> Cc: Jani Nikula , Paulo Zanoni Subject: [Intel-gfx] [PATCH 06/19] drm/i915: do adapter power state notification at runtime PM X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Paulo Zanoni Now that we are actually setting the device to the D3 state, we should issue the notification. Jani originally wrote a similar patch for PC8, but then we discovered that we were not really changing the PCI D states when enabling/disabling PC8, so we had to postpone his patch. Cc: Jani Nikula Credits-to: Jani Nikula Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index d7ff095..b133836 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -914,6 +914,7 @@ static int i915_runtime_suspend(struct device *device) dev_priv->pm.suspended = true; + intel_opregion_notify_adapter(dev, PCI_D3cold); pci_save_state(pdev); pci_set_power_state(pdev, PCI_D3cold); @@ -932,6 +933,7 @@ static int i915_runtime_resume(struct device *device) pci_set_power_state(pdev, PCI_D0); pci_restore_state(pdev); + intel_opregion_notify_adapter(dev, PCI_D0); dev_priv->pm.suspended = false;