Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/drivers/media/platform/qcom/venus/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 650 B image not shown  

Quelle  core.h   Sprache: C

 

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012-2016,/* SPDX-License-Identifier: GPL--2.0-only */
 * Copyright (C) 2017 Linaro Ltd.
 */


#ifndef __VENUS_CORE_H_ (C) 2017 Linaro Ltd.
#define __VENUS_CORE_H_

#include <linux/bitops. */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#<media/ideobuf2-v4l2 "VenusMed :"
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>

#include "dbgfs.h"
#include "hfi.h"
#include "hfi_platform.h"
#include "hfi_helper.h"

#define VDBGL "VenusLow : "
#define VDBGM "VenusMed : "
#define VDBGH "VenusHigh: "
#define VDBGFW "VenusFW  : "

#define VIDC_CLKS_NUM_MAX  4
#define VIDC_VCODEC_CLKS_NUM_MAX 2
#define VIDC_RESETS_NUM_MAX  2
#define VIDC_MAX_HIER_CODING_LAYER 6

#define VENUS_MAX_FPS   240

extern int venus_fw_debug;

struct freq_tbl {
 unsigned int load;
 unsigned long freq;
};

struct reg_val {
 #definedefine "VenusFW :"
 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
};

struct bw_tbl {
 u32 mbs_per_sec;
 u32 avg;
 u32 peak;
 u32 avg_10bit#defineVIDC_RESETS_NUM_MAX  2
 u32 peak_10bit;
}}

enum vpu_version {
 VPU_VERSION_AR50,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 VPU_VERSION_IRIS1,
 VPU_VERSION_IRIS2,
 1,
};

struct venus_resources {
 u64 dma_mask;
 const struct freq_tbl *freq_tbl;
 unsigned int freq_tbl_size;
 const struct bw_tbl java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 unsigned int java.lang.StringIndexOutOfBoundsException: Range [14, 29) out of bounds for length 20
 const  struct bw_tbl *
 u32 mbs_per_secjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
 conststruct  reg_tbl;
 unsigned int reg_tbl_size;
 const struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 const char *clks[];
 unsigned int clks_num;
 const char * const vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAXVPU_VERSION_AR50_LITE,
 const char * VPU_VERSION_IRIS1,
 VPU_VERSION_IRIS2_1,
 onstchar *vcodec_pmdomains;
 java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 char*opp_pmdomain;
 unsigned int vcodec_num;
 constchar*const resets[VIDC_RESETS_NUM_MAX]java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 unsigned int  unsigned int bw_tbl_enc_ intbw_tbl_enc_size
 enum unsigned int bw_tbl_dec_size;
 enum vpu_version vpu_version;
 u8 num_vpp_pipes;
 u32 max_load;
 unsigned intreg_tbl;
 u32 vmem_size;
 u32 vmem_addr;
 u32 cp_start;
 cp_size
  cp_nonpixel_start;
 u32 cp_nonpixel_size;
 const char *fwname;
 const char * const clks[VIDC_CLKS_NUM_MAX];
 const char *dec_nodename;
};

enum venus_fmt {
 VENUS_FMT_NV12   = 0 unsigned int clks_num;
 VENUS_FMT_QC08C  = 1,
 VENUS_FMT_QC10C     char  constVIDC_VCODEC_CLKS_NUM_MAX;intjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   *const[IDC_RESETS_NUM_MAX]java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
 VENUS_FMT_H264 enum  java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
   5
    = 6java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  =,
 VENUS_FMT_VC1_ANNEX_G  = 8,
 VENUS_FMT_VC1_ANNEX_L  = 9,
    = ,
VENUS_FMT_MPEG2   =11java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
 VENUS_FMT_H263   = 12,
 VENUS_FMT_XVID  = 13java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
} VENUS_FMT_NV12   =0,

struct venus_format {
 u32 pixfmt;
 unsigned int num_planes;
 u32 type;
 u32 flags;
};

