1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * TI OMAP4 ISS V4L2 Driver - ISP RESIZER module
5 * Copyright (C) 2012 Texas Instruments, Inc.
7 * Author: Sergio Aguirre <sergio.a.aguirre@gmail.com>
10 #ifndef OMAP4_ISS_RESIZER_H
11 #define OMAP4_ISS_RESIZER_H
13 #include "iss_video.h"
15 enum resizer_input_entity {
21 #define RESIZER_OUTPUT_MEMORY BIT(0)
23 /* Sink and source RESIZER pads */
24 #define RESIZER_PAD_SINK 0
25 #define RESIZER_PAD_SOURCE_MEM 1
26 #define RESIZER_PADS_NUM 2
29 * struct iss_resizer_device - Structure for the RESIZER module to store its own
31 * @subdev: V4L2 subdevice
32 * @pads: Sink and source media entity pads
33 * @formats: Active video formats
34 * @input: Active input
35 * @output: Active outputs
36 * @video_out: Output video node
37 * @error: A hardware error occurred during capture
38 * @state: Streaming state
39 * @wait: Wait queue used to stop the module
40 * @stopping: Stopping state
42 struct iss_resizer_device {
43 struct v4l2_subdev subdev;
44 struct media_pad pads[RESIZER_PADS_NUM];
45 struct v4l2_mbus_framefmt formats[RESIZER_PADS_NUM];
47 enum resizer_input_entity input;
49 struct iss_video video_out;
52 enum iss_pipeline_stream_state state;
53 wait_queue_head_t wait;
59 int omap4iss_resizer_init(struct iss_device *iss);
60 int omap4iss_resizer_create_links(struct iss_device *iss);
61 void omap4iss_resizer_cleanup(struct iss_device *iss);
62 int omap4iss_resizer_register_entities(struct iss_resizer_device *resizer,
63 struct v4l2_device *vdev);
64 void omap4iss_resizer_unregister_entities(struct iss_resizer_device *resizer);
66 int omap4iss_resizer_busy(struct iss_resizer_device *resizer);
67 void omap4iss_resizer_isr(struct iss_resizer_device *resizer, u32 events);
68 void omap4iss_resizer_restore_context(struct iss_device *iss);
69 void omap4iss_resizer_max_rate(struct iss_resizer_device *resizer,
70 unsigned int *max_rate);
72 #endif /* OMAP4_ISS_RESIZER_H */