Skip to contentSkip to conversation

media: vimc: add RGB/YUV input entity implementation

PATCH In review Pavan Bobba 2 participants 7 messages Nov 1, 2025 – Nov 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: vimc: add RGB/YUV input entity implementation

Introduce a new vimc-input entity to simulate a color frame source in the Virtual Media Controller (VIMC) pipeline. This entity outputs RGB888 frames and allows testing of pipelines that start from a pre-processed RGB/YUV source instead of a raw Bayer sensor.

The patch adds vimc-input.c with basic pad operations for format enumeration, get/set, and stream enable/disable handlers. The entity is registered in the VIMC core configuration, replacing the previous temporary use of vimc-sensor. Frame generation is not yet implemented and remains a TODO for future work.

This change enables link validation and format negotiation for the RGB/YUV input path, paving the way for software frame injection and test-pattern generation.

---
 drivers/media/test-drivers/vimc/Makefile      |   3 +-
 drivers/media/test-drivers/vimc/vimc-common.h |   1 +
 drivers/media/test-drivers/vimc/vimc-core.c   |   3 +-
 drivers/media/test-drivers/vimc/vimc-input.c  | 210 ++++++++++++++++++
 4 files changed, 214 insertions(+), 3 deletions(-)
 create mode 100644 drivers/media/test-drivers/vimc/vimc-input.c
drivers/media/test-drivers/vimc/Makefile +2 -1
index 9b9631562473..7e1fdb2f2a78 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 vimc-y := vimc-core.o vimc-common.o vimc-streamer.o vimc-capture.o \
-		vimc-debayer.o vimc-scaler.o vimc-sensor.o vimc-lens.o
+		vimc-debayer.o vimc-scaler.o vimc-sensor.o vimc-lens.o \
+		vimc-input.o
 
 obj-$(CONFIG_VIDEO_VIMC) += vimc.o
 
drivers/media/test-drivers/vimc/vimc-common.h +1 -0
index 7a45a2117748..6c94b1635fa8 100644
@@ -172,6 +172,7 @@ extern const struct vimc_ent_type vimc_debayer_type;
 extern const struct vimc_ent_type vimc_scaler_type;
 extern const struct vimc_ent_type vimc_capture_type;
 extern const struct vimc_ent_type vimc_lens_type;
+extern const struct vimc_ent_type vimc_input_type;
 
 /**
  * vimc_pix_map_by_index - get vimc_pix_map struct by its index
drivers/media/test-drivers/vimc/vimc-core.c +1 -2
index f632c77e52f5..2f6846facb23 100644
@@ -107,9 +107,8 @@ static const struct vimc_ent_config ent_config[] = {
 		.type = &vimc_capture_type
 	},
 	[RGB_YUV_INPUT] = {
-		/* TODO: change this to vimc-input when it is implemented */
 		.name = "RGB/YUV Input",
