drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
Extension
.h
Size
11112 bytes
Lines
508
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct nvkm_gsp_mem {
	struct device *dev;
	size_t size;
	void *data;
	dma_addr_t addr;
};

int nvkm_gsp_mem_ctor(struct nvkm_gsp *, size_t size, struct nvkm_gsp_mem *);
void nvkm_gsp_mem_dtor(struct nvkm_gsp_mem *);

struct nvkm_gsp_radix3 {
	struct nvkm_gsp_mem lvl0;
	struct nvkm_gsp_mem lvl1;
	struct sg_table lvl2;
};

int nvkm_gsp_sg(struct nvkm_device *, u64 size, struct sg_table *);
void nvkm_gsp_sg_free(struct nvkm_device *, struct sg_table *);

typedef int (*nvkm_gsp_msg_ntfy_func)(void *priv, u32 fn, void *repv, u32 repc);

struct nvkm_gsp_event;
typedef void (*nvkm_gsp_event_func)(struct nvkm_gsp_event *, void *repv, u32 repc);

/**
 * DOC: GSP message handling policy
 *
 * When sending a GSP RPC command, there can be multiple cases of handling
 * the GSP RPC messages, which are the reply of GSP RPC commands, according
 * to the requirement of the callers and the nature of the GSP RPC commands.
 *
 * NVKM_GSP_RPC_REPLY_NOWAIT - If specified, immediately return to the
 * caller after the GSP RPC command is issued.
 *
 * NVKM_GSP_RPC_REPLY_NOSEQ - If specified, exactly like NOWAIT
 * but don't emit RPC sequence number.
 *
 * NVKM_GSP_RPC_REPLY_RECV - If specified, wait and receive the entire GSP
 * RPC message after the GSP RPC command is issued.
 *
 * NVKM_GSP_RPC_REPLY_POLL - If specified, wait for the specific reply and
 * discard the reply before returning to the caller.
 *
 */
enum nvkm_gsp_rpc_reply_policy {
	NVKM_GSP_RPC_REPLY_NOWAIT = 0,
	NVKM_GSP_RPC_REPLY_NOSEQ,
	NVKM_GSP_RPC_REPLY_RECV,
	NVKM_GSP_RPC_REPLY_POLL,
};

struct nvkm_gsp {
	const struct nvkm_gsp_func *func;
	struct nvkm_subdev subdev;

	struct nvkm_falcon falcon;

	struct {
		struct {
			const struct firmware *load;
			const struct firmware *unload;
		} booter;

		const struct firmware *fmc;

		const struct firmware *bl;
		const struct firmware *rm;

		struct {
			struct nvkm_falcon_fw sb;
		} falcon;
	} fws;

	struct nvkm_firmware fw;
	struct nvkm_gsp_mem sig;
	struct nvkm_gsp_radix3 radix3;

	struct {
		struct {
			struct {
				u64 addr;
				u64 size;
			} vga_workspace;
			u64 addr;
			u64 size;
		} bios;
		struct {
			struct {
				u64 addr;
				u64 size;

Annotation

Implementation Notes