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.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
engine.hengine/nvenc.h
Detected Declarations
function Copyrightfunction nvkm_rm_nvenc_new
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
- Immediate include surface: `engine.h`, `engine/nvenc.h`.
- Detected declarations: `function Copyright`, `function nvkm_rm_nvenc_new`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.