From patchwork Fri Mar 7 23:12:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3795521 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 578A79F1CD for ; Fri, 7 Mar 2014 23:13:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8BF6020304 for ; Fri, 7 Mar 2014 23:13:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id ADC65202EA for ; Fri, 7 Mar 2014 23:12:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6532FB697; Fri, 7 Mar 2014 15:12:56 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yk0-f175.google.com (mail-yk0-f175.google.com [209.85.160.175]) by gabe.freedesktop.org (Postfix) with ESMTP id 7BCADFB693 for ; Fri, 7 Mar 2014 15:12:54 -0800 (PST) Received: by mail-yk0-f175.google.com with SMTP id 131so12563494ykp.6 for ; Fri, 07 Mar 2014 15:12:54 -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=+GYinZVe9DFD8WOqRGd8kmpeJempOmys3zexh2Tplv8=; b=KXDQ6lMUgUnGpMMDiRsCZozH/wjN6u+lN1Qnkg9F3PUwJOceITSSh01PY6/+8UtZCB 3VGqc+irCoRV1aq5xPULVCvY43yS1SYX2WEtB4kFMXRLeQ4j3aupNNPCvYLoBDPf1yf8 xPxOSCEIjXy3xXH97n0XFklBEl6KKlI01JDtwn5eAqq62gVFFHu53Z1ABUBjjBx7WIZj GtKxrOb3hz5jOZcu4MHgd6MzHIQ7qj/VSft/iIhPCHI5KcHWVZ/KU/BmYw9QN6bbMRPu 3Ymz6FCITvl2uyZH1+p1h+Ws7ZuEJhn9yKn6l1lu/NsVj9fOeAIxsWNaFs/Mb79meznW IBhw== X-Received: by 10.236.121.194 with SMTP id r42mr26309317yhh.82.1394233974216; Fri, 07 Mar 2014 15:12:54 -0800 (PST) Received: from localhost.localdomain ([177.132.70.215]) by mx.google.com with ESMTPSA id t58sm32569759yho.20.2014.03.07.15.12.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Mar 2014 15:12:53 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 7 Mar 2014 20:12:37 -0300 Message-Id: <1394233957-3904-7-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394233957-3904-1-git-send-email-przanoni@gmail.com> References: <1394233957-3904-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 6/6] drm/i915: add BDW runtime PM support 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 This sould be enough. v2: BDW should also run hsw_runtime_resume (Ben). Signed-off-by: Paulo Zanoni Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/i915_drv.c | 8 ++++++-- drivers/gpu/drm/i915/i915_drv.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 55f0181..2dcbbc0 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -874,8 +874,10 @@ static int intel_runtime_suspend(struct device *device) if (IS_GEN6(dev)) snb_runtime_suspend(dev_priv); - else if (IS_HASWELL(dev)) + else if (IS_HASWELL(dev) || IS_BROADWELL(dev)) hsw_runtime_suspend(dev_priv); + else + WARN_ON(1); i915_gem_release_all_mmaps(dev_priv); @@ -910,8 +912,10 @@ static int intel_runtime_resume(struct device *device) if (IS_GEN6(dev)) snb_runtime_resume(dev_priv); - else if (IS_HASWELL(dev)) + else if (IS_HASWELL(dev) || IS_BROADWELL(dev)) hsw_runtime_resume(dev_priv); + else + WARN_ON(1); DRM_DEBUG_KMS("Device resumed\n"); return 0; diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 1debc412..2f7246a 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1997,7 +1997,8 @@ struct drm_i915_cmd_table { #define HAS_DDI(dev) (INTEL_INFO(dev)->has_ddi) #define HAS_FPGA_DBG_UNCLAIMED(dev) (INTEL_INFO(dev)->has_fpga_dbg) #define HAS_PSR(dev) (IS_HASWELL(dev) || IS_BROADWELL(dev)) -#define HAS_RUNTIME_PM(dev) (IS_GEN6(dev) || IS_HASWELL(dev)) +#define HAS_RUNTIME_PM(dev) (IS_GEN6(dev) || IS_HASWELL(dev) || \ + IS_BROADWELL(dev)) #define INTEL_PCH_DEVICE_ID_MASK 0xff00 #define INTEL_PCH_IBX_DEVICE_ID_TYPE 0x3b00