Skip to content
Snippets Groups Projects
Commit 22807d30 authored by Zhi Wang's avatar Zhi Wang Committed by Danilo Krummrich
Browse files

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: default avatarZhi Wang <zhiw@nvidia.com>
[ Fix bullet list indentation; add SPDX-License-Identifier. - Danilo ]
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250124182958.2040494-2-zhiw@nvidia.com
parent 580aa278
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,7 @@ GPU Driver Documentation ...@@ -10,6 +10,7 @@ GPU Driver Documentation
imagination/index imagination/index
mcde mcde
meson meson
nouveau
pl111 pl111
tegra tegra
tve200 tve200
......
.. 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; ...@@ -63,6 +63,51 @@ extern struct dentry *nouveau_debugfs_root;
#define GSP_MSG_MIN_SIZE GSP_PAGE_SIZE #define GSP_MSG_MIN_SIZE GSP_PAGE_SIZE
#define GSP_MSG_MAX_SIZE GSP_PAGE_MIN_SIZE * 16 #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 { struct r535_gsp_msg {
u8 auth_tag_buffer[16]; u8 auth_tag_buffer[16];
u8 aad_buffer[16]; u8 aad_buffer[16];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment