From: Faizel K B Date: Thu, 12 Mar 2026 23:16:14 +0000 (-0700) Subject: media: vimc: sensor: Move vimc_sensor_device to common header X-Git-Tag: v7.1-rc1~169^2~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12cdc242c3faaa66399a01fb40c151ee236e6bbf;p=thirdparty%2Flinux.git media: vimc: sensor: Move vimc_sensor_device to common header 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/test-drivers/vimc/vimc-common.h b/drivers/media/test-drivers/vimc/vimc-common.h index 7a45a2117748e..35789add6b4a3 100644 --- a/drivers/media/test-drivers/vimc/vimc-common.h +++ b/drivers/media/test-drivers/vimc/vimc-common.h @@ -12,6 +12,8 @@ #include #include #include +#include +#include #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 * diff --git a/drivers/media/test-drivers/vimc/vimc-sensor.c b/drivers/media/test-drivers/vimc/vimc-sensor.c index 69e714d4f2281..4c64cdab8cda8 100644 --- a/drivers/media/test-drivers/vimc/vimc-sensor.c +++ b/drivers/media/test-drivers/vimc/vimc-sensor.c @@ -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,