STRUCT VENUS_CORE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct venus_core β€” Kernel API Manual (core.h girlies rise up) πŸ’–

okay so bestie, we're looking at struct venus_core(9) from the Kernel API Manual, and honestly? she's the main character of core.h. literally holds core parameters valid for all instances. no cap. every Venus instance out there is looking up to this one struct like she's the group chat admin 🫢


✨ NAME ✨

struct venus_core β€” holds core parameters valid for all instances πŸ’…


🌸 SYNOPSIS 🌸

like, here's her whole personality, character for character, don't touch a single byte:

struct venus_core {
    void __iomem *base;
    void __iomem *vbif_base;
    void __iomem *cpu_base;
    void __iomem *cpu_cs_base;
    void __iomem *cpu_ic_base;
    void __iomem *wrapper_base;
    void __iomem *wrapper_tz_base;
    void __iomem *aon_base;
    int irq;
    struct clk *clks[VIDC_CLKS_NUM_MAX];
    struct clk *vcodec_clks[VIDC_VCODEC_CLKS_NUM_MAX];
    struct clk *vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX];
    struct clk *vcodec1_clks[VIDC_VCODEC_CLKS_NUM_MAX];
    struct icc_path *video_path;
    struct icc_path *cpucfg_path;
    struct dev_pm_domain_list *pmdomains;
    struct dev_pm_domain_list *opp_pmdomain;
    struct reset_control *resets[VIDC_RESETS_NUM_MAX];
    struct video_device *vdev_dec;
    struct video_device *vdev_enc;
    struct v4l2_device v4l2_dev;
    const struct venus_resources *res;
    struct device *dev;
    struct device *dev_dec;
    struct device *dev_enc;
    unsigned int use_tz;
    struct video_firmware {
      struct device *dev;
      struct iommu_domain *iommu_domain;
      size_t mapped_mem_size;
      phys_addr_t mem_phys;
      size_t mem_size;
    } fw;
    struct mutex lock;
    struct list_head instances;
    atomic_t insts_count;
    unsigned int state;
    struct completion done;
    unsigned int error;
    unsigned long sys_error;
    wait_queue_head_t sys_err_done;
    const struct hfi_core_ops *core_ops;
    const struct venus_pm_ops *pm_ops;
    struct mutex pm_lock;
    unsigned long enc_codecs;
    unsigned long dec_codecs;
    unsigned int max_sessions_supported;
    void *priv;
    const struct hfi_ops *ops;
    struct delayed_work work;
    struct hfi_plat_caps caps[MAX_CODEC_NUM];
    unsigned int codecs_count;
    unsigned int core0_usage_count;
    unsigned int core1_usage_count;
    struct dentry *root;
    struct firmware_version venus_ver;
    unsigned long dump_core;
    struct of_changeset *ocs;
    bool hwmode_dev;
   };

it's giving "longest group chat bio ever" and I'm obsessed 😭


πŸ¦‹ Members πŸ¦‹

okay so now we go member by member, and yes we're doing ALL of them, because every single field is iconic in her own way:

  • base β€” IO memory base address ✨
  • vbif_base β€” IO memory vbif base address
  • cpu_base β€” IO memory cpu base address
  • cpu_cs_base β€” IO memory cpu_cs base address
  • cpu_ic_base β€” IO memory cpu_ic base address
  • wrapper_base β€” IO memory wrapper base address πŸŽ€
  • wrapper_tz_base β€” IO memory wrapper TZ base address
  • aon_base β€” AON base address
  • irq β€” Venus irq πŸ”₯
  • clks β€” an array of struct clk pointers
  • vcodec_clks β€” an array of vcodec struct clk pointers
  • vcodec0_clks β€” an array of vcodec0 struct clk pointers
  • vcodec1_clks β€” an array of vcodec1 struct clk pointers
  • video_path β€” an interconnect handle to video to/from memory path 🌈
  • cpucfg_path β€” an interconnect handle to cpu configuration path
  • pmdomains β€” a pointer to a list of pmdomains
  • opp_pmdomain β€” an OPP power-domain
  • resets β€” an array of reset signals
  • vdev_dec β€” a reference to video device structure for decoder instances
  • vdev_enc β€” a reference to video device structure for encoder instances
  • v4l2_dev β€” a holder for v4l2 device structure
  • res β€” a reference to venus resources structure
  • dev β€” convenience struct device pointer
  • dev_dec β€” convenience struct device pointer for decoder device
  • dev_enc β€” convenience struct device pointer for encoder device
  • use_tz β€” a flag that suggests presence of trustzone πŸ•΅οΈβ€β™€οΈ
  • fw β€” structure of firmware parameters
  • lock β€” a lock for this strucure (yes, that's exactly how the original spells it, leaving it as is bestie, character for character πŸ’€)
  • instances β€” a list_head of all instances
  • insts_count β€” num of instances
  • state β€” the state of the venus core
  • done β€” a completion for sync HFI operations
  • error β€” an error returned during last HFI sync operations 😭
  • sys_error β€” an error flag that signal system error event
  • sys_err_done β€” a waitqueue to wait for system error recovery end
  • core_ops β€” the core operations
  • pm_ops β€” a pointer to pm operations
  • pm_lock β€” a lock for PM operations
  • enc_codecs β€” encoders supported by this core
  • dec_codecs β€” decoders supported by this core
  • max_sessions_supported β€” holds the maximum number of sessions πŸ‘‘
  • priv β€” a private filed for HFI operations (again, verbatim, don't come for me πŸ™ˆ)
  • ops β€” the core HFI operations
  • work β€” a delayed work for handling system fatal error πŸ’€
  • caps β€” an array of supported HFI capabilities
  • codecs_count β€” platform codecs count
  • core0_usage_count β€” usage counter for core0
  • core1_usage_count β€” usage counter for core1
  • root β€” debugfs root directory 🌸
  • venus_ver β€” the venus firmware version
  • dump_core β€” a flag indicating that a core dump is required
  • ocs β€” OF changeset pointer
  • hwmode_dev β€” a flag indicating that HW_CTRL_TRIGGER is used in clock driver ⭐
lowkey a whole personality test in struct form. every field ate, no crumbs. πŸ’…

🧚 SEE ALSO 🧚

  • Kernel file ./drivers/media/platform/qcom/venus/core.h struct venus_inst(9)

like, go read her sister page too, iykyk πŸ¦‹


and that's the whole vibe check bestie πŸ’– this came from the source ./drivers/media/platform/qcom/... and the version/date on the original footer was October 2026 β€” so yeah, she's from the future, which honestly tracks. slay, struct venus_core(9), periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from