vsp1_lut.h 861 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * vsp1_lut.h -- R-Car VSP1 Look-Up Table
  4. *
  5. * Copyright (C) 2013 Renesas Corporation
  6. *
  7. * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  8. */
  9. #ifndef __VSP1_LUT_H__
  10. #define __VSP1_LUT_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. #define LUT_PAD_SINK 0
  18. #define LUT_PAD_SOURCE 1
  19. struct vsp1_lut {
  20. struct vsp1_entity entity;
  21. struct v4l2_ctrl_handler ctrls;
  22. spinlock_t lock;
  23. struct vsp1_dl_body *lut;
  24. struct vsp1_dl_body_pool *pool;
  25. };
  26. static inline struct vsp1_lut *to_lut(struct v4l2_subdev *subdev)
  27. {
  28. return container_of(subdev, struct vsp1_lut, entity.subdev);
  29. }
  30. struct vsp1_lut *vsp1_lut_create(struct vsp1_device *vsp1);
  31. #endif /* __VSP1_LUT_H__ */