drm/i915: Add microcontrollers documentation section
Subsystems (4)
PATCH 1/3 drm/i915: Add microcontrollers documentation section
To better organize the information, add a microcontrollers section and move/link the GuC, HuC and DMC documentation under it. Also add a small intro.
--- Documentation/gpu/i915.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
Documentation/gpu/i915.rst +18 -0
@@ -415,6 +415,15 @@ Object Tiling IOCTLs .. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c :doc: buffer object tiling +Microcontrollers +================ + +Starting from gen9, three microcontrollers are available on the HW: the +graphics microcontroller (GuC), the HEVC/H.265 microcontroller (HuC) and the +display microcontroller (DMC). The driver is responsible for loading the +firmwares on the microcontrollers; the GuC and HuC firmwares are transferred +to WOPCM using the DMA engine, while the DMC firmware is written through MMIO. + WOPCM -----
@@ -454,6 +463,15 @@ GuC Address Space .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c :doc: GuC Address Space +HuC +--- +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c + :doc: HuC Firmware + +DMC +--- +See `CSR firmware support for DMC`_ + Tracing =======
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm/i915/guc: improve documentation
Add a short description of what we expect from GuC and some minor improvements to existing documentation. Also remove a comment about a difference between GuC and HuC that is not true anymore.
--- Documentation/gpu/i915.rst | 22 ++++++++++------ drivers/gpu/drm/i915/gt/uc/intel_guc.c | 26 +++++++++++++++++-- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 +++++ drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 3 --- 4 files changed, 44 insertions(+), 13 deletions(-)
Documentation/gpu/i915.rst +14 -8
@@ -436,12 +436,24 @@ WOPCM Layout GuC --- -Firmware Layout -~~~~~~~~~~~~~~~ +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c + :doc: GuC + +GuC Firmware Layout +~~~~~~~~~~~~~~~~~~~ .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h :doc: Firmware Layout +GuC Memory Management +~~~~~~~~~~~~~~~~~~~~~ + +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c + :doc: GuC Memory Management +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c + :functions: intel_guc_allocate_vma + + GuC-specific firmware loader ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -457,12 +469,6 @@ GuC-based command submission .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c :internal: -GuC Address Space -~~~~~~~~~~~~~~~~~ - -.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c - :doc: GuC Address Space - HuC --- .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c
drivers/gpu/drm/i915/gt/uc/intel_guc.c +24 -2
@@ -9,6 +9,22 @@#include "intel_guc_submission.h" #include "i915_drv.h" +/** +* DOC: GuC +* +* The GuC is a microcontroller inside the GT HW, introduced in gen9. The GuC is +* designed to offload some of the functionality usually run on the host driver; +* currently the main operations it can take care of are: +* +* - Authentication of the HuC, which is required to fully enable HuC usage. +* - Low latency graphics context scheduling (a.k.a. GuC submission). +* - GT Power management. +* +* The enable_guc module parameter can be used to select which of those +* operations to enable within GuC. Note that not all the operations are +* supported on all gen9+ platforms. +*/ +static void gen8_guc_raise_irq (struct intel_guc *guc) {struct intel_gt *gt =guc_to_gt (guc);
@@ -548,9 +564,15 @@ int intel_guc_resume(struct intel_guc *guc) }/** -* DOC: GuC Address Space +* DOC: GuC Memory Management * -* The layout of GuC address space is shown below: +* GuC can't allocate any memory for its own usage, so all the allocations must +* be handled by the host driver. GuC accesses the memory via the GGTT, with the +* exception of the top and bottom parts of the 4GB address space, which are +* instead re-mapped by the GuC HW to memory location of the FW itself (WOPCM) +* or other parts of the HW. The driver must take care not to place objects that +* the GuC is going to access in these reserved ranges. The layout of the GuC +* address space is shown below: * * :: *
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +6 -0
@@ -29,6 +29,12 @@ enum {/** * DOC: GuC-based command submission * +* IMPORTANT NOTE: GuC submission is currently not supported in i915. The GuC +* firmware is moving to an updated submission interface and we plan to +* turn submission back on when that lands. The below documentation (and related +* code) matches the old submission model and will be updated as part of the +* upgrade to the new flow. +* * GuC client: * A intel_guc_client refers to a submission path through GuC. Currently, there * is only one client, which is charged with all submissions to the GuC. This
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +0 -3
@@ -39,9 +39,6 @@* 3. Length info of each component can be found in header, in dwords. * 4. Modulus and exponent key are not required by driver. They may not appear * in fw. So driver will load a truncated firmware in this case. -* -* The only difference between GuC and HuC firmwares is how the version -* information is saved. */ struct uc_css_header {
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/guc: improve documentation
Hello Daniele,
Quoted 7 lines · Daniele Ceraolo Spurio
Add a short description of what we expect from GuC and some minor improvements to existing documentation. Also remove a comment about a difference between GuC and HuC that is not true anymore.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc Matthew Brost <[email protected]>
Anna Karas
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] drm/i915/guc: improve documentation
In reply to Daniele Ceraolo SpurioQuoted 63 lines · Daniele Ceraolo Spurio
Add a short description of what we expect from GuC and some minor improvements to existing documentation. Also remove a comment about a difference between GuC and HuC that is not true anymore.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>Cc Matthew Brost <[email protected]>--- Documentation/gpu/i915.rst | 22 ++++++++++------ drivers/gpu/drm/i915/gt/uc/intel_guc.c | 26 +++++++++++++++++-- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 6 +++++ drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h | 3 --- 4 files changed, 44 insertions(+), 13 deletions(-)Documentation/gpu/i915.rst +14
-8@@ -436,12 +436,24 @@ WOPCM Layout GuC --- -Firmware Layout -~~~~~~~~~~~~~~~ +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c + :doc: GuC + +GuC Firmware Layout +~~~~~~~~~~~~~~~~~~~ .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h :doc: Firmware Layout +GuC Memory Management +~~~~~~~~~~~~~~~~~~~~~ + +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c + :doc: GuC Memory Management +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c + :functions: intel_guc_allocate_vma + + GuC-specific firmware loader ~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -457,12 +469,6 @@ GuC-based command submission .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c :internal: -GuC Address Space -~~~~~~~~~~~~~~~~~ - -.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c - :doc: GuC Address Space - HuC --- .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.cdrivers/gpu/drm/i915/gt/uc/intel_guc.c +0
-0
drivers/gpu/drm/i915/gt/uc/intel_guc.c line 16
Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +5
-0@@ -9,6 +9,22 @@#include "intel_guc_submission.h" #include "i915_drv.h" +/** +* DOC: GuC +* +* The GuC is a microcontroller inside the GT HW, introduced in gen9. The GuC is +* designed to offload some of the functionality usually run on the host driver;
"... functionality usually run on the host driver" -> "... functionality usually performed by the host driver"?
drivers/gpu/drm/i915/gt/uc/intel_guc.c line 25
Quoted 9 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +9
-0+* currently the main operations it can take care of are: +* +* - Authentication of the HuC, which is required to fully enable HuC usage. +* - Low latency graphics context scheduling (a.k.a. GuC submission). +* - GT Power management. +* +* The enable_guc module parameter can be used to select which of those +* operations to enable within GuC. Note that not all the operations are +* supported on all gen9+ platforms.
It would be good to say that the FW is optional and that we support running without it. Also, it would be good to explain what is lost when not using this FW (for now, only losing the ability to use the HuC).
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +2
-1+*/ +static void gen8_guc_raise_irq (struct intel_guc *guc) {struct intel_gt *gt =guc_to_gt (guc);@@ -548,9 +564,15 @@ int intel_guc_resume(struct intel_guc *guc) }/** -* DOC: GuC Address Space
drivers/gpu/drm/i915/gt/uc/intel_guc.c int intel_guc_resume(struct intel_guc *guc) · line 575
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +8
-1+* DOC: GuC Memory Management * -* The layout of GuC address space is shown below: +* GuC can't allocate any memory for its own usage, so all the allocations must +* be handled by the host driver. GuC accesses the memory via the GGTT, with the +* exception of the top and bottom parts of the 4GB address space, which are +* instead re-mapped by the GuC HW to memory location of the FW itself (WOPCM) +* or other parts of the HW. The driver must take care not to place objects that +* the GuC is going to access in these reserved ranges. The layout of the GuC +* address space is shown below:
Thanks for writing this! This is really beneficial!
Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_guc.c +0
-0* * :: * drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +0
-0
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c enum { · line 36
Quoted 8 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +5
-0@@ -29,6 +29,12 @@ enum {/** * DOC: GuC-based command submission * +* IMPORTANT NOTE: GuC submission is currently not supported in i915. The GuC +* firmware is moving to an updated submission interface and we plan to +* turn submission back on when that lands. The below documentation (and related +* code) matches the old submission model and will be updated as part of the +* upgrade to the new flow.
Thanks for adding this :)
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +1
-0+* * GuC client: * A intel_guc_client refers to a submission path through GuC. Currently, there * is only one client, which is charged with all submissions to the GuC. This drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +0
-0
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h line 44
Quoted 9 lines
drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h +0
-3@@ -39,9 +39,6 @@* 3. Length info of each component can be found in header, in dwords. * 4. Modulus and exponent key are not required by driver. They may not appear * in fw. So driver will load a truncated firmware in this case. -* -* The only difference between GuC and HuC firmwares is how the version -* information is saved. */ struct uc_css_header {
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915/huc: improve documentation
In reply to Daniele Ceraolo SpurioBetter 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.
--- Documentation/gpu/i915.rst | 10 ++++++++-- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 19 +++++++++++++++---- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 15 --------------- 3 files changed, 23 insertions(+), 21 deletions(-)
Documentation/gpu/i915.rst +8 -2
@@ -471,8 +471,14 @@ GuC-based command submission HuC --- -.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c - :doc: HuC Firmware +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c + :doc: HuC +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c + :functions: intel_huc_auth + +HuC Firmware Layout +~~~~~~~~~~~~~~~~~~~ +The HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_ DMC ---
drivers/gpu/drm/i915/gt/uc/intel_huc.c +15 -4
@@ -9,6 +9,18 @@#include "intel_huc.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. +*/ +void intel_huc_init_early (struct intel_huc *huc) {struct drm_i915_private *i915 =huc_to_gt (huc)->i915;
@@ -118,10 +130,9 @@ void intel_huc_fini(struct intel_huc *huc)* * Called after HuC and GuC firmware loading during intel_uc_init_hw(). * -* This function pins HuC firmware image object into GGTT. -* Then it invokes GuC action to authenticate passing the offset to RSA -* signature through intel_guc_auth_huc(). It then waits for 50ms for -* firmware verification ACK and unpins the object. +* This function invokes the GuC action to authenticate the HuC firmware, +* passing the offset of the RSA signature to intel_guc_auth_huc(). It then +* waits for up to 50ms for firmware verification ACK. */ int intel_huc_auth (struct intel_huc *huc) {
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0 -15
@@ -7,21 +7,6 @@#include "intel_huc_fw.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 * @huc: intel_huc struct
Signature · 6 lines
2.23.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/huc: improve documentation
Hello Daniele,
Quoted 6 lines · Daniele Ceraolo Spurio
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.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>
Anna Karas
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/huc: improve documentation
In reply to Daniele Ceraolo SpurioQuoted 75 lines · Daniele Ceraolo Spurio
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.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>--- Documentation/gpu/i915.rst | 10 ++++++++-- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 19 +++++++++++++++---- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 15 --------------- 3 files changed, 23 insertions(+), 21 deletions(-)Documentation/gpu/i915.rst +8
-2@@ -471,8 +471,14 @@ GuC-based command submission HuC --- -.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c - :doc: HuC Firmware +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c + :doc: HuC +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c + :functions: intel_huc_auth + +HuC Firmware Layout +~~~~~~~~~~~~~~~~~~~ +The HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_ DMC ---drivers/gpu/drm/i915/gt/uc/intel_huc.c +15
-4@@ -9,6 +9,18 @@#include "intel_huc.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. +*/ +void intel_huc_init_early (struct intel_huc *huc) {struct drm_i915_private *i915 =huc_to_gt (huc)->i915;@@ -118,10 +130,9 @@ void intel_huc_fini(struct intel_huc *huc)* * Called after HuC and GuC firmware loading during intel_uc_init_hw(). * -* This function pins HuC firmware image object into GGTT. -* Then it invokes GuC action to authenticate passing the offset to RSA -* signature through intel_guc_auth_huc(). It then waits for 50ms for -* firmware verification ACK and unpins the object. +* This function invokes the GuC action to authenticate the HuC firmware, +* passing the offset of the RSA signature to intel_guc_auth_huc(). It then +* waits for up to 50ms for firmware verification ACK. */ int intel_huc_auth (struct intel_huc *huc) {drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-0
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c line 16
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-7@@ -7,21 +7,6 @@#include "intel_huc_fw.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.
Having a link to the media driver here that would explain what the HuC enables would be beneficial (we don't want to maintain that).
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c line 23
Quoted 7 lines
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-7-* -* 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. -*/
Could we add a section explaining the access the HuC has to memory, and one stating that the firmware is optional?
Anyways, thanks! The series could be landed as-is already, but a few more additions would be welcomed :)
Martin
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c line 12
Quoted 5 lines
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-1-/** * intel_huc_fw_init_early() - initializes HuC firmware struct * @huc: intel_huc struct
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/huc: improve documentation
Quoted 98 lines · Martin Peres
Quoted 75 lines · Daniele Ceraolo Spurio
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.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>--- Documentation/gpu/i915.rst | 10 ++++++++-- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 19 +++++++++++++++---- drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c | 15 --------------- 3 files changed, 23 insertions(+), 21 deletions(-)Documentation/gpu/i915.rst +8
-2@@ -471,8 +471,14 @@ GuC-based command submission HuC --- -.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c - :doc: HuC Firmware +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c + :doc: HuC +.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c + :functions: intel_huc_auth + +HuC Firmware Layout +~~~~~~~~~~~~~~~~~~~ +The HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_ DMC ---drivers/gpu/drm/i915/gt/uc/intel_huc.c +15
-4@@ -9,6 +9,18 @@#include "intel_huc.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. +*/ +void intel_huc_init_early (struct intel_huc *huc) {struct drm_i915_private *i915 =huc_to_gt (huc)->i915;@@ -118,10 +130,9 @@ void intel_huc_fini(struct intel_huc *huc)* * Called after HuC and GuC firmware loading during intel_uc_init_hw(). * -* This function pins HuC firmware image object into GGTT. -* Then it invokes GuC action to authenticate passing the offset to RSA -* signature through intel_guc_auth_huc(). It then waits for 50ms for -* firmware verification ACK and unpins the object. +* This function invokes the GuC action to authenticate the HuC firmware, +* passing the offset of the RSA signature to intel_guc_auth_huc(). It then +* waits for up to 50ms for firmware verification ACK. */ int intel_huc_auth (struct intel_huc *huc) {drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-0drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c line 16
Quoted 10 lines
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-7@@ -7,21 +7,6 @@#include "intel_huc_fw.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. Having a link to the media driver here that would explain what the HuC enables would be beneficial (we don't want to maintain that).
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c line 23
Quoted 7 lines
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-7-* -* 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. -*/
Quoted 1 line
Could we add a section explaining the access the HuC has to memory, and
I'll have to follow up with the HuC team to understand how the memory access works because I'm not too familiar with HuC. Are you ok if I address all your other comments for GuC and HuC and add this as a follow up later once I get the info?
Daniele
Quoted 12 lines
one stating that the firmware is optional?
Anyways, thanks! The series could be landed as-is already, but a few more additions would be welcomed :)
Martin
Quoted 5 lines
drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-1-/** * intel_huc_fw_init_early() - initializes HuC firmware struct * @huc: intel_huc struct
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm/i915/huc: improve documentation
Quoted 105 lines · Daniele Ceraolo Spurio
Quoted 102 lines · Martin Peres
Quoted 86 lines · Daniele Ceraolo Spurio
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.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>---
Documentation/gpu/i915.rst | 10 ++++++++-- drivers/gpu/drm/i915/gt/uc/intel_huc.c | 19 +++++++++++++++----drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c| 15 ---------------3 files changed, 23 insertions(+), 21 deletions(-)Documentation/gpu/i915.rst +0
-0@@ -471,8 +471,14 @@ GuC-based command submissionHuC
---
-.. kernel-doc::drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c- :doc: HuC Firmware
+.. kernel-doc::drivers/gpu/drm/i915/gt/uc/intel_huc.c+ :doc: HuC
+.. kernel-doc::drivers/gpu/drm/i915/gt/uc/intel_huc.c+ :functions:intel_huc_authDocumentation/gpu/i915.rst +4
-0+ +HuC Firmware Layout +~~~~~~~~~~~~~~~~~~~ +The HuC FW layout is the same as the GuC one, see `GuC FirmwareLayout`_
DMC
---drivers/gpu/drm/i915/gt/uc/intel_huc.c +5
-0@@ -9,6 +9,18 @@ #include "intel_huc.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.
+ */
+
voidintel_huc_init_early(struct intel_huc *huc)
{
structdrm_i915_private*i915 = huc_to_gt(huc)->i915;drivers/gpu/drm/i915/gt/uc/intel_huc.c +2
-4@@ -118,10 +130,9 @@ void intel_huc_fini(struct intel_huc *huc) * * Called after HuC and GuC firmware loading during intel_uc_init_hw(). * - * This function pins HuC firmware image object into GGTT. - * Then it invokes GuC action to authenticate passing the offset to RSA - * signature through intel_guc_auth_huc(). It then waits for 50ms for - * firmware verification ACK and unpins the object. + * This function invokes the GuC action to authenticate the HuC firmware, + * passing the offset of the RSA signature to intel_guc_auth_huc().It then
+ * waits for up to 50ms for firmware verification ACK. */
intintel_huc_auth(struct intel_huc *huc)
{drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c +0
-5@@ -7,21 +7,6 @@ #include "intel_huc_fw.h" #include "i915_drv.h" -/** -* DOC: HuC Firmware -* -* Motivation: -* GEN9 introduces a new dedicated firmware for usage in media HEVC Quoted 3 lines
(High
- * Efficiency Video Coding) operations. Userspace can use the firmware
- * capabilities by adding HuC specific commands to batch buffers.Having a link to the media driver here that would explain what the HuC enables would be beneficial (we don't want to maintain that).
Quoted 7 lines
- *
- * 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.
- */
Quoted 4 lines
Quoted 1 line
Could we add a section explaining the access the HuC has to memory, and
I'll have to follow up with the HuC team to understand how the memory access works because I'm not too familiar with HuC. Are you ok if I address all your other comments for GuC and HuC and add this as a follow up later once I get the info?
Never mind, I found the info I needed (Bspec 48058), so I can do all the changes in one go.
Daniele
Quoted 14 lines
Daniele
Quoted 12 lines
one stating that the firmware is optional?
Anyways, thanks! The series could be landed as-is already, but a few more additions would be welcomed :)
Martin
Quoted 5 lines
-
/**
*intel_huc_fw_init_early()- initializes HuC firmware struct
* @huc:intel_hucstruct
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/3] drm/i915: Add microcontrollers documentation section
In reply to Daniele Ceraolo Spurio== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/i915: Add microcontrollers documentation section
URL : https://patchwork.freedesktop.org/series/67356/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6973 -> Patchwork_14575
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_14575 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_14575, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_14575:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live_gem_contexts:
- fi-kbl-r: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-kbl-r/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-kbl-r/igt@i915_selftest@live_gem_contexts.html
Known issues
------------
Here are the changes found in Patchwork_14575 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_switch@legacy-render:
- fi-bxt-dsi: [PASS][3] -> [INCOMPLETE][4] ([fdo#103927] / [fdo#111381])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-bxt-dsi/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-bxt-dsi/igt@[email protected]
* igt@i915_module_load@reload:
- fi-blb-e6850: [PASS][5] -> [INCOMPLETE][6] ([fdo#107718])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-blb-e6850/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-blb-e6850/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- fi-icl-u2: [PASS][7] -> [FAIL][8] ([fdo#109635 ] / [fdo#110387])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-icl-u2/igt@[email protected]
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][9] -> [FAIL][10] ([fdo#111045] / [fdo#111096])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-kbl-7500u/igt@[email protected]
* igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
- fi-icl-u3: [PASS][11] -> [DMESG-WARN][12] ([fdo#107724]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-icl-u3/igt@[email protected]
#### Possible fixes ####
* igt@gem_mmap@basic-small-bo:
- fi-icl-u3: [DMESG-WARN][13] ([fdo#107724]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6973/fi-icl-u3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/fi-icl-u3/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111381]: https://bugs.freedesktop.org/show_bug.cgi?id=111381
[fdo#111831]: https://bugs.freedesktop.org/show_bug.cgi?id=111831
Participating hosts (53 -> 45)
------------------------------
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-pnv-d510 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_6973 -> Patchwork_14575
CI-20190529: 20190529
CI_DRM_6973: 7462c58bba0fb6e85bd380591c3fd86e298c0f95 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5206: 5a6c68568def840cd720f18fc66f529a89f84675 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14575: 61eab783ca84603326cd35cda16c3f4fcb9365ff @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
61eab783ca84 drm/i915/huc: improve documentation 1b0401f1da97 drm/i915/guc: improve documentation 46bf0b6b061f drm/i915: Add microcontrollers documentation section
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14575/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hello Daniele,
Quoted 6 lines · Daniele Ceraolo Spurio
To better organize the information, add a microcontrollers section and move/link the GuC, HuC and DMC documentation under it. Also add a small intro.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>Cc Michal Wajdeczko <[email protected]>
Anna Karas
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Daniele Ceraolo Spurio
To better organize the information, add a microcontrollers section and move/link the GuC, HuC and DMC documentation under it. Also add a small intro.
Signed-off-by Daniele Ceraolo Spurio <[email protected]>
Quoted 32 lines
Cc Michal Wajdeczko <[email protected]>--- Documentation/gpu/i915.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)Documentation/gpu/i915.rst +11
-0@@ -415,6 +415,15 @@ Object Tiling IOCTLs .. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c :doc: buffer object tiling +Microcontrollers +================ + +Starting from gen9, three microcontrollers are available on the HW: the +graphics microcontroller (GuC), the HEVC/H.265 microcontroller (HuC) and the +display microcontroller (DMC). The driver is responsible for loading the +firmwares on the microcontrollers; the GuC and HuC firmwares are transferred +to WOPCM using the DMA engine, while the DMC firmware is written through MMIO. + WOPCM -----@@ -454,6 +463,15 @@ GuC Address Space .. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c :doc: GuC Address Space +HuC +---
Documentation/gpu/i915.rst GuC Address Space · line 477
Quoted 10 lines
Documentation/gpu/i915.rst +7
-0+.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc_fw.c + :doc: HuC Firmware + +DMC +--- +See `CSR firmware support for DMC`_ + Tracing =======
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx