drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/nvenc.c
Extension
.c
Size
645 bytes
Lines
34
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

#include "engine.h"
#include <engine/nvenc.h>

static void *
nvkm_rm_nvenc_dtor(struct nvkm_engine *engine)
{
	return container_of(engine, struct nvkm_nvenc, engine);
}

int
nvkm_rm_nvenc_new(struct nvkm_rm *rm, int inst)
{
	struct nvkm_nvenc *nvenc;
	int ret;

	nvenc = kzalloc_obj(*nvenc);
	if (!nvenc)
		return -ENOMEM;

	ret = nvkm_rm_engine_ctor(nvkm_rm_nvenc_dtor, rm, NVKM_ENGINE_NVENC, inst,
				  &rm->gpu->nvenc.class, 1, &nvenc->engine);
	if (ret) {
		kfree(nvenc);
		return ret;
	}

	rm->device->nvenc[inst] = nvenc;
	return 0;
}

Annotation

Implementation Notes