vsp1_hgo.h 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vsp1_hgo.h -- R-Car VSP1 Histogram Generator 1D
  4. *
  5. * Copyright (C) 2016 Renesas Electronics Corporation
  6. *
  7. * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  8. */
  9. #ifndef __VSP1_HGO_H__
  10. #define __VSP1_HGO_H__
  11. #include <media/media-entity.h>
  12. #include <media/v4l2-ctrls.h>
  13. #include <media/v4l2-subdev.h>
  14. #include "vsp1_histo.h"
  15. struct vsp1_device;
  16. struct vsp1_hgo {
  17. struct vsp1_histogram histo;
  18. struct {
  19. struct v4l2_ctrl_handler handler;
  20. struct v4l2_ctrl *max_rgb;
  21. struct v4l2_ctrl *num_bins;
  22. } ctrls;
  23. bool max_rgb;
  24. unsigned int num_bins;
  25. };
  26. static inline struct vsp1_hgo *to_hgo(struct v4l2_subdev *subdev)
  27. {
  28. return container_of(subdev, struct vsp1_hgo, histo.entity.subdev);
  29. }
  30. struct vsp1_hgo *vsp1_hgo_create(struct vsp1_device *vsp1);
  31. void vsp1_hgo_frame_end(struct vsp1_entity *hgo);
  32. #endif /* __VSP1_HGO_H__ */