STRUCT HVA_DEV(9)
πΈ NAME πΈ
okay so bestie, welcome to the struct hva_dev(9) page β this is the kernel API manual for struct hva_dev, and it is literally the abstraction for an hva entity. That's the whole name vibe. π
β¨ SYNOPSIS β¨
Here's the struct in all its main-character glory β code shown exactly, no edits, no cap:
struct hva_dev {
struct v4l2_device v4l2_dev;
struct video_device *vdev;
struct platform_device *pdev;
struct device *dev;
struct mutex lock;
struct v4l2_m2m_dev *m2m_dev;
struct hva_ctx *instances[HVA_MAX_INSTANCES];
unsigned int nb_of_instances;
unsigned int instance_id;
void __iomem *regs;
u32 esram_addr;
u32 esram_size;
struct clk *clk;
int irq_its;
int irq_err;
struct workqueue_struct *work_queue;
struct mutex protect_mutex;
struct completion interrupt;
unsigned long int ip_version;
const struct hva_enc *encoders[HVA_MAX_ENCODERS];
u32 nb_of_encoders;
u32 pixelformats[HVA_MAX_FORMATS];
u32 nb_of_pixelformats;
u32 streamformats[HVA_MAX_FORMATS];
u32 nb_of_streamformats;
u32 sfl_reg;
u32 sts_reg;
u32 lmi_err_reg;
u32 emi_err_reg;
u32 hec_mif_err_reg;
#ifdef CONFIG_VIDEO_STI_HVA_DEBUGFS;
struct hva_dev_dbg dbg;
#endif;
};
π Members π
okay bestie, here's the field-by-field tour. No skipping, periodt. π
v4l2_devβ the V4L2 device.vdevβ the video device.pdevβ the platform device.devβ the device.lockβ the mutex used for critical sections & V4L2 ops serialization.m2m_devβ the memory-to-memory V4L2 device information.instancesβ the opened instances.nb_of_instancesβ the number of opened instances.instance_idβ a rolling counter identifying an instance (debug purpose).regsβ the register io memory access.esram_addrβ the esram address.esram_sizeβ the esram size.clkβ the hva clock.irq_itsβ the status interruption.irq_errβ the error interruption.work_queueβ the work queue to handle the encode jobs.protect_mutexβ the mutex used to lock access of hardware.interruptβ the completion interrupt.ip_versionβ the IP hardware version.encodersβ the registered encoders.nb_of_encodersβ the number of registered encoders.pixelformatsβ the supported uncompressed video formats.nb_of_pixelformatsβ the number of supported uncompressed video formats.streamformatsβ the supported compressed video formats.nb_of_streamformatsβ the number of supported compressed video formats.sfl_regβ the status fifo level register value.sts_regβ the status register value.lmi_err_regβ the local memory interface error register value.emi_err_regβ the external memory interface error register value.hec_mif_err_regβ the HEC memory interface error register value.dbgβ the device debug info. This one is tucked inside#ifdef CONFIG_VIDEO_STI_HVA_DEBUGFS;in the struct, iykyk. π
π¦ SEE ALSO π¦
Peep the kernel file ./drivers/media/platform/st/sti/hva/hva.h, plus the whole struct fam:
struct hva_frameinfo(9)struct hva_streaminfo(9)struct hva_controls(9)struct hva_frame(9)struct hva_stream(9)struct hva_ctx_dbg(9)struct hva_ctx(9)struct hva_dev_dbg(9)struct hva_enc(9)
Signed off with love from ./drivers/media/platform/st/st..., dated October 2026, for the struct hva_dev(9) girlies ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms