drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h- Extension
.h- Size
- 3492 bytes
- Lines
- 120
- 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
core/subdev.hsubdev/bios.hsubdev/bios/therm.hsubdev/timer.h
Detected Declarations
struct nvkm_therm_clkgate_initstruct nvkm_therm_clkgate_packstruct nvkm_thermenum nvkm_therm_thrs_directionenum nvkm_therm_thrs_stateenum nvkm_therm_thrsenum nvkm_therm_fan_modeenum nvkm_therm_attr_type
Annotated Snippet
struct nvkm_therm_clkgate_init {
u32 addr;
u8 count;
u32 data;
};
struct nvkm_therm_clkgate_pack {
const struct nvkm_therm_clkgate_init *init;
};
struct nvkm_therm {
const struct nvkm_therm_func *func;
struct nvkm_subdev subdev;
/* automatic thermal management */
struct nvkm_alarm alarm;
spinlock_t lock;
struct nvbios_therm_trip_point *last_trip;
int mode;
int cstate;
int suspend;
/* bios */
struct nvbios_therm_sensor bios_sensor;
/* fan priv */
struct nvkm_fan *fan;
/* alarms priv */
struct {
spinlock_t alarm_program_lock;
struct nvkm_alarm therm_poll_alarm;
enum nvkm_therm_thrs_state alarm_state[NVKM_THERM_THRS_NR];
} sensor;
/* what should be done if the card overheats */
struct {
void (*downclock)(struct nvkm_therm *, bool active);
void (*pause)(struct nvkm_therm *, bool active);
} emergency;
/* ic */
struct i2c_client *ic;
int (*fan_get)(struct nvkm_therm *);
int (*fan_set)(struct nvkm_therm *, int);
int (*attr_get)(struct nvkm_therm *, enum nvkm_therm_attr_type);
int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int);
bool clkgating_enabled;
};
int nvkm_therm_temp_get(struct nvkm_therm *);
int nvkm_therm_fan_sense(struct nvkm_therm *);
int nvkm_therm_cstate(struct nvkm_therm *, int, int);
void nvkm_therm_clkgate_init(struct nvkm_therm *,
const struct nvkm_therm_clkgate_pack *);
void nvkm_therm_clkgate_enable(struct nvkm_therm *);
void nvkm_therm_clkgate_fini(struct nvkm_therm *, bool);
int nv40_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int nv50_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int g84_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int gt215_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int gf119_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int gk104_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int gm107_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int gm200_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
int gp100_therm_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_therm **);
#endif
Annotation
- Immediate include surface: `core/subdev.h`, `subdev/bios.h`, `subdev/bios/therm.h`, `subdev/timer.h`.
- Detected declarations: `struct nvkm_therm_clkgate_init`, `struct nvkm_therm_clkgate_pack`, `struct nvkm_therm`, `enum nvkm_therm_thrs_direction`, `enum nvkm_therm_thrs_state`, `enum nvkm_therm_thrs`, `enum nvkm_therm_fan_mode`, `enum nvkm_therm_attr_type`.
- 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.