Linux 4.19.133
[linux/fpc-iii.git] / drivers / media / platform / vsp1 / vsp1_hgo.h
blob6b0c8580e1bf6a99995df5f7b68ddecf06cba9ab
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * vsp1_hgo.h -- R-Car VSP1 Histogram Generator 1D
5 * Copyright (C) 2016 Renesas Electronics Corporation
7 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
8 */
9 #ifndef __VSP1_HGO_H__
10 #define __VSP1_HGO_H__
12 #include <media/media-entity.h>
13 #include <media/v4l2-ctrls.h>
14 #include <media/v4l2-subdev.h>
16 #include "vsp1_histo.h"
18 struct vsp1_device;
20 struct vsp1_hgo {
21 struct vsp1_histogram histo;
23 struct {
24 struct v4l2_ctrl_handler handler;
25 struct v4l2_ctrl *max_rgb;
26 struct v4l2_ctrl *num_bins;
27 } ctrls;
29 bool max_rgb;
30 unsigned int num_bins;
33 static inline struct vsp1_hgo *to_hgo(struct v4l2_subdev *subdev)
35 return container_of(subdev, struct vsp1_hgo, histo.entity.subdev);
38 struct vsp1_hgo *vsp1_hgo_create(struct vsp1_device *vsp1);
39 void vsp1_hgo_frame_end(struct vsp1_entity *hgo);
41 #endif /* __VSP1_HGO_H__ */