STRUCT HVA_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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