drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c- Extension
.c- Size
- 18132 bytes
- Lines
- 666
- 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
outp.hdp.hhead.hior.hsubdev/i2c.hnvif/if0012.h
Detected Declarations
function filesfunction nvkm_uoutp_mthd_dp_mst_id_putfunction nvkm_uoutp_mthd_dp_mst_id_getfunction nvkm_uoutp_mthd_dp_sstfunction nvkm_uoutp_mthd_dp_drivefunction nvkm_uoutp_mthd_dp_trainfunction nvkm_uoutp_mthd_dp_ratesfunction nvkm_uoutp_mthd_dp_aux_xferfunction nvkm_uoutp_mthd_dp_aux_pwrfunction nvkm_uoutp_mthd_hda_eldfunction nvkm_uoutp_mthd_infoframefunction nvkm_uoutp_mthd_hdmifunction nvkm_uoutp_mthd_lvdsfunction nvkm_uoutp_mthd_bl_setfunction nvkm_uoutp_mthd_bl_getfunction nvkm_uoutp_mthd_releasefunction nvkm_uoutp_mthd_acquirefunction nvkm_uoutp_mthd_inheritfunction nvkm_uoutp_mthd_load_detectfunction nvkm_uoutp_mthd_edid_getfunction nvkm_uoutp_mthd_detectfunction nvkm_uoutp_mthd_acquiredfunction nvkm_uoutp_mthd_noacquirefunction nvkm_uoutp_mthdfunction nvkm_uoutp_dtorfunction nvkm_uoutp_newfunction list_for_each_entry
Annotated Snippet
if (ret >= 0) {
args->v0.level = ret;
ret = 0;
}
} else {
ret = -EINVAL;
}
return ret;
}
static int
nvkm_uoutp_mthd_release(struct nvkm_outp *outp, void *argv, u32 argc)
{
union nvif_outp_release_args *args = argv;
if (argc != sizeof(args->vn))
return -ENOSYS;
if (!outp->ior)
return -EINVAL;
outp->func->release(outp);
return 0;
}
static int
nvkm_uoutp_mthd_acquire(struct nvkm_outp *outp, void *argv, u32 argc)
{
union nvif_outp_acquire_args *args = argv;
int ret;
if (argc != sizeof(args->v0) || args->v0.version != 0)
return -ENOSYS;
if (outp->ior && args->v0.type <= NVIF_OUTP_ACQUIRE_V0_PIOR)
return -EBUSY;
switch (args->v0.type) {
case NVIF_OUTP_ACQUIRE_V0_DAC:
case NVIF_OUTP_ACQUIRE_V0_PIOR:
ret = outp->func->acquire(outp, false);
break;
case NVIF_OUTP_ACQUIRE_V0_SOR:
ret = outp->func->acquire(outp, args->v0.sor.hda);
break;
default:
ret = -EINVAL;
break;
}
if (ret)
return ret;
args->v0.or = outp->ior->id;
args->v0.link = outp->ior->asy.link;
return 0;
}
static int
nvkm_uoutp_mthd_inherit(struct nvkm_outp *outp, void *argv, u32 argc)
{
union nvif_outp_inherit_args *args = argv;
struct nvkm_ior *ior;
int ret = 0;
if (argc != sizeof(args->v0) || args->v0.version != 0)
return -ENOSYS;
/* Ensure an ior is hooked up to this outp already */
ior = outp->func->inherit(outp);
if (!ior || !ior->arm.head)
return -ENODEV;
/* With iors, there will be a separate output path for each type of connector - and all of
* them will appear to be hooked up. Figure out which one is actually the one we're using
* based on the protocol we were given over nvif
*/
switch (args->v0.proto) {
case NVIF_OUTP_INHERIT_V0_TMDS:
if (ior->arm.proto != TMDS)
return -ENODEV;
break;
case NVIF_OUTP_INHERIT_V0_DP:
if (ior->arm.proto != DP)
return -ENODEV;
break;
case NVIF_OUTP_INHERIT_V0_LVDS:
if (ior->arm.proto != LVDS)
return -ENODEV;
break;
case NVIF_OUTP_INHERIT_V0_TV:
Annotation
- Immediate include surface: `outp.h`, `dp.h`, `head.h`, `ior.h`, `subdev/i2c.h`, `nvif/if0012.h`.
- Detected declarations: `function files`, `function nvkm_uoutp_mthd_dp_mst_id_put`, `function nvkm_uoutp_mthd_dp_mst_id_get`, `function nvkm_uoutp_mthd_dp_sst`, `function nvkm_uoutp_mthd_dp_drive`, `function nvkm_uoutp_mthd_dp_train`, `function nvkm_uoutp_mthd_dp_rates`, `function nvkm_uoutp_mthd_dp_aux_xfer`, `function nvkm_uoutp_mthd_dp_aux_pwr`, `function nvkm_uoutp_mthd_hda_eld`.
- 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.