drivers/gpu/drm/nouveau/nvkm/core/oproxy.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/core/oproxy.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/core/oproxy.c- Extension
.c- Size
- 4891 bytes
- Lines
- 186
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
core/oproxy.h
Detected Declarations
function filesfunction nvkm_oproxy_ntfyfunction nvkm_oproxy_mapfunction nvkm_oproxy_unmapfunction nvkm_oproxy_bindfunction nvkm_oproxy_sclassfunction nvkm_oproxy_ueventfunction nvkm_oproxy_finifunction nvkm_oproxy_initfunction nvkm_oproxy_dtorfunction nvkm_oproxy_ctorfunction nvkm_oproxy_new_
Annotated Snippet
#include <core/oproxy.h>
static int
nvkm_oproxy_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
{
return nvkm_object_mthd(nvkm_oproxy(object)->object, mthd, data, size);
}
static int
nvkm_oproxy_ntfy(struct nvkm_object *object, u32 mthd,
struct nvkm_event **pevent)
{
return nvkm_object_ntfy(nvkm_oproxy(object)->object, mthd, pevent);
}
static int
nvkm_oproxy_map(struct nvkm_object *object, void *argv, u32 argc,
enum nvkm_object_map *type, u64 *addr, u64 *size)
{
struct nvkm_oproxy *oproxy = nvkm_oproxy(object);
return nvkm_object_map(oproxy->object, argv, argc, type, addr, size);
}
static int
nvkm_oproxy_unmap(struct nvkm_object *object)
{
struct nvkm_oproxy *oproxy = nvkm_oproxy(object);
if (unlikely(!oproxy->object))
return 0;
return nvkm_object_unmap(oproxy->object);
}
static int
nvkm_oproxy_bind(struct nvkm_object *object, struct nvkm_gpuobj *parent,
int align, struct nvkm_gpuobj **pgpuobj)
{
return nvkm_object_bind(nvkm_oproxy(object)->object,
parent, align, pgpuobj);
}
static int
nvkm_oproxy_sclass(struct nvkm_object *object, int index,
struct nvkm_oclass *oclass)
{
struct nvkm_oproxy *oproxy = nvkm_oproxy(object);
oclass->parent = oproxy->object;
if (!oproxy->object->func->sclass)
return -ENODEV;
return oproxy->object->func->sclass(oproxy->object, index, oclass);
}
static int
nvkm_oproxy_uevent(struct nvkm_object *object, void *argv, u32 argc,
struct nvkm_uevent *uevent)
{
struct nvkm_oproxy *oproxy = nvkm_oproxy(object);
if (!oproxy->object->func->uevent)
return -ENOSYS;
return oproxy->object->func->uevent(oproxy->object, argv, argc, uevent);
}
static int
nvkm_oproxy_fini(struct nvkm_object *object, enum nvkm_suspend_state suspend)
{
struct nvkm_oproxy *oproxy = nvkm_oproxy(object);
int ret;
if (oproxy->func->fini[0]) {
ret = oproxy->func->fini[0](oproxy, suspend);
if (ret && suspend)
return ret;
}
if (oproxy->object->func->fini) {
ret = oproxy->object->func->fini(oproxy->object, suspend);
if (ret && suspend)
return ret;
}
if (oproxy->func->fini[1]) {
ret = oproxy->func->fini[1](oproxy, suspend);
if (ret && suspend)
return ret;
}
return 0;
Annotation
- Immediate include surface: `core/oproxy.h`.
- Detected declarations: `function files`, `function nvkm_oproxy_ntfy`, `function nvkm_oproxy_map`, `function nvkm_oproxy_unmap`, `function nvkm_oproxy_bind`, `function nvkm_oproxy_sclass`, `function nvkm_oproxy_uevent`, `function nvkm_oproxy_fini`, `function nvkm_oproxy_init`, `function nvkm_oproxy_dtor`.
- 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.