drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fifo.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fifo.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fifo.c- Extension
.c- Size
- 7596 bytes
- Lines
- 218
- 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
rm/rm.hsubdev/mmu.hengine/fifo/priv.hengine/fifo/chan.hengine/fifo/runl.hnvhw/drf.hnvrm/fifo.hnvrm/engine.h
Detected Declarations
function Copyrightfunction r570_fifo_rc_triggeredfunction r570_fifo_ectx_sizefunction nvkm_runl_foreachfunction r570_fifo_xlat_rm_engine_type
Annotated Snippet
nvkm_runl_foreach(runl, fifo) {
nvkm_runl_foreach_engn(engn, runl) {
if (engn->rm.desc == ctrl->constructedFalconsTable[i].engDesc) {
engn->rm.size =
ctrl->constructedFalconsTable[i].ctxBufferSize;
break;
}
}
}
}
nvkm_gsp_rm_ctrl_done(&gsp->internal.device.subdevice, ctrl);
return 0;
}
static int
r570_fifo_xlat_rm_engine_type(u32 rm, enum nvkm_subdev_type *ptype, int *p2080)
{
#define RM_ENGINE_TYPE(RM,NVKM,INST) \
RM_ENGINE_TYPE_##RM: \
*ptype = NVKM_ENGINE_##NVKM; \
*p2080 = NV2080_ENGINE_TYPE_##RM; \
return INST
switch (rm) {
case RM_ENGINE_TYPE( GR0, GR, 0);
case RM_ENGINE_TYPE( COPY0, CE, 0);
case RM_ENGINE_TYPE( COPY1, CE, 1);
case RM_ENGINE_TYPE( COPY2, CE, 2);
case RM_ENGINE_TYPE( COPY3, CE, 3);
case RM_ENGINE_TYPE( COPY4, CE, 4);
case RM_ENGINE_TYPE( COPY5, CE, 5);
case RM_ENGINE_TYPE( COPY6, CE, 6);
case RM_ENGINE_TYPE( COPY7, CE, 7);
case RM_ENGINE_TYPE( COPY8, CE, 8);
case RM_ENGINE_TYPE( COPY9, CE, 9);
case RM_ENGINE_TYPE( COPY10, CE, 10);
case RM_ENGINE_TYPE( COPY11, CE, 11);
case RM_ENGINE_TYPE( COPY12, CE, 12);
case RM_ENGINE_TYPE( COPY13, CE, 13);
case RM_ENGINE_TYPE( COPY14, CE, 14);
case RM_ENGINE_TYPE( COPY15, CE, 15);
case RM_ENGINE_TYPE( COPY16, CE, 16);
case RM_ENGINE_TYPE( COPY17, CE, 17);
case RM_ENGINE_TYPE( COPY18, CE, 18);
case RM_ENGINE_TYPE( COPY19, CE, 19);
case RM_ENGINE_TYPE( NVDEC0, NVDEC, 0);
case RM_ENGINE_TYPE( NVDEC1, NVDEC, 1);
case RM_ENGINE_TYPE( NVDEC2, NVDEC, 2);
case RM_ENGINE_TYPE( NVDEC3, NVDEC, 3);
case RM_ENGINE_TYPE( NVDEC4, NVDEC, 4);
case RM_ENGINE_TYPE( NVDEC5, NVDEC, 5);
case RM_ENGINE_TYPE( NVDEC6, NVDEC, 6);
case RM_ENGINE_TYPE( NVDEC7, NVDEC, 7);
case RM_ENGINE_TYPE( NVENC0, NVENC, 0);
case RM_ENGINE_TYPE( NVENC1, NVENC, 1);
case RM_ENGINE_TYPE( NVENC2, NVENC, 2);
case RM_ENGINE_TYPE( NVENC3, NVENC, 3);
case RM_ENGINE_TYPE(NVJPEG0, NVJPG, 0);
case RM_ENGINE_TYPE(NVJPEG1, NVJPG, 1);
case RM_ENGINE_TYPE(NVJPEG2, NVJPG, 2);
case RM_ENGINE_TYPE(NVJPEG3, NVJPG, 3);
case RM_ENGINE_TYPE(NVJPEG4, NVJPG, 4);
case RM_ENGINE_TYPE(NVJPEG5, NVJPG, 5);
case RM_ENGINE_TYPE(NVJPEG6, NVJPG, 6);
case RM_ENGINE_TYPE(NVJPEG7, NVJPG, 7);
case RM_ENGINE_TYPE( SW, SW, 0);
case RM_ENGINE_TYPE( SEC2, SEC2, 0);
case RM_ENGINE_TYPE( OFA0, OFA, 0);
case RM_ENGINE_TYPE( OFA1, OFA, 1);
default:
return -EINVAL;
}
#undef RM_ENGINE_TYPE
}
const struct nvkm_rm_api_fifo
r570_fifo = {
.xlat_rm_engine_type = r570_fifo_xlat_rm_engine_type,
.ectx_size = r570_fifo_ectx_size,
.rsvd_chids = 1,
.rc_triggered = r570_fifo_rc_triggered,
.chan = {
.alloc = r570_chan_alloc,
},
};
Annotation
- Immediate include surface: `rm/rm.h`, `subdev/mmu.h`, `engine/fifo/priv.h`, `engine/fifo/chan.h`, `engine/fifo/runl.h`, `nvhw/drf.h`, `nvrm/fifo.h`, `nvrm/engine.h`.
- Detected declarations: `function Copyright`, `function r570_fifo_rc_triggered`, `function r570_fifo_ectx_size`, `function nvkm_runl_foreach`, `function r570_fifo_xlat_rm_engine_type`.
- 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.