801a0caa62
We currently initialize HuC support based on GuC being enabled in modparam; this means that huc_is_supported() can return false on HW that does have a HuC when enable_guc=0. The rationale for this behavior is that HuC requires GuC for authentication and therefore is not supported by itself. However, we do not allow defining HuC fw wthout GuC fw and selecting HuC in modparam implicitly selects GuC as well, so we can't actually hit a scenario where HuC is selected alone. Therefore, we can flip the support check to reflect the HW capabilities and fw availability, which is more intuitive and will make it cleaner to log HuC the difference between not supported in HW and not selected. Removing the difference between GuC and HuC also allows us to simplify the init_early, since we don't need to differentiate the support based on the type of uC. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Cc: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20200326181121.16869-4-daniele.ceraolospurio@intel.com
27 lines
751 B
C
27 lines
751 B
C
// SPDX-License-Identifier: MIT
|
|
/*
|
|
* Copyright © 2014-2019 Intel Corporation
|
|
*/
|
|
|
|
#include "gt/intel_gt.h"
|
|
#include "intel_huc_fw.h"
|
|
#include "i915_drv.h"
|
|
|
|
/**
|
|
* intel_huc_fw_upload() - load HuC uCode to device
|
|
* @huc: intel_huc structure
|
|
*
|
|
* Called from intel_uc_init_hw() during driver load, resume from sleep and
|
|
* after a GPU reset. Note that HuC must be loaded before GuC.
|
|
*
|
|
* The firmware image should have already been fetched into memory, so only
|
|
* check that fetch succeeded, and then transfer the image to the h/w.
|
|
*
|
|
* Return: non-zero code on error
|
|
*/
|
|
int intel_huc_fw_upload(struct intel_huc *huc)
|
|
{
|
|
/* HW doesn't look at destination address for HuC, so set it to 0 */
|
|
return intel_uc_fw_upload(&huc->fw, 0, HUC_UKERNEL);
|
|
}
|