#include <linux/device.h>
#include <linux/gfp.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-subdev.h>
#include <media/videobuf2-vmalloc.h>
#include "vsp1.h"
#include "vsp1_histo.h"
#include "vsp1_pipe.h"
#define HISTO_MIN_SIZE …
#define HISTO_MAX_SIZE …
static inline struct vsp1_histogram_buffer *
to_vsp1_histogram_buffer(struct vb2_v4l2_buffer *vbuf)
{ … }
struct vsp1_histogram_buffer *
vsp1_histogram_buffer_get(struct vsp1_histogram *histo)
{ … }
void vsp1_histogram_buffer_complete(struct vsp1_histogram *histo,
struct vsp1_histogram_buffer *buf,
size_t size)
{ … }
static int histo_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
unsigned int *nplanes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int histo_buffer_prepare(struct vb2_buffer *vb)
{ … }
static void histo_buffer_queue(struct vb2_buffer *vb)
{ … }
static int histo_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void histo_stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops histo_video_queue_qops = …;
static int histo_enum_mbus_code(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int histo_enum_frame_size(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int histo_get_selection(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int histo_set_crop(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int histo_set_compose(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int histo_set_selection(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel)
{ … }
static int histo_set_format(struct v4l2_subdev *subdev,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *fmt)
{ … }
static const struct v4l2_subdev_pad_ops histo_pad_ops = …;
static const struct v4l2_subdev_ops histo_ops = …;
static int histo_v4l2_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{ … }
static int histo_v4l2_enum_format(struct file *file, void *fh,
struct v4l2_fmtdesc *f)
{ … }
static int histo_v4l2_get_format(struct file *file, void *fh,
struct v4l2_format *format)
{ … }
static const struct v4l2_ioctl_ops histo_v4l2_ioctl_ops = …;
static const struct v4l2_file_operations histo_v4l2_fops = …;
static void vsp1_histogram_cleanup(struct vsp1_histogram *histo)
{ … }
void vsp1_histogram_destroy(struct vsp1_entity *entity)
{ … }
int vsp1_histogram_init(struct vsp1_device *vsp1, struct vsp1_histogram *histo,
enum vsp1_entity_type type, const char *name,
const struct vsp1_entity_operations *ops,
const unsigned int *formats, unsigned int num_formats,
size_t data_size, u32 meta_format)
{ … }