drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c- Extension
.c- Size
- 33720 bytes
- Lines
- 1262
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
priv.hchan.hhdmi.hhead.hior.houtp.hcore/ramht.hsubdev/timer.hnvif/class.h
Detected Declarations
function filesfunction gf119_sor_hda_eldfunction gf119_sor_hda_hpdfunction gf119_sor_dp_watermarkfunction gf119_sor_dp_audio_symfunction gf119_sor_dp_audiofunction gf119_sor_dp_vcpifunction gf119_sor_dp_drivefunction gf119_sor_dp_patternfunction gf119_sor_dp_linksfunction gf119_sor_hdmi_infoframe_vsifunction gf119_sor_hdmi_infoframe_avifunction gf119_sor_hdmi_ctrlfunction gf119_sor_clockfunction gf119_sor_statefunction gf119_sor_newfunction gf119_sor_cntfunction gf119_dac_clockfunction gf119_dac_statefunction gf119_dac_newfunction gf119_dac_cntfunction gf119_head_vblank_putfunction gf119_head_vblank_getfunction gf119_head_rgclkfunction gf119_head_statefunction gf119_head_newfunction gf119_head_cntfunction gf119_disp_chan_uevent_finifunction gf119_disp_chan_uevent_initfunction gf119_disp_chan_intrfunction gf119_disp_pioc_finifunction gf119_disp_pioc_initfunction gf119_disp_dmac_bindfunction gf119_disp_dmac_finifunction gf119_disp_dmac_initfunction gf119_disp_core_finifunction gf119_disp_core_initfunction gf119_disp_superfunction list_for_each_entryfunction list_for_each_entryfunction list_for_each_entryfunction list_for_each_entryfunction list_for_each_entryfunction list_for_each_entryfunction gf119_disp_intr_errorfunction gf119_disp_intrfunction list_for_each_entryfunction gf119_disp_fini
Annotated Snippet
list_for_each_entry(head, &disp->heads, head) {
if (!(mask[head->id] & 0x00001000))
continue;
nv50_disp_super_1_0(disp, head);
}
} else
if (disp->super.pending & 0x00000002) {
list_for_each_entry(head, &disp->heads, head) {
if (!(mask[head->id] & 0x00001000))
continue;
nv50_disp_super_2_0(disp, head);
}
list_for_each_entry(head, &disp->heads, head) {
if (!(mask[head->id] & 0x00010000))
continue;
nv50_disp_super_2_1(disp, head);
}
list_for_each_entry(head, &disp->heads, head) {
if (!(mask[head->id] & 0x00001000))
continue;
nv50_disp_super_2_2(disp, head);
}
} else
if (disp->super.pending & 0x00000004) {
list_for_each_entry(head, &disp->heads, head) {
if (!(mask[head->id] & 0x00001000))
continue;
nv50_disp_super_3_0(disp, head);
}
}
list_for_each_entry(head, &disp->heads, head)
nvkm_wr32(device, 0x6101d4 + (head->id * 0x800), 0x00000000);
nvkm_wr32(device, 0x6101d0, 0x80000000);
mutex_unlock(&disp->super.mutex);
}
void
gf119_disp_intr_error(struct nvkm_disp *disp, int chid)
{
struct nvkm_subdev *subdev = &disp->engine.subdev;
struct nvkm_device *device = subdev->device;
u32 stat = nvkm_rd32(device, 0x6101f0 + (chid * 12));
u32 type = (stat & 0x00007000) >> 12;
u32 mthd = (stat & 0x00000ffc);
u32 data = nvkm_rd32(device, 0x6101f4 + (chid * 12));
u32 code = nvkm_rd32(device, 0x6101f8 + (chid * 12));
const struct nvkm_enum *reason =
nvkm_enum_find(nv50_disp_intr_error_type, type);
nvkm_error(subdev, "chid %d stat %08x reason %d [%s] mthd %04x "
"data %08x code %08x\n",
chid, stat, type, reason ? reason->name : "",
mthd, data, code);
if (chid < ARRAY_SIZE(disp->chan)) {
switch (mthd) {
case 0x0080:
nv50_disp_chan_mthd(disp->chan[chid], NV_DBG_ERROR);
break;
default:
break;
}
}
nvkm_wr32(device, 0x61009c, (1 << chid));
nvkm_wr32(device, 0x6101f0 + (chid * 12), 0x90000000);
}
void
gf119_disp_intr(struct nvkm_disp *disp)
{
struct nvkm_subdev *subdev = &disp->engine.subdev;
struct nvkm_device *device = subdev->device;
struct nvkm_head *head;
u32 intr = nvkm_rd32(device, 0x610088);
if (intr & 0x00000001) {
u32 stat = nvkm_rd32(device, 0x61008c);
while (stat) {
int chid = __ffs(stat); stat &= ~(1 << chid);
nv50_disp_chan_uevent_send(disp, chid);
nvkm_wr32(device, 0x61008c, 1 << chid);
}
intr &= ~0x00000001;
}
if (intr & 0x00000002) {
u32 stat = nvkm_rd32(device, 0x61009c);
Annotation
- Immediate include surface: `priv.h`, `chan.h`, `hdmi.h`, `head.h`, `ior.h`, `outp.h`, `core/ramht.h`, `subdev/timer.h`.
- Detected declarations: `function files`, `function gf119_sor_hda_eld`, `function gf119_sor_hda_hpd`, `function gf119_sor_dp_watermark`, `function gf119_sor_dp_audio_sym`, `function gf119_sor_dp_audio`, `function gf119_sor_dp_vcpi`, `function gf119_sor_dp_drive`, `function gf119_sor_dp_pattern`, `function gf119_sor_dp_links`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.