From patchwork Wed Nov 23 16:18:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Manna, Animesh" X-Patchwork-Id: 9443703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C59236075F for ; Wed, 23 Nov 2016 16:06:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C87D327B2F for ; Wed, 23 Nov 2016 16:06:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD6E527BFC; Wed, 23 Nov 2016 16:06:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F1D5227BE5 for ; Wed, 23 Nov 2016 16:06:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1421D6E8FD; Wed, 23 Nov 2016 16:05:58 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id AFED56E8E5 for ; Wed, 23 Nov 2016 16:05:47 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 23 Nov 2016 08:05:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,538,1473145200"; d="scan'208";a="194936152" Received: from dispdev.iind.intel.com ([10.223.25.80]) by fmsmga004.fm.intel.com with ESMTP; 23 Nov 2016 08:05:23 -0800 From: Animesh Manna To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Nov 2016 21:48:26 +0530 Message-Id: <1479917907-2468-5-git-send-email-animesh.manna@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479917907-2468-1-git-send-email-animesh.manna@intel.com> References: <1479917907-2468-1-git-send-email-animesh.manna@intel.com> Subject: [Intel-gfx] [PATCH 4/5] drm/i915/bxt: Block D3 during suspend. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP For BXT, display engine can not generate interrupt when in D3. On the othen hand S0ix can be achieved without display in D3. So, Display should not put into D3 for HPD to work and will not have any power impact. v1: Initial version as RFC. v2: Based on review comment from David, condition check for hpd_wakeup_enabled is removed before calling pci_restore_state. Signed-off-by: Animesh Manna --- drivers/gpu/drm/i915/i915_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 4f0e56d..bc48642 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -2381,6 +2381,9 @@ static int intel_runtime_suspend(struct device *kdev) if (!IS_VALLEYVIEW(dev_priv) || !IS_CHERRYVIEW(dev_priv)) intel_hpd_poll_init(dev_priv); + if (dev_priv->vbt.hpd_wakeup_enabled) + pci_save_state(pdev); + DRM_DEBUG_KMS("Device suspended\n"); return 0; } @@ -2397,6 +2400,8 @@ static int intel_runtime_resume(struct device *kdev) DRM_DEBUG_KMS("Resuming device\n"); + pci_restore_state(pdev); + WARN_ON_ONCE(atomic_read(&dev_priv->pm.wakeref_count)); disable_rpm_wakeref_asserts(dev_priv);