vsp1_clu.h 924 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vsp1_clu.h -- R-Car VSP1 Cubic Look-Up Table
  4. *
  5. * Copyright (C) 2015 Renesas Corporation
  6. *
  7. * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  8. */
  9. #ifndef __VSP1_CLU_H__
  10. #define __VSP1_CLU_H__
  11. #include <linux/spinlock.h>
  12. #include <media/media-entity.h>
  13. #include <media/v4l2-ctrls.h>
  14. #include <media/v4l2-subdev.h>
  15. #include "vsp1_entity.h"
  16. struct vsp1_device;
  17. struct vsp1_dl_body;
  18. #define CLU_PAD_SINK 0
  19. #define CLU_PAD_SOURCE 1
  20. struct vsp1_clu {
  21. struct vsp1_entity entity;
  22. struct v4l2_ctrl_handler ctrls;
  23. bool yuv_mode;
  24. spinlock_t lock;
  25. unsigned int mode;
  26. struct vsp1_dl_body *clu;
  27. struct vsp1_dl_body_pool *pool;
  28. };
  29. static inline struct vsp1_clu *to_clu(struct v4l2_subdev *subdev)
  30. {
  31. return container_of(subdev, struct vsp1_clu, entity.subdev);
  32. }
  33. struct vsp1_clu *vsp1_clu_create(struct vsp1_device *vsp1);
  34. #endif /* __VSP1_CLU_H__ */