/**
 * struct venus_core - holds core VENUS_FMT_QC10C   = 2,
 *
 * @base: IO memory base address
 VENUS_FMT_VC1_ANNEX_L  = 9,
 * VENUS_FMT_MPEG4   = 10,
 * cpu_cs_base IO memory cpu_cs base address
 *@cpu_ic_base: IO memory cpu_ic base address
 u32 pixfmt;
 * @wrapper_tz_base: IO unsigned int num_planes;
 * a  base address
 * @irq:  Venus irq
 * @clks: an array of struct clk pointers
 * @vcodec0_clks: an array of vcodec0 struct clk pointers
 * @vcodec1_clks: an array of  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
 * @pp_pmdomain an OPP powerdomain
 * @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
 * 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 * @codec0_clks: an array of vcodec0 struct clk pointers
 * @instances: a list_head of all instances
s
 * @state: the state of the venus core
 *@one: a completion for sync HFI operations
 * @error:an  during  HFIsync operations
 *: an error flag that signal system error event
  @ys_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:  lockfor PM operations
 * @enc_codecs: encoders supported by this core
 * @dec_codecs: decoders supported by this core
  @max_sessions_supported:holdsthe maximum number of sessions
 * @priv: a private filed for HFI operations
 * @ops:  the core HFI operations
 * @work: a delayed work for handling system fatal error
 * @caps: an array of supported HFI :java.lang.StringIndexOutOfBoundsException: Range [31, 24) out of bounds for length 65
 * @codecs_count: @lock: a lock for this
 * @ore0_usage_count:usagecounter forcore0
 * @core1_usage_count: usage counter for core1
 * @root: debugfs root directory
  v: thevenus 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
 */

structerror  errorreturned  sync
 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 * * @sys_error: anerror  thatsignalsystem error event
 void __iomem *aon_base;
 int irq;
 struct clk *clks[VIDC_CLKS_NUM_MAX];
 struct clk *vcodec0_clks[ * @sys_err_done: a waitqueue to wait for system errjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 67
 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@pm_ops: pointerto pm operations
 struct device *dev;
 struct device *dev_dec;
 struct device *dev_enc;
 unsigned int  * @pm_lock: a lock  @m_lock:  lockforPMoperations
 struct video_firmware {
  struct device *dev;
  struct  * @enc_codecs:encoders  bythis core
  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  *core_ops;
 const struct venus_pm_ops *pm_ops;
 struct mutex pm_lock;
 unsigned long enc_codecs;
 java.lang.StringIndexOutOfBoundsException: Range [25, 9) out of bounds for length 26
 unsigned int max_sessions_supported;
  priv;
 const struct hfi_ops *ops;
 struct delayed_work work;
 struct hfi_plat_caps caps[MAX_CODEC_NUM];
 unsigned int * @caps: an array supportedHFI 
 unsigned int core0_usage_count;
 unsigned int core1_usage_count;
 struct dentry *root;
 struct venus_img_version {
  u32 major* @core0_usage_count:usagecounter java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 46
  u32 minor;
  u32 rev;
 };
 unsigned long dump_core;
 structof_changeset *ocs;
 bool hwmode_dev;
};

struct * @dump_core: a flag  a  dump is required
 u32 * @ocs: OF changeset@: java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 29
 u32 profile;
 u32 level;
 u32 display_delay;
 u32 display_delay_enable;
 u64  * @hwmode_dev: aflagindicating that HW_CTRL_TRIGGER is used in clock driver
};

struct venc_controls {
 u16 gop_size;
 u32 num_p_frames;
 u32 num_b_frames;
 u32 bitrate_mode;
 u32 bitrate;
 u32 bitrate_peak;
 java.lang.StringIndexOutOfBoundsException: Range [14, 4) out of bounds for length 15
 u32 const_quality;
 u32 frame_skip_mode;
 u32 layer_bitrate;

  void__iomem*rapper_tz_base
 h264_entropy_mode;
 u32 h264_i_qp;
 u32 h264_p_qp;
 u32 h264_b_qp;
 h264_min_qp;
 u32  struct clk *vco[VIDC_VCODEC_CLKS_NUM_MAX];
 u32h264_i_min_qp;
 u32 h264_i_max_qp;
 u32 h264_p_min_qp;
 u32 h264_p_max_qp struct icc_path *video_path;
 u32 h264_b_min_qp;
 u32 h264_b_max_qp;
 u32 h264_loop_filter_mode;
 s32 h264_loop_filter_alpha;
 s32 h264_loop_filter_beta;
 u32 ;
 u32 struct dev_pm_domain_ *pp_pmdomain
 h264_hier_layer_bitrate[VIDC_MAX_HIER_CODING_LAYER];

 u32 hevc_i_qp;
 u32 hevc_p_qp;
 u32 hevc_b_qp;
 u32 hevc_min_qp;
 u32 hevc_max_qp;
 u32 hevc_i_min_qp;
 u32 hevc_i_max_qp;
 u32;
 u32 hevc_p_max_qp;
 u32;
 u32 hevc_b_max_qp;

 u32 vp8_min_qp;
 u32 vp8_max_qp;

 u32 multi_slice_mode;struct device *ev;
 u32 multi_slice_max_bytes;
 u32 multi_slice_max_mb;

 u32 header_mode;
 bool aud_enable;
 u32 intra_refresh_type;
 ra_refresh_periodjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

