LCOV - code coverage report
Current view: top level - drivers/gpu/drm/i915/gt/uc - intel_huc_fw.c (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 9 0.0 %
Date: 2022-04-01 13:59:58 Functions: 0 2 0.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // SPDX-License-Identifier: MIT
       2                 :            : /*
       3                 :            :  * Copyright © 2014-2019 Intel Corporation
       4                 :            :  */
       5                 :            : 
       6                 :            : #include "gt/intel_gt.h"
       7                 :            : #include "intel_huc_fw.h"
       8                 :            : #include "i915_drv.h"
       9                 :            : 
      10                 :            : /**
      11                 :            :  * intel_huc_fw_init_early() - initializes HuC firmware struct
      12                 :            :  * @huc: intel_huc struct
      13                 :            :  *
      14                 :            :  * On platforms with HuC selects firmware for uploading
      15                 :            :  */
      16                 :          0 : void intel_huc_fw_init_early(struct intel_huc *huc)
      17                 :            : {
      18                 :          0 :         struct intel_gt *gt = huc_to_gt(huc);
      19                 :          0 :         struct intel_uc *uc = &gt->uc;
      20                 :          0 :         struct drm_i915_private *i915 = gt->i915;
      21                 :            : 
      22                 :          0 :         intel_uc_fw_init_early(&huc->fw, INTEL_UC_FW_TYPE_HUC,
      23                 :            :                                intel_uc_uses_guc(uc),
      24                 :          0 :                                INTEL_INFO(i915)->platform, INTEL_REVID(i915));
      25                 :          0 : }
      26                 :            : 
      27                 :            : /**
      28                 :            :  * intel_huc_fw_upload() - load HuC uCode to device
      29                 :            :  * @huc: intel_huc structure
      30                 :            :  *
      31                 :            :  * Called from intel_uc_init_hw() during driver load, resume from sleep and
      32                 :            :  * after a GPU reset. Note that HuC must be loaded before GuC.
      33                 :            :  *
      34                 :            :  * The firmware image should have already been fetched into memory, so only
      35                 :            :  * check that fetch succeeded, and then transfer the image to the h/w.
      36                 :            :  *
      37                 :            :  * Return:      non-zero code on error
      38                 :            :  */
      39                 :          0 : int intel_huc_fw_upload(struct intel_huc *huc)
      40                 :            : {
      41                 :            :         /* HW doesn't look at destination address for HuC, so set it to 0 */
      42                 :          0 :         return intel_uc_fw_upload(&huc->fw, 0, HUC_UKERNEL);
      43                 :            : }

Generated by: LCOV version 1.14