drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c- Extension
.c- Size
- 4794 bytes
- Lines
- 210
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
priv.hengine/fifo.h
Detected Declarations
function filesfunction nvkm_gr_ctxsw_resumefunction nvkm_gr_ctxsw_pausefunction nvkm_gr_chsw_loadfunction nvkm_gr_tilefunction nvkm_gr_unitsfunction nvkm_gr_tlb_flushfunction nvkm_gr_oclass_getfunction nvkm_gr_cclass_newfunction nvkm_gr_intrfunction nvkm_gr_nonstallfunction nvkm_gr_oneinitfunction nvkm_gr_resetfunction nvkm_gr_initfunction nvkm_gr_finifunction nvkm_gr_dtorfunction nvkm_gr_ctor
Annotated Snippet
if (c++ == index) {
oclass->base = gr->func->sclass[index];
return index;
}
}
return c;
}
static int
nvkm_gr_cclass_new(struct nvkm_chan *chan, const struct nvkm_oclass *oclass,
struct nvkm_object **pobject)
{
struct nvkm_gr *gr = nvkm_gr(oclass->engine);
if (gr->func->chan_new)
return gr->func->chan_new(gr, chan, oclass, pobject);
return 0;
}
static void
nvkm_gr_intr(struct nvkm_engine *engine)
{
struct nvkm_gr *gr = nvkm_gr(engine);
gr->func->intr(gr);
}
static int
nvkm_gr_nonstall(struct nvkm_engine *engine)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->nonstall)
return gr->func->nonstall(gr);
return -EINVAL;
}
static int
nvkm_gr_oneinit(struct nvkm_engine *engine)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->oneinit)
return gr->func->oneinit(gr);
return 0;
}
static int
nvkm_gr_reset(struct nvkm_engine *engine)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->reset)
return gr->func->reset(gr);
return -ENOSYS;
}
static int
nvkm_gr_init(struct nvkm_engine *engine)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->init)
return gr->func->init(gr);
return 0;
}
static int
nvkm_gr_fini(struct nvkm_engine *engine, enum nvkm_suspend_state suspend)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->fini)
return gr->func->fini(gr, suspend != NVKM_POWEROFF);
return 0;
}
static void *
nvkm_gr_dtor(struct nvkm_engine *engine)
{
struct nvkm_gr *gr = nvkm_gr(engine);
if (gr->func->dtor)
return gr->func->dtor(gr);
return gr;
}
static const struct nvkm_engine_func
nvkm_gr = {
.dtor = nvkm_gr_dtor,
.oneinit = nvkm_gr_oneinit,
Annotation
- Immediate include surface: `priv.h`, `engine/fifo.h`.
- Detected declarations: `function files`, `function nvkm_gr_ctxsw_resume`, `function nvkm_gr_ctxsw_pause`, `function nvkm_gr_chsw_load`, `function nvkm_gr_tile`, `function nvkm_gr_units`, `function nvkm_gr_tlb_flush`, `function nvkm_gr_oclass_get`, `function nvkm_gr_cclass_new`, `function nvkm_gr_intr`.
- 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.