From patchwork Fri Sep 9 12:51:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sagar.a.kamble@intel.com X-Patchwork-Id: 9323305 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 93FC060752 for ; Fri, 9 Sep 2016 12:50:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86B1229E06 for ; Fri, 9 Sep 2016 12:50:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B7B729E79; Fri, 9 Sep 2016 12:50:28 +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 3687929E06 for ; Fri, 9 Sep 2016 12:50:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18D3E6E840; Fri, 9 Sep 2016 12:50:27 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 766456E83D for ; Fri, 9 Sep 2016 12:50:02 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP; 09 Sep 2016 05:49:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,304,1470726000"; d="scan'208";a="166223579" Received: from sakamble-desktop.iind.intel.com ([10.223.82.59]) by fmsmga004.fm.intel.com with ESMTP; 09 Sep 2016 05:49:52 -0700 From: Sagar Arun Kamble To: intel-gfx@lists.freedesktop.org Date: Fri, 9 Sep 2016 18:21:41 +0530 Message-Id: <1473425505-3890-23-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473425505-3890-1-git-send-email-sagar.a.kamble@intel.com> References: <1473425505-3890-1-git-send-email-sagar.a.kamble@intel.com> Subject: [Intel-gfx] [PATCH v4 22/26] drm/i915/slpc: Check GuC load status in SLPC active check 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 SLPC status has to be linked with GuC load status to make sure SLPC actions get invoked when GuC is loaded. v2: Space and function return convention issues. (Deepak) v3: Rebase. v4: Limiting the check for SLPC actions. Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/intel_drv.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 796c52f..f92678c 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1707,8 +1707,12 @@ bool chv_phy_powergate_ch(struct drm_i915_private *dev_priv, enum dpio_phy phy, static inline int intel_slpc_active(struct drm_i915_private *dev_priv) { + struct intel_guc_fw *guc_fw = &dev_priv->guc.guc_fw; int ret = 0; + if (guc_fw->guc_fw_load_status != GUC_FIRMWARE_SUCCESS) + return ret; + if (dev_priv->guc.slpc.vma && dev_priv->guc.slpc.enabled) ret = 1;