drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgp102.c- Extension
.c- Size
- 733 bytes
- Lines
- 32
- 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
ram.hsubdev/bios.h
Detected Declarations
function gp102_ram_new
Annotated Snippet
// SPDX-License-Identifier: MIT
#include "ram.h"
#include <subdev/bios.h>
static const struct nvkm_ram_func
gp102_ram = {
.init = gp100_ram_init,
};
int
gp102_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
{
enum nvkm_ram_type type = nvkm_fb_bios_memtype(fb->subdev.device->bios);
const u32 rsvd_head = ( 256 * 1024); /* vga memory */
const u32 rsvd_tail = (1024 * 1024); /* vbios etc */
u64 size = fb->func->vidmem.size(fb);
int ret;
ret = nvkm_ram_new_(&gp102_ram, fb, type, size, pram);
if (ret)
return ret;
nvkm_mm_fini(&(*pram)->vram);
return nvkm_mm_init(&(*pram)->vram, NVKM_RAM_MM_NORMAL,
rsvd_head >> NVKM_RAM_MM_SHIFT,
(size - rsvd_head - rsvd_tail) >> NVKM_RAM_MM_SHIFT,
1);
}
Annotation
- Immediate include surface: `ram.h`, `subdev/bios.h`.
- Detected declarations: `function gp102_ram_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.