drivers/media/platform/qcom/venus/pm_helpers.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/pm_helpers.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/venus/pm_helpers.h- Extension
.h- Size
- 1569 bytes
- Lines
- 67
- Domain
- Driver Families
- Bucket
- drivers/media
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct devicestruct venus_corestruct venus_pm_opsfunction venus_pm_load_scalefunction venus_pm_acquire_corefunction venus_pm_release_core
Annotated Snippet
struct venus_pm_ops {
int (*core_get)(struct venus_core *core);
void (*core_put)(struct venus_core *core);
int (*core_power)(struct venus_core *core, int on);
int (*vdec_get)(struct device *dev);
void (*vdec_put)(struct device *dev);
int (*vdec_power)(struct device *dev, int on);
int (*venc_get)(struct device *dev);
void (*venc_put)(struct device *dev);
int (*venc_power)(struct device *dev, int on);
int (*coreid_power)(struct venus_inst *inst, int on);
int (*load_scale)(struct venus_inst *inst);
};
const struct venus_pm_ops *venus_pm_get(enum hfi_version version);
static inline int venus_pm_load_scale(struct venus_inst *inst)
{
struct venus_core *core = inst->core;
if (!core->pm_ops || !core->pm_ops->load_scale)
return 0;
return core->pm_ops->load_scale(inst);
}
static inline int venus_pm_acquire_core(struct venus_inst *inst)
{
struct venus_core *core = inst->core;
const struct venus_pm_ops *pm_ops = core->pm_ops;
int ret = 0;
if (pm_ops && pm_ops->coreid_power)
ret = pm_ops->coreid_power(inst, POWER_ON);
return ret;
}
static inline int venus_pm_release_core(struct venus_inst *inst)
{
struct venus_core *core = inst->core;
const struct venus_pm_ops *pm_ops = core->pm_ops;
int ret = 0;
if (pm_ops && pm_ops->coreid_power)
ret = pm_ops->coreid_power(inst, POWER_OFF);
return ret;
}
#endif
Annotation
- Detected declarations: `struct device`, `struct venus_core`, `struct venus_pm_ops`, `function venus_pm_load_scale`, `function venus_pm_acquire_core`, `function venus_pm_release_core`.
- Atlas domain: Driver Families / drivers/media.
- 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.