#include <linux/export.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-fwnode.h>
#include "v4l2-ctrls-priv.h"
static const union v4l2_ctrl_ptr ptr_null;
static void fill_event(struct v4l2_event *ev, struct v4l2_ctrl *ctrl,
u32 changes)
{ … }
void send_initial_event(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl)
{ … }
void send_event(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl, u32 changes)
{ … }
bool v4l2_ctrl_type_op_equal(const struct v4l2_ctrl *ctrl,
union v4l2_ctrl_ptr ptr1, union v4l2_ctrl_ptr ptr2)
{ … }
EXPORT_SYMBOL(…);
static const u8 mpeg2_intra_quant_matrix[64] = …;
static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx,
union v4l2_ctrl_ptr ptr)
{ … }
void v4l2_ctrl_type_op_init(const struct v4l2_ctrl *ctrl, u32 from_idx,
union v4l2_ctrl_ptr ptr)
{ … }
EXPORT_SYMBOL(…);
void v4l2_ctrl_type_op_log(const struct v4l2_ctrl *ctrl)
{ … }
EXPORT_SYMBOL(…);
#define ROUND_TO_RANGE(val, offset_type, ctrl) …
#define zero_padding(s) …
#define zero_reserved(s) …
static int
validate_vp9_lf_params(struct v4l2_vp9_loop_filter *lf)
{ … }
static int
validate_vp9_quant_params(struct v4l2_vp9_quantization *quant)
{ … }
static int
validate_vp9_seg_params(struct v4l2_vp9_segmentation *seg)
{ … }
static int
validate_vp9_compressed_hdr(struct v4l2_ctrl_vp9_compressed_hdr *hdr)
{ … }
static int
validate_vp9_frame(struct v4l2_ctrl_vp9_frame *frame)
{ … }
static int validate_av1_quantization(struct v4l2_av1_quantization *q)
{ … }
static int validate_av1_segmentation(struct v4l2_av1_segmentation *s)
{ … }
static int validate_av1_loop_filter(struct v4l2_av1_loop_filter *lf)
{ … }
static int validate_av1_cdef(struct v4l2_av1_cdef *cdef)
{ … }
static int validate_av1_loop_restauration(struct v4l2_av1_loop_restoration *lr)
{ … }
static int validate_av1_film_grain(struct v4l2_ctrl_av1_film_grain *fg)
{ … }
static int validate_av1_frame(struct v4l2_ctrl_av1_frame *f)
{ … }
static int validate_av1_sequence(struct v4l2_ctrl_av1_sequence *s)
{ … }
static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
union v4l2_ctrl_ptr ptr)
{ … }
static int std_validate_elem(const struct v4l2_ctrl *ctrl, u32 idx,
union v4l2_ctrl_ptr ptr)
{ … }
int v4l2_ctrl_type_op_validate(const struct v4l2_ctrl *ctrl,
union v4l2_ctrl_ptr ptr)
{ … }
EXPORT_SYMBOL(…);
static const struct v4l2_ctrl_type_ops std_type_ops = …;
void v4l2_ctrl_notify(struct v4l2_ctrl *ctrl, v4l2_ctrl_notify_fnc notify, void *priv)
{ … }
EXPORT_SYMBOL(…);
static void ptr_to_ptr(struct v4l2_ctrl *ctrl,
union v4l2_ctrl_ptr from, union v4l2_ctrl_ptr to,
unsigned int elems)
{ … }
void new_to_cur(struct v4l2_fh *fh, struct v4l2_ctrl *ctrl, u32 ch_flags)
{ … }
void cur_to_new(struct v4l2_ctrl *ctrl)
{ … }
static bool req_alloc_array(struct v4l2_ctrl_ref *ref, u32 elems)
{ … }
void new_to_req(struct v4l2_ctrl_ref *ref)
{ … }
void cur_to_req(struct v4l2_ctrl_ref *ref)
{ … }
int req_to_new(struct v4l2_ctrl_ref *ref)
{ … }
int check_range(enum v4l2_ctrl_type type,
s64 min, s64 max, u64 step, s64 def)
{ … }
static inline int handler_set_err(struct v4l2_ctrl_handler *hdl, int err)
{ … }
int v4l2_ctrl_handler_init_class(struct v4l2_ctrl_handler *hdl,
unsigned nr_of_controls_hint,
struct lock_class_key *key, const char *name)
{ … }
EXPORT_SYMBOL(…);
void v4l2_ctrl_handler_free(struct v4l2_ctrl_handler *hdl)
{ … }
EXPORT_SYMBOL(…);
static struct v4l2_ctrl_ref *find_private_ref(
struct v4l2_ctrl_handler *hdl, u32 id)
{ … }
struct v4l2_ctrl_ref *find_ref(struct v4l2_ctrl_handler *hdl, u32 id)
{ … }
struct v4l2_ctrl_ref *find_ref_lock(struct v4l2_ctrl_handler *hdl, u32 id)
{ … }
struct v4l2_ctrl *v4l2_ctrl_find(struct v4l2_ctrl_handler *hdl, u32 id)
{ … }
EXPORT_SYMBOL(…);
int handler_new_ref(struct v4l2_ctrl_handler *hdl,
struct v4l2_ctrl *ctrl,
struct v4l2_ctrl_ref **ctrl_ref,
bool from_other_dev, bool allocate_req)
{ … }
static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ops,
const struct v4l2_ctrl_type_ops *type_ops,
u32 id, const char *name, enum v4l2_ctrl_type type,
s64 min, s64 max, u64 step, s64 def,
const u32 dims[V4L2_CTRL_MAX_DIMS], u32 elem_size,
u32 flags, const char * const *qmenu,
const s64 *qmenu_int, const union v4l2_ctrl_ptr p_def,
void *priv)
{ … }
struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_config *cfg, void *priv)
{ … }
EXPORT_SYMBOL(…);
struct v4l2_ctrl *v4l2_ctrl_new_std(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ops,
u32 id, s64 min, s64 max, u64 step, s64 def)
{ … }
EXPORT_SYMBOL(…);
struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ops,
u32 id, u8 _max, u64 mask, u8 _def)
{ … }
EXPORT_SYMBOL(…);
struct v4l2_ctrl *v4l2_ctrl_new_std_menu_items(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ops, u32 id, u8 _max,
u64 mask, u8 _def, const char * const *qmenu)
{ … }
EXPORT_SYMBOL(…);
struct v4l2_ctrl *v4l2_ctrl_new_std_compound(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ops, u32 id,
const union v4l2_ctrl_ptr p_def)
{ … }
EXPORT_SYMBOL(…);
struct v4l2_ctrl *v4l2_ctrl_new_int_menu(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ops,
u32 id, u8 _max, u8 _def, const s64 *qmenu_int)
{ … }
EXPORT_SYMBOL(…);
int v4l2_ctrl_add_handler(struct v4l2_ctrl_handler *hdl,
struct v4l2_ctrl_handler *add,
bool (*filter)(const struct v4l2_ctrl *ctrl),
bool from_other_dev)
{ … }
EXPORT_SYMBOL(…);
bool v4l2_ctrl_radio_filter(const struct v4l2_ctrl *ctrl)
{ … }
EXPORT_SYMBOL(…);
void v4l2_ctrl_cluster(unsigned ncontrols, struct v4l2_ctrl **controls)
{ … }
EXPORT_SYMBOL(…);
void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls,
u8 manual_val, bool set_volatile)
{ … }
EXPORT_SYMBOL(…);
void update_from_auto_cluster(struct v4l2_ctrl *master)
{ … }
static int cluster_changed(struct v4l2_ctrl *master)
{ … }
int try_or_set_cluster(struct v4l2_fh *fh, struct v4l2_ctrl *master,
bool set, u32 ch_flags)
{ … }
void v4l2_ctrl_activate(struct v4l2_ctrl *ctrl, bool active)
{ … }
EXPORT_SYMBOL(…);
void __v4l2_ctrl_grab(struct v4l2_ctrl *ctrl, bool grabbed)
{ … }
EXPORT_SYMBOL(…);
int __v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
{ … }
EXPORT_SYMBOL_GPL(…);
int v4l2_ctrl_handler_setup(struct v4l2_ctrl_handler *hdl)
{ … }
EXPORT_SYMBOL(…);
static void log_ctrl(const struct v4l2_ctrl *ctrl,
const char *prefix, const char *colon)
{ … }
void v4l2_ctrl_handler_log_status(struct v4l2_ctrl_handler *hdl,
const char *prefix)
{ … }
EXPORT_SYMBOL(…);
int v4l2_ctrl_new_fwnode_properties(struct v4l2_ctrl_handler *hdl,
const struct v4l2_ctrl_ops *ctrl_ops,
const struct v4l2_fwnode_device_properties *p)
{ … }
EXPORT_SYMBOL(…);