drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c- Extension
.c- Size
- 4048 bytes
- Lines
- 137
- 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.hcore/gpuobj.hcore/object.hsubdev/timer.hnvif/class.h
Detected Declarations
function filesfunction nv50_mpeg_intrfunction nv50_mpeg_initfunction nv50_mpeg_new
Annotated Snippet
if (type == 0x00000020 && mthd == 0x0000) {
nvkm_wr32(device, 0x00b308, 0x00000100);
show &= ~0x01000000;
}
}
if (show) {
nvkm_info(subdev, "%08x %08x %08x %08x\n",
stat, type, mthd, data);
}
nvkm_wr32(device, 0x00b100, stat);
nvkm_wr32(device, 0x00b230, 0x00000001);
}
int
nv50_mpeg_init(struct nvkm_engine *mpeg)
{
struct nvkm_subdev *subdev = &mpeg->subdev;
struct nvkm_device *device = subdev->device;
nvkm_wr32(device, 0x00b32c, 0x00000000);
nvkm_wr32(device, 0x00b314, 0x00000100);
nvkm_wr32(device, 0x00b0e0, 0x0000001a);
nvkm_wr32(device, 0x00b220, 0x00000044);
nvkm_wr32(device, 0x00b300, 0x00801ec1);
nvkm_wr32(device, 0x00b390, 0x00000000);
nvkm_wr32(device, 0x00b394, 0x00000000);
nvkm_wr32(device, 0x00b398, 0x00000000);
nvkm_mask(device, 0x00b32c, 0x00000001, 0x00000001);
nvkm_wr32(device, 0x00b100, 0xffffffff);
nvkm_wr32(device, 0x00b140, 0xffffffff);
if (nvkm_msec(device, 2000,
if (!(nvkm_rd32(device, 0x00b200) & 0x00000001))
break;
) < 0) {
nvkm_error(subdev, "timeout %08x\n",
nvkm_rd32(device, 0x00b200));
return -EBUSY;
}
return 0;
}
static const struct nvkm_engine_func
nv50_mpeg = {
.init = nv50_mpeg_init,
.intr = nv50_mpeg_intr,
.cclass = &nv50_mpeg_cclass,
.sclass = {
{ -1, -1, NV31_MPEG, &nv31_mpeg_object },
{}
}
};
int
nv50_mpeg_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_engine **pmpeg)
{
return nvkm_engine_new_(&nv50_mpeg, device, type, inst, true, pmpeg);
}
Annotation
- Immediate include surface: `priv.h`, `core/gpuobj.h`, `core/object.h`, `subdev/timer.h`, `nvif/class.h`.
- Detected declarations: `function files`, `function nv50_mpeg_intr`, `function nv50_mpeg_init`, `function nv50_mpeg_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.