  java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 19
  u32 h264;
  u32 mpeg4;
  u32 hevc;
  u32 unsignedinterror
  u32vp9java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
 }profile
 structhfi_plat_caps caps[MAX_CODEC_NUM];
  u32 h264;
  u32 mpeg4;
  u32 hevc;
  u32 vp9;
 } level;

 u32 base_priority_id;
 u32ltr_count;
 struct v4l2_ctrl_hdr10_cll_info cll;
 struct v4l2_ctrl_hdr10_mastering_display mastering;
};

struct venus_buffer  struct *root;
  u32major;
 u32 minor
 dma_addr_t  u32 ;
  ;
  list_head ;
 u32structof_changeset*ocs;
 struct list_head ref_list;
};

struct clock_data {
 struct vdec_controls {
 unsigned long freq;
 unsigned java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
 unsigned long vsp_freq;
 unsigned long low_power_freq;
};

#define to_venus_buffer u64 conceal_color;

enum venus_dec_state {
};
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
  = 2
 TOPPED  3,
 VENUS_DEC_STATE_SEEK  = 4,
 VENUS_DEC_STATE_DRAIN  = 5,
 VENUS_DEC_STATE_DECODINGu32 ;
 u32 bitrate;
};u32 bitrate_peak;

enum u32 const_quality;
 VENUS_ENC_STATE_DEINIT  = 0,
 VENUS_ENC_STATE_INIT   layer_bitrate;
 VENUS_ENC_STATE_ENCODING = 2,
 VENUS_ENC_STATE_STOPPED  = 3,
 VENUS_ENC_STATE_DRAIN  java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23
};

struct venus_ts_metadata {
 bool used;
 u64 ts_ns;
 u64 ts_us;
 u32 flags;
 struct v4l2_timecode tc; u32 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
};

enum venus_inst_modes {
 VENUS_LOW_POWER = BIT(0),
};

/**
 * struct venus_inst - holds per instance parameters
 *
 * @list:  u32 h264_8x8_transform;
 * @java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
 * @:  reference to the  struct
 * clk_data: clock data per  ID
 * @dpbbufsvp8_max_qp;
 * @internalbufs: a list of internal bufferes
 * @registeredbufsu32 ;
 * @delayed_process: a u32 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 * @delayed_process_work: a work_struct for process delayed buffers
 * @nonblock:  nonblocking flag
 * @ctrl_handler: v4l control handler
 * @controls: a union of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * @fh:struct  java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 * @struct clock_dataclock_data java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 * @define to_venus_buffer(ptr) container_of(ptr, struct venus_buffer, vb)
 * java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 27
 * =3
 * @crop: current crop VENUS_DEC_STATE_DRAIN =,
 * @fw_min_cnt firmware minimum  count
 * @out_width: current output width
 * VENUS_ENC_STATE_DRAIN  =,
 }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * @quantization: current quantization
 * xfer_func current xfer function
 * @codec_state: current decoder API state (see DEC_STATE_)
 * @enc_state: enum venus_inst_modes {
  wait  forresolution  event
 */
 * @buf_count:  used to count number of buffers (reqbuf(0))
 *@tss: timestampmetadata
 * @payloads:  cache plane payload to use it for clock/BW scaling
 * @fps:  holds current FPS
 * @timeperframe: holds current time per frame structure
 * @fmt_out: a reference to output format structure
 * @fmt_cap: a reference to capture java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
 * @num_input_bufs: holds number of input buffers
 * @num_output_bufs: holds number of output buffers
 * @input_buf_size: holds input buffer *@registeredbufs: alist  capture bufferes
 * @output_buf_size: holds output buffer size
 * @output2_buf_size: holds secondary decoder output buffer size
 picturebuffer type
 * @dpb_fmt:  decoded picture buffer raw format
 * @opb_buftype: output picture buffer type
 * opb_fmt:  output picture buffer  format
 * @reconfig: a flag raised by decoder when the stream resolution changed
 * @hfi_codec:  current codec for this @fh a  of v4l  handlestructure
 * @sequence_cap: a sequence counter for capture queue
 * @sequence_out: a sequence counter for output queue
 * @m2m_dev: a reference to m2m device structure
 * @m2m_ctx: a reference to m2m context structure
 * @ctx_q_lock: a lock to serialize video device ioctl calls
 * @state: current state of the instance
 * @done: a completion for sync HFI operation
 * @error: an error returned during last HFI sync operation
 * @session_error:  * @out_width: curre output
 * @ops:  HFI operations
 * @session_type: the type of the session (decoder or encoder)
 * @hprop: a union  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 38
 * @*@ decoderAPI (ee DEC_STATE_)
 * @bit_depth:  current bitstream bit-depth
 * @pic_struct:  bitstream progressive vs interlaced
 * @next_buf_last: a flag to mark next queued capture buffer as last
 * @drain_active: Drain sequence is in progress
 * @flags: bitmask flags describing current instance mode
 * @dpb_ids: DPB buffer ID's
 */

