2 * TI OMAP4 ISS V4L2 Driver - ISP RESIZER module
4 * Copyright (C) 2012 Texas Instruments, Inc.
6 * Author: Sergio Aguirre <sergio.a.aguirre@gmail.com>
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.
14 #ifndef OMAP4_ISS_RESIZER_H
15 #define OMAP4_ISS_RESIZER_H
17 #include "iss_video.h"
19 enum resizer_input_entity {
25 #define RESIZER_OUTPUT_MEMORY BIT(0)
27 /* Sink and source RESIZER pads */
28 #define RESIZER_PAD_SINK 0
29 #define RESIZER_PAD_SOURCE_MEM 1
30 #define RESIZER_PADS_NUM 2
33 * struct iss_resizer_device - Structure for the RESIZER module to store its own
35 * @subdev: V4L2 subdevice
36 * @pads: Sink and source media entity pads
37 * @formats: Active video formats
38 * @input: Active input
39 * @output: Active outputs
40 * @video_out: Output video node
41 * @error: A hardware error occurred during capture
42 * @state: Streaming state
43 * @wait: Wait queue used to stop the module
44 * @stopping: Stopping state
46 struct iss_resizer_device {
47 struct v4l2_subdev subdev;
48 struct media_pad pads[RESIZER_PADS_NUM];
49 struct v4l2_mbus_framefmt formats[RESIZER_PADS_NUM];
51 enum resizer_input_entity input;
53 struct iss_video video_out;
56 enum iss_pipeline_stream_state state;
57 wait_queue_head_t wait;
63 int omap4iss_resizer_init(struct iss_device *iss);
64 void omap4iss_resizer_cleanup(struct iss_device *iss);
65 int omap4iss_resizer_register_entities(struct iss_resizer_device *resizer,
66 struct v4l2_device *vdev);
67 void omap4iss_resizer_unregister_entities(struct iss_resizer_device *resizer);
69 int omap4iss_resizer_busy(struct iss_resizer_device *resizer);
70 void omap4iss_resizer_isr(struct iss_resizer_device *resizer, u32 events);
71 void omap4iss_resizer_restore_context(struct iss_device *iss);
72 void omap4iss_resizer_max_rate(struct iss_resizer_device *resizer,
73 unsigned int *max_rate);
75 #endif /* OMAP4_ISS_RESIZER_H */