[Intel-gfx] [PATCH] drm/i915: Use correct reST syntax for WOPCM and GuC kernel-doc diagrams

Jani Nikula jani.nikula at linux.intel.com
Thu Mar 15 12:35:07 UTC 2018


On Wed, 14 Mar 2018, Jackie Li <yaodong.li at intel.com> wrote:
> GuC Address Space and WOPCM Layout diagrams won't be generated correctly by
> sphinx build if not using proper reST syntax.
>
> This patch uses reST literal blocks to make sure GuC Address Space and
> WOPCM Layout diagrams to be generated correctly.
>
> Signed-off-by: Jackie Li <yaodong.li at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc.c   | 46 ++++++++++++++++++++------------------
>  drivers/gpu/drm/i915/intel_wopcm.c | 40 +++++++++++++++++----------------
>  2 files changed, 45 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
> index 3eb516e..61d00f8 100644
> --- a/drivers/gpu/drm/i915/intel_guc.c
> +++ b/drivers/gpu/drm/i915/intel_guc.c
> @@ -497,28 +497,30 @@ int intel_guc_resume(struct intel_guc *guc)
>   *
>   * The layout of GuC address space is shown as below:
>   *
> - *    +==============> +====================+ <== GUC_GGTT_TOP
> - *    ^                |                    |
> - *    |                |                    |
> - *    |                |        DRAM        |
> - *    |                |       Memory       |
> - *    |                |                    |
> - *   GuC               |                    |
> - * Address  +========> +====================+ <== WOPCM Top
> - *  Space   ^          |   HW contexts RSVD |
> - *    |     |          |        WOPCM       |
> - *    |     |     +==> +--------------------+ <== GuC WOPCM Top
> - *    |    GuC    ^    |                    |
> - *    |    GGTT   |    |                    |
> - *    |    Pin   GuC   |        GuC         |
> - *    |    Bias WOPCM  |       WOPCM        |
> - *    |     |    Size  |                    |
> - *    |     |     |    |                    |
> - *    v     v     v    |                    |
> - *    +=====+=====+==> +====================+ <== GuC WOPCM Base
> - *                     |   Non-GuC WOPCM    |
> - *                     |   (HuC/Reserved)   |
> - *                     +====================+ <== WOPCM Base
> + * ::

Nitpick, you could add that to the end of the preceding paragraph as a
double colon.

"As a convenience, the "::" is recognized at the end of any
paragraph. If immediately preceded by whitespace, both colons will be
removed from the output (this is the "partially minimized" form). When
text immediately precedes the "::", one colon will be removed from the
output, leaving only one colon visible (i.e., "::" will be replaced by
":"; this is the "fully minimized" form)."

http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#literal-blocks


BR,
Jani.



> + *
> + *     +==============> +====================+ <== GUC_GGTT_TOP
> + *     ^                |                    |
> + *     |                |                    |
> + *     |                |        DRAM        |
> + *     |                |       Memory       |
> + *     |                |                    |
> + *    GuC               |                    |
> + *  Address  +========> +====================+ <== WOPCM Top
> + *   Space   ^          |   HW contexts RSVD |
> + *     |     |          |        WOPCM       |
> + *     |     |     +==> +--------------------+ <== GuC WOPCM Top
> + *     |    GuC    ^    |                    |
> + *     |    GGTT   |    |                    |
> + *     |    Pin   GuC   |        GuC         |
> + *     |    Bias WOPCM  |       WOPCM        |
> + *     |     |    Size  |                    |
> + *     |     |     |    |                    |
> + *     v     v     v    |                    |
> + *     +=====+=====+==> +====================+ <== GuC WOPCM Base
> + *                      |   Non-GuC WOPCM    |
> + *                      |   (HuC/Reserved)   |
> + *                      +====================+ <== WOPCM Base
>   *
>   * The lower part [0, GuC ggtt_pin_bias) is mapped to WOPCM which consists of
>   * GuC WOPCM and WOPCM reserved for other usage (e.g.RC6 context). The value of
> diff --git a/drivers/gpu/drm/i915/intel_wopcm.c b/drivers/gpu/drm/i915/intel_wopcm.c
> index 4117886..030debd 100644
> --- a/drivers/gpu/drm/i915/intel_wopcm.c
> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
> @@ -14,25 +14,27 @@
>   * offset registers whose are calculated are determined by size of HuC/GuC
>   * firmware size and set of hw requirements/restrictions as shown below:
>   *
> - *   +=========> +====================+ <== WOPCM Top
> - *   ^           |  HW contexts RSVD  |
> - *   |     +===> +====================+ <== GuC WOPCM Top
> - *   |     ^     |                    |
> - *   |     |     |                    |
> - *   |     |     |                    |
> - *   |    GuC    |                    |
> - *   |   WOPCM   |                    |
> - *   |    Size   +--------------------+
> - * WOPCM   |     |    GuC FW RSVD     |
> - *   |     |     +--------------------+
> - *   |     |     |   GuC Stack RSVD   |
> - *   |     |     +------------------- +
> - *   |     v     |   GuC WOPCM RSVD   |
> - *   |     +===> +====================+ <== GuC WOPCM base
> - *   |           |     WOPCM RSVD     |
> - *   |           +------------------- + <== HuC Firmware Top
> - *   v           |      HuC FW        |
> - *   +=========> +====================+ <== WOPCM Base
> + * ::
> + *
> + *    +=========> +====================+ <== WOPCM Top
> + *    ^           |  HW contexts RSVD  |
> + *    |     +===> +====================+ <== GuC WOPCM Top
> + *    |     ^     |                    |
> + *    |     |     |                    |
> + *    |     |     |                    |
> + *    |    GuC    |                    |
> + *    |   WOPCM   |                    |
> + *    |    Size   +--------------------+
> + *  WOPCM   |     |    GuC FW RSVD     |
> + *    |     |     +--------------------+
> + *    |     |     |   GuC Stack RSVD   |
> + *    |     |     +------------------- +
> + *    |     v     |   GuC WOPCM RSVD   |
> + *    |     +===> +====================+ <== GuC WOPCM base
> + *    |           |     WOPCM RSVD     |
> + *    |           +------------------- + <== HuC Firmware Top
> + *    v           |      HuC FW        |
> + *    +=========> +====================+ <== WOPCM Base
>   *
>   * GuC accessible WOPCM starts at GuC WOPCM base and ends at GuC WOPCM top.
>   * The top part of the WOPCM is reserved for hardware contexts (e.g. RC6

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list