drivers/gpu/drm/nouveau/nouveau_drv.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nouveau_drv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nouveau_drv.h- Extension
.h- Size
- 10081 bytes
- Lines
- 408
- 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
linux/notifier.hnvif/client.hnvif/device.hnvif/ioctl.hnvif/mmu.hnvif/vmm.hdrm/drm_connector.hdrm/drm_device.hdrm/drm_drv.hdrm/drm_file.hdrm/drm_print.hdrm/ttm/ttm_bo.hdrm/ttm/ttm_placement.hdrm/drm_audio_component.huapi/drm/nouveau_drm.hnouveau_fence.hnouveau_bios.hnouveau_sched.hnouveau_vmm.hnouveau_uvmm.hnvif/object.hnvif/parent.hnvkm/core/tegra.hsubdev/bios.hsubdev/fb.hsubdev/gpio.hsubdev/clk.hsubdev/i2c.hsubdev/timer.hsubdev/therm.hengine/gr.h
Detected Declarations
struct nouveau_channelstruct platform_devicestruct nouveau_drm_tilestruct nouveau_clistruct nouveau_cli_workstruct nouveau_drmenum nouveau_drm_object_routeenum nouveau_drm_handlefunction nouveau_cli_uvmmfunction nouveau_cli_uvmm_lockedfunction nouveau_cli_vmmfunction __nouveau_cli_disable_uvmm_noinitfunction nouveau_cli_disable_uvmm_noinitfunction nouveau_clifunction u_freefunction u_memcpyafunction nouveau_drmfunction nouveau_drm_use_coherent_gpu_mappingfunction places
Annotated Snippet
struct nouveau_drm_tile {
struct nouveau_fence *fence;
bool used;
};
enum nouveau_drm_object_route {
NVDRM_OBJECT_NVIF = NVIF_IOCTL_V0_OWNER_NVIF,
NVDRM_OBJECT_USIF,
NVDRM_OBJECT_ABI16,
NVDRM_OBJECT_ANY = NVIF_IOCTL_V0_OWNER_ANY,
};
enum nouveau_drm_handle {
NVDRM_CHAN = 0xcccc0000, /* |= client chid */
NVDRM_NVSW = 0x55550000,
};
struct nouveau_cli {
struct nvif_client base;
struct nouveau_drm *drm;
struct mutex mutex;
struct nvif_device device;
struct nvif_mmu mmu;
struct nouveau_vmm vmm;
struct nouveau_vmm svm;
struct {
struct nouveau_uvmm *ptr;
bool disabled;
} uvmm;
struct nouveau_sched *sched;
const struct nvif_mclass *mem;
struct list_head head;
void *abi16;
struct list_head objects;
char name[32];
struct work_struct work;
struct list_head worker;
struct mutex lock;
};
struct nouveau_cli_work {
void (*func)(struct nouveau_cli_work *);
struct nouveau_cli *cli;
struct list_head head;
struct dma_fence *fence;
struct dma_fence_cb cb;
};
static inline struct nouveau_uvmm *
nouveau_cli_uvmm(struct nouveau_cli *cli)
{
return cli ? cli->uvmm.ptr : NULL;
}
static inline struct nouveau_uvmm *
nouveau_cli_uvmm_locked(struct nouveau_cli *cli)
{
struct nouveau_uvmm *uvmm;
mutex_lock(&cli->mutex);
uvmm = nouveau_cli_uvmm(cli);
mutex_unlock(&cli->mutex);
return uvmm;
}
static inline struct nouveau_vmm *
nouveau_cli_vmm(struct nouveau_cli *cli)
{
struct nouveau_uvmm *uvmm;
uvmm = nouveau_cli_uvmm(cli);
if (uvmm)
return &uvmm->vmm;
if (cli->svm.cli)
return &cli->svm;
return &cli->vmm;
}
static inline void
__nouveau_cli_disable_uvmm_noinit(struct nouveau_cli *cli)
{
Annotation
- Immediate include surface: `linux/notifier.h`, `nvif/client.h`, `nvif/device.h`, `nvif/ioctl.h`, `nvif/mmu.h`, `nvif/vmm.h`, `drm/drm_connector.h`, `drm/drm_device.h`.
- Detected declarations: `struct nouveau_channel`, `struct platform_device`, `struct nouveau_drm_tile`, `struct nouveau_cli`, `struct nouveau_cli_work`, `struct nouveau_drm`, `enum nouveau_drm_object_route`, `enum nouveau_drm_handle`, `function nouveau_cli_uvmm`, `function nouveau_cli_uvmm_locked`.
- 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.