drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c- Extension
.c- Size
- 2014 bytes
- Lines
- 62
- 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
priv.hsubdev/gsp.h
Detected Declarations
function filesfunction gp100_therm_new
Annotated Snippet
#include "priv.h"
#include <subdev/gsp.h>
static int
gp100_temp_get(struct nvkm_therm *therm)
{
struct nvkm_device *device = therm->subdev.device;
struct nvkm_subdev *subdev = &therm->subdev;
u32 tsensor = nvkm_rd32(device, 0x020460);
u32 inttemp = (tsensor & 0x0001fff8);
/* device SHADOWed */
if (tsensor & 0x40000000)
nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n");
/* device valid */
if (tsensor & 0x20000000)
return (inttemp >> 8);
else
return -ENODEV;
}
static const struct nvkm_therm_func
gp100_therm = {
.temp_get = gp100_temp_get,
.program_alarms = nvkm_therm_program_alarms_polling,
};
int
gp100_therm_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_therm **ptherm)
{
if (nvkm_gsp_rm(device->gsp))
return -ENODEV;
return nvkm_therm_new_(&gp100_therm, device, type, inst, ptherm);
}
Annotation
- Immediate include surface: `priv.h`, `subdev/gsp.h`.
- Detected declarations: `function files`, `function gp100_therm_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.