drm/i915/huc: improve documentation
Better explain the usage of the microcontroller and what i915 is responsible of. While at it, fix the documentation for the auth function, which doesn't do any pinning anymore. v2: add a comment on HuC being optional and descrive how HuC accesses memory (Martin) v3: add extra newline for better text organization (Martin) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Martin Peres <martin.peres@linux.intel.com> Acked-by: Anna Karas <anna.karas@intel.com> Reviewed-by: Martin Peres <martin.peres@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191014183602.3643-3-daniele.ceraolospurio@intel.com
This commit is contained in:
parent
218151e997
commit
0b23e2a6ed
@ -471,8 +471,20 @@ GuC-based command submission
|
|||||||
|
|
||||||
HuC
|
HuC
|
||||||
---
|
---
|
||||||
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
|
||||||
:doc: HuC Firmware
|
:doc: HuC
|
||||||
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
|
||||||
|
:functions: intel_huc_auth
|
||||||
|
|
||||||
|
HuC Memory Management
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
|
||||||
|
:doc: HuC Memory Management
|
||||||
|
|
||||||
|
HuC Firmware Layout
|
||||||
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
The HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_
|
||||||
|
|
||||||
DMC
|
DMC
|
||||||
---
|
---
|
||||||
|
@ -9,6 +9,34 @@
|
|||||||
#include "intel_huc.h"
|
#include "intel_huc.h"
|
||||||
#include "i915_drv.h"
|
#include "i915_drv.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC: HuC
|
||||||
|
*
|
||||||
|
* The HuC is a dedicated microcontroller for usage in media HEVC (High
|
||||||
|
* Efficiency Video Coding) operations. Userspace can directly use the firmware
|
||||||
|
* capabilities by adding HuC specific commands to batch buffers.
|
||||||
|
*
|
||||||
|
* The kernel driver is only responsible for loading the HuC firmware and
|
||||||
|
* triggering its security authentication, which is performed by the GuC. For
|
||||||
|
* The GuC to correctly perform the authentication, the HuC binary must be
|
||||||
|
* loaded before the GuC one. Loading the HuC is optional; however, not using
|
||||||
|
* the HuC might negatively impact power usage and/or performance of media
|
||||||
|
* workloads, depending on the use-cases.
|
||||||
|
*
|
||||||
|
* See https://github.com/intel/media-driver for the latest details on HuC
|
||||||
|
* functionality.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC: HuC Memory Management
|
||||||
|
*
|
||||||
|
* Similarly to the GuC, the HuC can't do any memory allocations on its own,
|
||||||
|
* with the difference being that the allocations for HuC usage are handled by
|
||||||
|
* the userspace driver instead of the kernel one. The HuC accesses the memory
|
||||||
|
* via the PPGTT belonging to the context loaded on the VCS executing the
|
||||||
|
* HuC-specific commands.
|
||||||
|
*/
|
||||||
|
|
||||||
void intel_huc_init_early(struct intel_huc *huc)
|
void intel_huc_init_early(struct intel_huc *huc)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *i915 = huc_to_gt(huc)->i915;
|
struct drm_i915_private *i915 = huc_to_gt(huc)->i915;
|
||||||
@ -118,10 +146,9 @@ void intel_huc_fini(struct intel_huc *huc)
|
|||||||
*
|
*
|
||||||
* Called after HuC and GuC firmware loading during intel_uc_init_hw().
|
* Called after HuC and GuC firmware loading during intel_uc_init_hw().
|
||||||
*
|
*
|
||||||
* This function pins HuC firmware image object into GGTT.
|
* This function invokes the GuC action to authenticate the HuC firmware,
|
||||||
* Then it invokes GuC action to authenticate passing the offset to RSA
|
* passing the offset of the RSA signature to intel_guc_auth_huc(). It then
|
||||||
* signature through intel_guc_auth_huc(). It then waits for 50ms for
|
* waits for up to 50ms for firmware verification ACK.
|
||||||
* firmware verification ACK and unpins the object.
|
|
||||||
*/
|
*/
|
||||||
int intel_huc_auth(struct intel_huc *huc)
|
int intel_huc_auth(struct intel_huc *huc)
|
||||||
{
|
{
|
||||||
|
@ -7,21 +7,6 @@
|
|||||||
#include "intel_huc_fw.h"
|
#include "intel_huc_fw.h"
|
||||||
#include "i915_drv.h"
|
#include "i915_drv.h"
|
||||||
|
|
||||||
/**
|
|
||||||
* DOC: HuC Firmware
|
|
||||||
*
|
|
||||||
* Motivation:
|
|
||||||
* GEN9 introduces a new dedicated firmware for usage in media HEVC (High
|
|
||||||
* Efficiency Video Coding) operations. Userspace can use the firmware
|
|
||||||
* capabilities by adding HuC specific commands to batch buffers.
|
|
||||||
*
|
|
||||||
* Implementation:
|
|
||||||
* The same firmware loader is used as the GuC. However, the actual
|
|
||||||
* loading to HW is deferred until GEM initialization is done.
|
|
||||||
*
|
|
||||||
* Note that HuC firmware loading must be done before GuC loading.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* intel_huc_fw_init_early() - initializes HuC firmware struct
|
* intel_huc_fw_init_early() - initializes HuC firmware struct
|
||||||
* @huc: intel_huc struct
|
* @huc: intel_huc struct
|
||||||
|
Loading…
Reference in New Issue
Block a user