This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: atomisp: report colorspace information
Author:  Mauro Carvalho Chehab <[email protected]>
Date:    Sat Oct 30 12:01:30 2021 +0100

While different sensors could have different colorspaces, the
colorspace V4L2 support didn't exist by the time atomisp driver
was written. So, the sensors won't have any data about that.

So, let's report what Asus T101HA uses (ov2680 sensor).

It may require further changes, if other sensors used on this
driver have different colorspaces.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/staging/media/atomisp/pci/atomisp_cmd.c   | 15 +++++++++++++++
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c |  8 ++++++++
 2 files changed, 23 insertions(+)

---

diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c 
b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 6b308c81ef77..ff8640314f65 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -4916,6 +4916,13 @@ int atomisp_try_fmt(struct video_device *vdev, struct 
v4l2_pix_format *f,
        }
 
        f->pixelformat = fmt->pixelformat;
+       /*
+        * FIXME: do we need to setup this differently, depending on the
+        * sensor or the pipeline?
+        */
+       f->colorspace = V4L2_COLORSPACE_REC709;
+       f->ycbcr_enc = V4L2_YCBCR_ENC_709;
+       f->xfer_func = V4L2_XFER_FUNC_709;
 
        /*
         * If the format is jpeg or custom RAW, then the width and height will
@@ -6027,6 +6034,14 @@ done:
        pipe->pix.width = f->fmt.pix.width;
        pipe->pix.height = f->fmt.pix.height;
        pipe->pix.pixelformat = f->fmt.pix.pixelformat;
+       /*
+        * FIXME: do we need to setup this differently, depending on the
+        * sensor or the pipeline?
+        */
+       pipe->pix.colorspace = V4L2_COLORSPACE_REC709;
+       pipe->pix.ycbcr_enc = V4L2_YCBCR_ENC_709;
+       pipe->pix.xfer_func = V4L2_XFER_FUNC_709;
+
        if (format_bridge->planar) {
                pipe->pix.bytesperline = output_info.padded_width;
                pipe->pix.sizeimage = PAGE_ALIGN(f->fmt.pix.height *
diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c 
b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index 37542ea17a38..f082d7a67875 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -884,6 +884,14 @@ static int atomisp_g_fmt_cap(struct file *file, void *fh,
        f->fmt.pix.bytesperline = (f->fmt.pix.width * depth) >> 3;
        f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
 
+       /*
+        * FIXME: do we need to setup this differently, depending on the
+        * sensor or the pipeline?
+        */
+       f->fmt.pix.colorspace = V4L2_COLORSPACE_REC709;
+       f->fmt.pix.ycbcr_enc = V4L2_YCBCR_ENC_709;
+       f->fmt.pix.xfer_func = V4L2_XFER_FUNC_709;
+
        return 0;
 }
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to