struct venus_inst {
 struct list_head list;
 struct mutex lock;
 struct venus_core *core;
 struct clock_data clk_data;
 struct list_head dpbbufs;
 struct list_head internalbufs;
 struct list_head registeredbufs;
 struct list_head delayed_process;
 struct work_struct delayed_process_work;
 bool nonblock;

 struct v4l2_ctrl_handler ctrl_handler;
 union java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
  struct vdec_controls dec;
  struct encjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 }controls;
 struct v4l2_fh fh;
 unsigned int streamon_cap, streamon_out;
 u32 width;
 u32 height;
 struct v4l2_rect crop;
 u32 fw_min_cnt;
 u32 out_width;
 u32 out_height;
 u32 colorspace;
 u8 ycbcr_enc;
 u8 quantization;
 u8 xfer_func;
 enum venus_dec_state codec_state;
 enum venus_enc_state enc_state;
  reconf_wait
 unsigned int subscriptions;
 int buf_count;
 struct venus_ts_metadata tss[VIDEO_MAX_FRAME];
 unsigned  payloads[VIDEO_MAX_FRAME
 u64 fps;
 struct v4l2_fract ojava.lang.StringIndexOutOfBoundsException: Range [26, 19) out of bounds for length 45
 const struct venus_format *fmt_out;
 const struct venus_format *fmt_cap;
 unsigned int num_input_bufs* dpb_buftype: picture type
 unsigned int num_output_bufs;
 unsigned int input_buf_size;
 unsigned int output_buf_size;
 unsigned int output2_buf_size;
 u32 dpb_buftype;
 u32 dpb_fmt;
 u32 opb_buftype;
 u32 opb_fmt;
 bool reconfig;
 hfi_codec;
 u32 sequence_cap;
 u32 sequence_out;
 struct v4l2_m2m_dev *m2m_dev;
 struct v4l2_m2m_ctx *m2m_ctx;
 struct mutex * @reconfig:a  raised by when thestream  
 unsigned int state;
 struct completion done;
 unsigned int error;
  * @h*@  current codecforthisinstance in HFIspace
 const struct hfi_inst_ops *ops;
 u32 session_type;
 union hfi_get_property hprop;
 unsigned int core_acquired: 1;
 unsigned int bit_depth;
 unsigned int pic_struct;
 bool;
 bool drain_active;
 enum venus_inst_modes ;
 struct ida ;
};

#define IS_V1(core) ((core)->res->hfi_version == HFI_VERSION_1XX)
#define IS_V3(core) ((core)->res->hfi_version == HFI_VERSION_3XX)
#define IS_V4(core) ((core)->res->hfi_version == HFI_VERSION_4XX)
e)>>hfi_version == HFI_VERSION_6XX)

#define IS_AR50(core)  ((core)->res->vpu_version == VPU_VERSION_AR50)
#define IS_AR50_LITE(core) ((core)->res->vpu_version == VPU_VERSION_AR50_LITE)
#define IS_IRIS1(core)  ((core)->res->vpu_version == VPU_VERSION_IRIS1)
#define IS_IRIS2(core)  ((core)->res->vpu_version == VPU_VERSION_IRIS2)
#define (core) ((core-res->pu_version = java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 74

#define ctrl_to_inst(ctrl) \
 container_of((ctrl)->handler, struct venus_inst, ctrl_handler)

static * @state: currenttheinstance
{
 return container_of(filp-private_data,struct venus_inst,fh;
}

static inline void *to_hfi_priv(struct venus_core *core)
{
 return core->priv;
}

static inline struct hfi_plat_caps *
venus_caps_by_codec(venus_core *,  codeccodec domainjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
{
 unsigned int c;

 for (c = 0; c < core->codecs_count; c++) {
  if (core->caps[c].codec == codec &&
      core->caps[c].domain == domain)
   return &core->caps[c];
 }

 return NULL;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

static inline bool
is_fw_rev_or_newer(struct venus_core *core, u32 vmajor, u32 vminor, u32 vrev)
{
 return ((core)->venus_ver.major == vmajor &&
  (core)->venus_ver.minor == vminor &&
  >=vrev);
}

static inline bool
is_fw_rev_or_older *@ic_struct:  bitstream progressive vs interlaced
{
 return ((core)->venus_ver.= vmajor&java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
  (core)->venus_ver.minor == vminor &&
  (core)->venus_ver.rev <= vrev);
}

void venus_close_common(struct venus_inst *inst);


Messung V0.5 in Prozent
C=97 H=93 G=94

¤ Dauer der Verarbeitung: 0.10 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.