-		.type = &vimc_sensor_type
+		.type = &vimc_input_type
 	},
 	[SCALER] = {
 		.name = "Scaler",
drivers/media/test-drivers/vimc/vimc-input.c new file +210 -0

210 lines not on this page · raw message

Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 11 lines · Pavan Bobba

Introduce a new vimc-input entity to simulate a color frame source in the Virtual Media Controller (VIMC) pipeline. This entity outputs RGB888 frames and allows testing of pipelines that start from a pre-processed RGB/YUV source instead of a raw Bayer sensor.

The patch adds vimc-input.c with basic pad operations for format enumeration, get/set, and stream enable/disable handlers. The entity is registered in the VIMC core configuration, replacing the previous temporary use of vimc-sensor. Frame generation is not yet implemented and remains a TODO for future work.

Quoted 5 lines

This change enables link validation and format negotiation for the RGB/YUV input path, paving the way for software frame injection and test-pattern generation.

I see 4 patches - are they dependent then gerenrate a sries with cover letter explaining the changes you are making.

thanks,
-- Shuah

#2 lore raw

Hi Shuah,

Quoted 17 lines · Shuah Khan
Quoted 15 lines · Pavan Bobba

Introduce a new vimc-input entity to simulate a color frame source in the Virtual Media Controller (VIMC) pipeline. This entity outputs RGB888 frames and allows testing of pipelines that start from a pre-processed RGB/YUV source instead of a raw Bayer sensor.

The patch adds vimc-input.c with basic pad operations for format enumeration, get/set, and stream enable/disable handlers. The entity is registered in the VIMC core configuration, replacing the previous temporary use of vimc-sensor. Frame generation is not yet implemented and remains a TODO for future work.

This change enables link validation and format negotiation for the RGB/YUV input path, paving the way for software frame injection and test-pattern generation.

Quoted 7 lines
Quoted 1 line

I see 4 patches - are they dependent then gerenrate a sries with cover letter explaining the changes you are making.

thanks,
-- Shuah

even though all 4 patches are part of vimc driver, these are independent patches

maintainer
#3 lore raw
Quoted 22 lines · opensource india

Hi Shuah,

Quoted 19 lines · Shuah Khan
Quoted 16 lines · Pavan Bobba

Introduce a new vimc-input entity to simulate a color frame source in the Virtual Media Controller (VIMC) pipeline. This entity outputs RGB888 frames and allows testing of pipelines that start from a pre-processed RGB/YUV source instead of a raw Bayer sensor.

The patch adds vimc-input.c with basic pad operations for format enumeration, get/set, and stream enable/disable handlers. The entity is registered in the VIMC core configuration, replacing the previous temporary use of vimc-sensor. Frame generation is not yet implemented and remains a TODO for future work.

This change enables link validation and format negotiation for the RGB/YUV input path, paving the way for software frame injection and test-pattern generation.

Quoted 8 lines
Quoted 5 lines

I see 4 patches - are they dependent then gerenrate a sries with cover letter explaining the changes you are making.

thanks,
-- Shuah

even though all 4 patches are part of vimc driver, these are independent patches

Independent in the sense that they can be applied and tested independently?

thanks,
-- Shuah

#4 lore raw
Quoted 27 lines · Shuah Khan
Quoted 25 lines · opensource india

Hi Shuah,

Quoted 22 lines · Shuah Khan
Quoted 11 lines · Pavan Bobba

Introduce a new vimc-input entity to simulate a color frame source in the Virtual Media Controller (VIMC) pipeline. This entity outputs RGB888 frames and allows testing of pipelines that start from a pre-processed RGB/YUV source instead of a raw Bayer sensor.

The patch adds vimc-input.c with basic pad operations for format enumeration, get/set, and stream enable/disable handlers. The entity is registered in the VIMC core configuration, replacing the previous temporary use of vimc-sensor. Frame generation is not yet implemented and remains a TODO for future work.

Quoted 5 lines

This change enables link validation and format negotiation for the RGB/YUV input path, paving the way for software frame injection and test-pattern generation.

I see 4 patches - are they dependent then gerenrate a sries with cover letter explaining the changes you are making.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

thanks,
-- Shuah

even though all 4 patches are part of vimc driver, these are independent patches

Independent in the sense that they can be applied and tested independently?

Yes. all 4 patches can be applied and test independently

Quoted 4 lines

thanks,
-- Shuah

maintainer
#5 lore raw
Quoted 32 lines · opensource india
Quoted 31 lines · Shuah Khan
Quoted 29 lines · opensource india

Hi Shuah,

Quoted 25 lines · Shuah Khan
Quoted 11 lines · Pavan Bobba

Introduce a new vimc-input entity to simulate a color frame source in the Virtual Media Controller (VIMC) pipeline. This entity outputs RGB888 frames and allows testing of pipelines that start from a pre-processed RGB/YUV source instead of a raw Bayer sensor.

The patch adds vimc-input.c with basic pad operations for format enumeration, get/set, and stream enable/disable handlers. The entity is registered in the VIMC core configuration, replacing the previous temporary use of vimc-sensor. Frame generation is not yet implemented and remains a TODO for future work.

Quoted 5 lines

This change enables link validation and format negotiation for the RGB/YUV input path, paving the way for software frame injection and test-pattern generation.

I see 4 patches - are they dependent then gerenrate a sries with cover letter explaining the changes you are making.

thanks,
-- Shuah

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

even though all 4 patches are part of vimc driver, these are independent patches

Independent in the sense that they can be applied and tested independently?

Yes. all 4 patches can be applied and test independently

Sorry for the delay - these four patches especially this one add new features/functionality to to vimc.

These require updates - Documentation/admin-guide/media/vimc.rst Please include the documentation patch - please send these as series 4 patches + doc patch as a series.

The changes look okay to me.

thanks,
-- Shuah

#6 lore raw

Hi Shuah,

Quoted 5 lines · Shuah Khan

Sorry for the delay - these four patches especially this one add new features/functionality to to vimc.

Quoted 8 lines

These require updates - Documentation/admin-guide/media/vimc.rst Please include the documentation patch - please send these as series 4 patches + doc patch as a series.

The changes look okay to me.

thanks,
-- Shuah

Thank you for the review.
i have sent all patches as a series along with documentation changes

https://lore.kernel.org/linux-media/[email protected]/T/#t

please review

Regards,
Pavan