This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: utils: media-ctl: Set V4L2_MBUS_FRAMEFMT_SET_CSC flag to set colorspace
Author:  Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
Date:    Tue Apr 8 18:46:45 2025 +0300

When setting colorspace fields on a source pad, the V4L2 subdev API
requires setting the V4L2_MBUS_FRAMEFMT_SET_CSC flag. This is missing
in libv4l2subdev, resulting in colorspace fields being ignored for
source pad. Fix it by setting the flag.

Signed-off-by: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ai...@linux.intel.com>

 utils/media-ctl/libv4l2subdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=72703a076edf8a76ed9f12399f07f37b18fa17bf
diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
index 2f6b1c948a07..f8f2bdecf910 100644
--- a/utils/media-ctl/libv4l2subdev.c
+++ b/utils/media-ctl/libv4l2subdev.c
@@ -829,6 +829,8 @@ static struct media_pad *v4l2_subdev_parse_pad_format(
                        }
 
                        format->colorspace = colorspace;
+                       if (pad->flags & MEDIA_PAD_FL_SOURCE)
+                               format->flags |= V4L2_MBUS_FRAMEFMT_SET_CSC;
 
                        p = end;
                        continue;
@@ -857,6 +859,8 @@ static struct media_pad *v4l2_subdev_parse_pad_format(
                        }
 
                        format->xfer_func = xfer_func;
+                       if (pad->flags & MEDIA_PAD_FL_SOURCE)
+                               format->flags |= V4L2_MBUS_FRAMEFMT_SET_CSC;
 
                        p = end;
                        continue;
@@ -885,6 +889,8 @@ static struct media_pad *v4l2_subdev_parse_pad_format(
                        }
 
                        format->ycbcr_enc = ycbcr_enc;
+                       if (pad->flags & MEDIA_PAD_FL_SOURCE)
+                               format->flags |= V4L2_MBUS_FRAMEFMT_SET_CSC;
 
                        p = end;
                        continue;
@@ -913,6 +919,8 @@ static struct media_pad *v4l2_subdev_parse_pad_format(
                        }
 
                        format->quantization = quantization;
+                       if (pad->flags & MEDIA_PAD_FL_SOURCE)
+                               format->flags |= V4L2_MBUS_FRAMEFMT_SET_CSC;
 
                        p = end;
                        continue;

Reply via email to