• Anusha Srivatsa's avatar
    drm/i915/huc: Add HuC fw loading support · bd132858
    Anusha Srivatsa authored
    The HuC loading process is similar to GuC. The intel_uc_fw_fetch()
    is used for both cases.
    
    HuC loading needs to be before GuC loading. The WOPCM setting must
    be done early before loading any of them.
    
    v2: rebased on-top of drm-intel-nightly.
        removed if(HAS_GUC()) before the guc call. (D.Gordon)
        update huc_version number of format.
    v3: rebased to drm-intel-nightly, changed the file name format to
        match the one in the huc package.
        Changed dev->dev_private to to_i915()
    v4: moved function back to where it was.
        change wait_for_atomic to wait_for.
    v5: rebased. Changed the year in the copyright message to reflect
    the right year.Correct the comments,remove the unwanted WARN message,
    replace drm_gem_object_unreference() with i915_gem_object_put().Make the
    prototypes in intel_huc.h non-extern.
    v6: rebased. Update the file construction done by HuC. It is similar to
    GuC.Adopted the approach used in-
    https://patchwork.freedesktop.org/patch/104355/ <Tvrtko Ursulin>
    v7: Change dev to dev_priv in macro definition.
    Corrected comments.
    v8: rebased on top of drm-tip. Updated functions intel_huc_load(),
    intel_huc_init() and intel_uc_fw_fetch() to accept dev_priv instead of
    dev. Moved contents of intel_huc.h to intel_uc.h.
    v9: change SKL_FW_ to SKL_HUC_FW_. Add intel_ prefix to guc_wopcm_size().
    Remove unwanted checks in intel_uc.h. Rename huc_fw in struct intel_huc to
    simply fw to avoid redundency.
    v10: rebased. Correct comments. Make intel_huc_fini() accept dev_priv
    instead of dev like intel_huc_init() and intel_huc_load().Move definition
    to i915_guc_reg.h from intel_uc.h. Clean DMA_CTRL bits after HuC DMA
    transfer in huc_ucode_xfer() instead of guc_ucode_xfer(). Add suitable
    WARNs to give extra info.
    v11: rebased. Add proper bias for HuC and make sure there are
    asserts on failure by using guc_ggtt_offset_vma(). Introduce
    intel_huc.c and remove intel_huc_loader.c since it has functions that
    do more than just loading.Correct year in copyright.
    v12: remove invalidates that are not required anymore.
    
    Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
    Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
    Tested-by: default avatarXiang Haihao <haihao.xiang@intel.com>
    Signed-off-by: default avatarAnusha Srivatsa <anusha.srivatsa@intel.com>
    Signed-off-by: default avatarAlex Dai <yu.dai@intel.com>
    Signed-off-by: default avatarPeter Antoine <peter.antoine@intel.com>
    Reviewed-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/1484755558-1234-1-git-send-email-anusha.srivatsa@intel.com
    bd132858
Makefile 2.94 KB