iss_ipipe.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * TI OMAP4 ISS V4L2 Driver - ISP IPIPE module
  3. *
  4. * Copyright (C) 2012 Texas Instruments, Inc.
  5. *
  6. * Author: Sergio Aguirre <sergio.a.aguirre@gmail.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #ifndef OMAP4_ISS_IPIPE_H
  14. #define OMAP4_ISS_IPIPE_H
  15. #include "iss_video.h"
  16. enum ipipe_input_entity {
  17. IPIPE_INPUT_NONE,
  18. IPIPE_INPUT_IPIPEIF,
  19. };
  20. #define IPIPE_OUTPUT_VP BIT(0)
  21. /* Sink and source IPIPE pads */
  22. #define IPIPE_PAD_SINK 0
  23. #define IPIPE_PAD_SOURCE_VP 1
  24. #define IPIPE_PADS_NUM 2
  25. /*
  26. * struct iss_ipipe_device - Structure for the IPIPE module to store its own
  27. * information
  28. * @subdev: V4L2 subdevice
  29. * @pads: Sink and source media entity pads
  30. * @formats: Active video formats
  31. * @input: Active input
  32. * @output: Active outputs
  33. * @error: A hardware error occurred during capture
  34. * @state: Streaming state
  35. * @wait: Wait queue used to stop the module
  36. * @stopping: Stopping state
  37. */
  38. struct iss_ipipe_device {
  39. struct v4l2_subdev subdev;
  40. struct media_pad pads[IPIPE_PADS_NUM];
  41. struct v4l2_mbus_framefmt formats[IPIPE_PADS_NUM];
  42. enum ipipe_input_entity input;
  43. unsigned int output;
  44. unsigned int error;
  45. enum iss_pipeline_stream_state state;
  46. wait_queue_head_t wait;
  47. atomic_t stopping;
  48. };
  49. struct iss_device;
  50. int omap4iss_ipipe_register_entities(struct iss_ipipe_device *ipipe,
  51. struct v4l2_device *vdev);
  52. void omap4iss_ipipe_unregister_entities(struct iss_ipipe_device *ipipe);
  53. int omap4iss_ipipe_init(struct iss_device *iss);
  54. void omap4iss_ipipe_cleanup(struct iss_device *iss);
  55. #endif /* OMAP4_ISS_IPIPE_H */