mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
drm/nouveau: add a kernel doc to introduce the GSP RPC
In order to explain the name clean-ups in GSP RPC routines, a kernel doc to explain the memory layout and terms is required. Add a kernel doc to introduce the GSP RPC. Cc: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Zhi Wang <zhiw@nvidia.com> [ Fix bullet list indentation; add SPDX-License-Identifier. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-2-zhiw@nvidia.com
This commit is contained in:
parent
580aa2782c
commit
22807d30fa
|
|
@ -10,6 +10,7 @@ GPU Driver Documentation
|
|||
imagination/index
|
||||
mcde
|
||||
meson
|
||||
nouveau
|
||||
pl111
|
||||
tegra
|
||||
tve200
|
||||
|
|
|
|||
29
Documentation/gpu/nouveau.rst
Normal file
29
Documentation/gpu/nouveau.rst
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
.. SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
|
||||
===============================
|
||||
drm/nouveau NVIDIA GPU Driver
|
||||
===============================
|
||||
|
||||
The drm/nouveau driver provides support for a wide range of NVIDIA GPUs,
|
||||
covering GeForce, Quadro, and Tesla series, from the NV04 architecture up
|
||||
to the latest Turing, Ampere, Ada families.
|
||||
|
||||
NVKM: NVIDIA Kernel Manager
|
||||
===========================
|
||||
|
||||
The NVKM component serves as the core abstraction layer within the nouveau
|
||||
driver, responsible for managing NVIDIA GPU hardware at the kernel level.
|
||||
NVKM provides a unified interface for handling various GPU architectures.
|
||||
|
||||
It enables resource management, power control, memory handling, and command
|
||||
submission required for the proper functioning of NVIDIA GPUs under the
|
||||
nouveau driver.
|
||||
|
||||
NVKM plays a critical role in abstracting hardware complexities and
|
||||
providing a consistent API to upper layers of the driver stack.
|
||||
|
||||
GSP Support
|
||||
------------------------
|
||||
|
||||
.. kernel-doc:: drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
|
||||
:doc: GSP message queue element
|
||||
|
|
@ -63,6 +63,51 @@ extern struct dentry *nouveau_debugfs_root;
|
|||
#define GSP_MSG_MIN_SIZE GSP_PAGE_SIZE
|
||||
#define GSP_MSG_MAX_SIZE GSP_PAGE_MIN_SIZE * 16
|
||||
|
||||
/**
|
||||
* DOC: GSP message queue element
|
||||
*
|
||||
* https://github.com/NVIDIA/open-gpu-kernel-modules/blob/535/src/nvidia/inc/kernel/gpu/gsp/message_queue_priv.h
|
||||
*
|
||||
* The GSP command queue and status queue are message queues for the
|
||||
* communication between software and GSP. The software submits the GSP
|
||||
* RPC via the GSP command queue, GSP writes the status of the submitted
|
||||
* RPC in the status queue.
|
||||
*
|
||||
* A GSP message queue element consists of three parts:
|
||||
*
|
||||
* - message element header (struct r535_gsp_msg), which mostly maintains
|
||||
* the metadata for queuing the element.
|
||||
*
|
||||
* - RPC message header (struct nvfw_gsp_rpc), which maintains the info
|
||||
* of the RPC. E.g., the RPC function number.
|
||||
*
|
||||
* - The payload, where the RPC message stays. E.g. the params of a
|
||||
* specific RPC function. Some RPC functions also have their headers
|
||||
* in the payload. E.g. rm_alloc, rm_control.
|
||||
*
|
||||
* The memory layout of a GSP message element can be illustrated below::
|
||||
*
|
||||
* +------------------------+
|
||||
* | Message Element Header |
|
||||
* | (r535_gsp_msg) |
|
||||
* | |
|
||||
* | (r535_gsp_msg.data) |
|
||||
* | | |
|
||||
* |----------V-------------|
|
||||
* | GSP RPC Header |
|
||||
* | (nvfw_gsp_rpc) |
|
||||
* | |
|
||||
* | (nvfw_gsp_rpc.data) |
|
||||
* | | |
|
||||
* |----------V-------------|
|
||||
* | Payload |
|
||||
* | |
|
||||
* | header(optional) |
|
||||
* | params |
|
||||
* +------------------------+
|
||||
*
|
||||
*/
|
||||
|
||||
struct r535_gsp_msg {
|
||||
u8 auth_tag_buffer[16];
|
||||
u8 aad_buffer[16];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user