HuC Loading Patches

Submitted by Srivatsa, Anusha on Jan. 14, 2017, 1:17 a.m.

Details

Reviewer None
Submitted Jan. 14, 2017, 1:17 a.m.
Last Updated Jan. 14, 2017, 1:53 a.m.
Revision 1

Cover Letter(s)

Revision 1
      The patches add HuC loading support. The driver builds a frame level
workload which is stored in the graphics memory. This workload is presented
to HuC for processing. The driver, therefore should first determine if the
HuC is enabled and also read the huC athentication status bit to determine
if HuC was successfully loaded. The GuC is required to authenticate the HuC.
The userspace patches that check for a fully loaded HuC firmware and use it
can be found at:

https://lists.freedesktop.org/archives/libva/2016-September/004554.html
https://lists.freedesktop.org/archives/libva/2016-September/004555.html

More information regarding the HuC, batch commands that configure the
HuC etc can be found at-
https://01.org/sites/default/files/documentation/intel-gfx-prm-osrc-skl-vol02a-commandreference-instructions-huc.pdf
https://www.x.org/docs/intel/CHV/intel-gfx-prm-osrc-chv-bsw-vol10-hevc.pdf

v2: rebased. Changed the code following the review comments.
v3: rebased. Organize code. Move contents of intel_huc.h to intel_uc.h.
Update function intel_huc_load(),intel_huc_init() and intel_uc_fw_fetch()
to accept dev_priv instead of dev.
v4: rebased. Remove intel_is_huc_valid() since it is called onoly once.
Refactor the code to reduce redundency. Remove fiels like uc_dev which
are no longer used.
v5: rebased. Beautify the code- remove comments that no longer hold
good, add newlines etc.
v6: rebased. Remove further redundency. Correct comments. Replace wait_for
with intel_wait_for_register() for optimisation purpose.Make fw_type an enum.
v7: rebased. Rename intel_huc_loader() to intel_huc(). Move intel_guc_auth_huc()
from intel_uc.c to intel_huc.c. Add return values to DRM_ERRORs.
v8: Use DRM_INFO instead of DRM_ERROR in places that are non-erraneous.
Remove invalidates that are no longer required.

Anusha Srivatsa (8):
  drm/i915/guc: Make the GuC fw loading helper functions general
  drm/i915/huc: Unified css_header struct for GuC and HuC
  drm/i915/huc: Add HuC fw loading support
  drm/i915/huc: Add BXT HuC Loading Support
  drm/i915/HuC: Add KBL huC loading Support
  drm/i915/huc: Add debugfs for HuC loading status check
  drm/i915/huc: Support HuC authentication
  drm/i915/get_params: Add HuC status to getparams

 drivers/gpu/drm/i915/Makefile              |   1 +
 drivers/gpu/drm/i915/i915_debugfs.c        |  43 +++-
 drivers/gpu/drm/i915/i915_drv.c            |  10 +
 drivers/gpu/drm/i915/i915_drv.h            |   2 +
 drivers/gpu/drm/i915/i915_guc_reg.h        |   6 +
 drivers/gpu/drm/i915/i915_guc_submission.c |   4 +-
 drivers/gpu/drm/i915/intel_guc_fwif.h      |  24 +-
 drivers/gpu/drm/i915/intel_guc_loader.c    | 196 +++++++++--------
 drivers/gpu/drm/i915/intel_huc.c           | 342 +++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_uc.h            |  60 +++--
 include/uapi/drm/i915_drm.h                |   1 +
 11 files changed, 569 insertions(+), 120 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_huc.c
    

Revisions

Patches download mbox

Tests

Series 18008v1 HuC Loading Patches
https://patchwork.freedesktop.org/api/1.0/series/18008/revisions/1/mbox/

Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-c:
                pass       -> DMESG-WARN (fi-bxt-j4205)

fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:223  dwarn:1   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:82   pass:69   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

a957dfe613ab43c6af84833f2b88ea941320250f drm-tip: 2017y-01m-13d-18h-49m-04s UTC integration manifest
e8ce497 drm/i915/get_params: Add HuC status to getparams
0faab16 drm/i915/huc: Support HuC authentication
46c0d55 drm/i915/huc: Add debugfs for HuC loading status check
36c724c drm/i915/HuC: Add KBL huC loading Support
eb9329d drm/i915/huc: Add BXT HuC Loading Support
e9fa83c drm/i915/huc: Add HuC fw loading support
82a4dd5 drm/i915/huc: Unified css_header struct for GuC and HuC
9276f97 drm/i915/guc: Make the GuC fw loading helper functions general