drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/disp/head.c- Extension
.c- Size
- 1957 bytes
- Lines
- 68
- 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
head.hcore/client.hnvif/cl0046.hnvif/unpack.h
Detected Declarations
function filesfunction nvkm_head_delfunction nvkm_head_new_
Annotated Snippet
#include "head.h"
#include <core/client.h>
#include <nvif/cl0046.h>
#include <nvif/unpack.h>
struct nvkm_head *
nvkm_head_find(struct nvkm_disp *disp, int id)
{
struct nvkm_head *head;
list_for_each_entry(head, &disp->heads, head) {
if (head->id == id)
return head;
}
return NULL;
}
void
nvkm_head_del(struct nvkm_head **phead)
{
struct nvkm_head *head = *phead;
if (head) {
HEAD_DBG(head, "dtor");
list_del(&head->head);
kfree(*phead);
*phead = NULL;
}
}
int
nvkm_head_new_(const struct nvkm_head_func *func,
struct nvkm_disp *disp, int id)
{
struct nvkm_head *head;
if (!(head = kzalloc_obj(*head)))
return -ENOMEM;
head->func = func;
head->disp = disp;
head->id = id;
list_add_tail(&head->head, &disp->heads);
HEAD_DBG(head, "ctor");
return 0;
}
Annotation
- Immediate include surface: `head.h`, `core/client.h`, `nvif/cl0046.h`, `nvif/unpack.h`.
- Detected declarations: `function files`, `function nvkm_head_del`, `function nvkm_head_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.