From patchwork Fri Jun 2 23:46:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michel Thierry X-Patchwork-Id: 9763693 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 E0F1360360 for ; Fri, 2 Jun 2017 23:46:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D19612857B for ; Fri, 2 Jun 2017 23:46:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4ADB285DC; Fri, 2 Jun 2017 23:46:56 +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 704C22857B for ; Fri, 2 Jun 2017 23:46:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A45C5899C7; Fri, 2 Jun 2017 23:46:55 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id D7D77899C7 for ; Fri, 2 Jun 2017 23:46:54 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jun 2017 16:46:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.39,287,1493708400"; d="scan'208"; a="1155998745" Received: from relo-linux-11.sc.intel.com ([10.3.160.214]) by fmsmga001.fm.intel.com with ESMTP; 02 Jun 2017 16:46:54 -0700 From: Michel Thierry To: intel-gfx@lists.freedesktop.org Date: Fri, 2 Jun 2017 16:46:54 -0700 Message-Id: <20170602234654.31614-1-michel.thierry@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [Intel-gfx] [PATCH] drm/i915/guc: Clear enable_guc_loading in case of init failure 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 And prevent calling i915_ggtt_disable_guc twice (the first when GuC init failed, and the second time during driver unload / intel_uc_fini_hw), and hitting the GEM_BUG_ON. Fixes: 04f7b24eccdf ("drm/i915/guc: Assert that we switch between known ggtt->invalidate functions") Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Joonas Lahtinen Signed-off-by: Michel Thierry --- drivers/gpu/drm/i915/intel_uc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c index 3524ff07a0f2..c5ef4fa2b404 100644 --- a/drivers/gpu/drm/i915/intel_uc.c +++ b/drivers/gpu/drm/i915/intel_uc.c @@ -433,6 +433,11 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv) DRM_NOTE("Falling back from GuC submission to execlist mode\n"); } + if (i915.enable_guc_loading) { + i915.enable_guc_loading = 0; + DRM_NOTE("GuC firmware loading disabled\n"); + } + return ret; }