From patchwork Tue Oct 13 16:49:45 2015 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: 7386831 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8D868BEEA4 for ; Tue, 13 Oct 2015 16:47:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB67A20811 for ; Tue, 13 Oct 2015 16:47:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D9C182080C for ; Tue, 13 Oct 2015 16:47:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4767672124; Tue, 13 Oct 2015 09:47:51 -0700 (PDT) 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 ESMTP id ABC5C72124 for ; Tue, 13 Oct 2015 09:47:49 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 13 Oct 2015 09:47:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,678,1437462000"; d="scan'208";a="663543671" Received: from sakamble-desktop.iind.intel.com ([10.223.82.56]) by orsmga003.jf.intel.com with ESMTP; 13 Oct 2015 09:47:47 -0700 From: Sagar Arun Kamble To: intel-gfx@lists.freedesktop.org Date: Tue, 13 Oct 2015 22:19:45 +0530 Message-Id: <1444754985-15734-1-git-send-email-sagar.a.kamble@intel.com> X-Mailer: git-send-email 1.9.1 Subject: [Intel-gfx] [PATCH 1/1] drm/i915: Drop RPM reference when CSR fails to load for BXT 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 RPM reference taken before CSR load is not dropped if CSR fails to load. As Display DC9 state that is entered on RPM suspend does not depend on CSR firmware, RPM reference can be dropped for BXT. Cc: Animesh Manna Cc: A.Sunil Kamath Change-Id: Ib25d64239adb30188f2c2f1b5ddc6a50c1f0e280 Signed-off-by: Sagar Arun Kamble --- drivers/gpu/drm/i915/intel_csr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c index 9e530a7..48c8ad8 100644 --- a/drivers/gpu/drm/i915/intel_csr.c +++ b/drivers/gpu/drm/i915/intel_csr.c @@ -406,8 +406,15 @@ static void finish_csr_load(const struct firmware *fw, void *context) out: if (fw_loaded) intel_runtime_pm_put(dev_priv); - else + else { + /* + * For BXT, on runtime suspend, display goes to DC9 which does not + * depend on CSR hence leave the RPM reference. + */ + if (IS_BROXTON(dev)) + intel_runtime_pm_put(dev_priv); intel_csr_load_status_set(dev_priv, FW_FAILED); + } release_firmware(fw); }