@@ -12,6 +12,8 @@
#include <linux/slab.h>
#include <media/media-device.h>
#include <media/v4l2-device.h>
+#include <media/tpg/v4l2-tpg.h>
+#include <media/v4l2-ctrls.h>
#define VIMC_PDEV_NAME "vimc"
@@ -159,6 +161,32 @@ struct vimc_ent_config {
const struct vimc_ent_type *type;
};
+enum vimc_sensor_osd_mode {
+ VIMC_SENSOR_OSD_SHOW_ALL = 0,
+ VIMC_SENSOR_OSD_SHOW_COUNTERS = 1,
+ VIMC_SENSOR_OSD_SHOW_NONE = 2
+};
+
+struct vimc_sensor_device {
+ struct vimc_ent_device ved;
+ struct v4l2_subdev sd;
+ struct tpg_data tpg;
+ struct v4l2_ctrl_handler hdl;
+ struct media_pad pad;
+
+ u8 *frame;
+
+ /*
+ * Virtual "hardware" configuration, filled when the stream starts or
+ * when controls are set.
+ */
+ struct {
+ struct v4l2_area size;
+ enum vimc_sensor_osd_mode osd_value;
+ u64 start_stream_ts;
+ } hw;
+};
+
/**
* vimc_is_source - returns true if the entity has only source pads
*
@@ -14,32 +14,6 @@
#include "vimc-common.h"
-enum vimc_sensor_osd_mode {
- VIMC_SENSOR_OSD_SHOW_ALL = 0,
- VIMC_SENSOR_OSD_SHOW_COUNTERS = 1,
- VIMC_SENSOR_OSD_SHOW_NONE = 2
-};
-
-struct vimc_sensor_device {
- struct vimc_ent_device ved;
- struct v4l2_subdev sd;
- struct tpg_data tpg;
- struct v4l2_ctrl_handler hdl;
- struct media_pad pad;
-
- u8 *frame;
-
- /*
- * Virtual "hardware" configuration, filled when the stream starts or
- * when controls are set.
- */
- struct {
- struct v4l2_area size;
- enum vimc_sensor_osd_mode osd_value;
- u64 start_stream_ts;
- } hw;
-};
-
static const struct v4l2_mbus_framefmt fmt_default = {
.width = 640,
.height = 480,
Move the vimc_sensor_device structure from vimc-sensor.c to vimc-common.h to make it accessible to the vimc-streamer component. Signed-off-by: Faizel K B <faizel.kb@gmail.com> --- drivers/media/test-drivers/vimc/vimc-common.h | 28 +++++++++++++++++++ drivers/media/test-drivers/vimc/vimc-sensor.c | 26 ----------------- 2 files changed, 28 insertions(+), 26 deletions(-)