From patchwork Thu Dec 15 18:24:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srivatsa, Anusha" X-Patchwork-Id: 9476719 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 525F56047D for ; Thu, 15 Dec 2016 18:25:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42CBF287C4 for ; Thu, 15 Dec 2016 18:25:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33E6A2880B; Thu, 15 Dec 2016 18:25:07 +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 B2CE6287C4 for ; Thu, 15 Dec 2016 18:25:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BCCC6E252; Thu, 15 Dec 2016 18:25:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5FBB16E252 for ; Thu, 15 Dec 2016 18:25:01 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 15 Dec 2016 10:25:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.33,353,1477983600"; d="scan'208"; a="1072500405" Received: from anusha.jf.intel.com ([10.7.198.177]) by orsmga001.jf.intel.com with ESMTP; 15 Dec 2016 10:24:58 -0800 From: anushasr To: intel-gfx@lists.freedesktop.org Date: Thu, 15 Dec 2016 10:24:56 -0800 Message-Id: <1481826297-9710-1-git-send-email-anusha.srivatsa@intel.com> X-Mailer: git-send-email 2.7.4 Cc: Jani Nikula Subject: [Intel-gfx] [PATCH 1/2] drm/i915/huc: Introduce enable_huc parameter 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 From: Anusha Srivatsa Add a new kernel parameter: enable_huc. This parameter controls HuC functionality. If this parameter is set to 1, it suggests that HuC functionality is being used and also that the GuC has to be loaded. GuC has to be loaded in order to authenticate the HuC. Cc: Jani Nikula Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Arek Signed-off-by: Anusha Srivatsa --- drivers/gpu/drm/i915/i915_params.c | 5 +++++ drivers/gpu/drm/i915/i915_params.h | 1 + drivers/gpu/drm/i915/intel_huc_loader.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c index 0e280fb..1d9c306 100644 --- a/drivers/gpu/drm/i915/i915_params.c +++ b/drivers/gpu/drm/i915/i915_params.c @@ -56,6 +56,7 @@ struct i915_params i915 __read_mostly = { .verbose_state_checks = 1, .nuclear_pageflip = 0, .edp_vswing = 0, + .enable_huc = 1, .enable_guc_loading = 0, .enable_guc_submission = 0, .guc_log_level = -1, @@ -216,6 +217,10 @@ MODULE_PARM_DESC(edp_vswing, "(0=use value from vbt [default], 1=low power swing(200mV)," "2=default swing(400mV))"); +module_param_named(enable_huc, i915.enable_huc, int, 0400); +MODULE_PARM_DESC(enable_huc, + "Enable HuC usage. If enabled,load GuC (1:enabled (default), 0:disabled)"); + module_param_named_unsafe(enable_guc_loading, i915.enable_guc_loading, int, 0400); MODULE_PARM_DESC(enable_guc_loading, "Enable GuC firmware loading " diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h index 8e433de..7b0523b 100644 --- a/drivers/gpu/drm/i915/i915_params.h +++ b/drivers/gpu/drm/i915/i915_params.h @@ -44,6 +44,7 @@ struct i915_params { int disable_power_well; int enable_ips; int invert_brightness; + int enable_huc; int enable_guc_loading; int enable_guc_submission; int guc_log_level; diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c index 8137979..a545f76 100644 --- a/drivers/gpu/drm/i915/intel_huc_loader.c +++ b/drivers/gpu/drm/i915/intel_huc_loader.c @@ -166,6 +166,10 @@ void intel_huc_init(struct drm_i915_private *dev_priv) huc_fw->load_status = INTEL_UC_FIRMWARE_NONE; huc_fw->fw_type = INTEL_UC_FW_TYPE_HUC; + if (!i915.enable_huc) + DRM_ERROR("HuC not enabled. Will not be loaded\n"); + return; + if (!HAS_HUC_UCODE(dev_priv)) return;