linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	linux-media <linux-media@vger.kernel.org>,
	mani@kernel.org
Subject: Renesas RZ/G2M + Sony IMX290 Camera questions/issues
Date: Fri, 12 Mar 2021 08:28:41 -0600	[thread overview]
Message-ID: <CAHCN7xJUnMP-uA03a5x4djp4_RPbiMnSWXMdconpAxV7pwgTGw@mail.gmail.com> (raw)

I have an IMX290 camera connected to an RZ/G2M SoC via the 4-channel CSI.

&csi40 {
    status = "okay";

    ports {
        port@0 {
            reg = <0>;
            csi40_in: endpoint {
                clock-lanes = <0>;
                data-lanes = <1 2 3 4>;
                remote-endpoint = <&imx290_ep>;
            };
        };
    };
};

On the I2C bus, I have

imx290: camera-sensor@1a {
    compatible = "sony,imx290";
    reg = <0x1a>;
    reset-gpios = <&gpio_exp2 0 GPIO_ACTIVE_LOW>;
    clocks = <&versaclock6_bb 1>;
    clock-names = "xclk";
    clock-frequency = <37125000>;
    vdddo-supply = <&reg_cam0_en0>;
    vdda-supply = <&reg_cam0_en1>;
    vddd-supply = <&reg_cam0_en0>;

    port {
        imx290_ep: endpoint {
            data-lanes = <1 2 3 4>;
            link-frequencies = /bits/ 64 <148500000 222750000>;
            remote-endpoint = <&csi40_in>;
        };
    };
};

I configure the pipeline with:

media-ctl -l "'rcar_csi2 feaa0000.csi2':1 -> 'VIN0 output':0[1]"

I also have tried configuring the video formats in several different ways

media-ctl --set-v4l2 "'imx290 2-001a':0[fmt:SRGGB12_1X12/1920x1080 field:none]"
media-ctl --set-v4l2 "'rcar_csi2
feaa0000.csi2':0[fmt:SRGGB12_1X12/1920x1080 field:none]"
media-ctl --set-v4l2 "'rcar_csi2
feaa0000.csi2':1[fmt:SRGGB12_1X12/1920x1080 field:none]"

or

media-ctl --set-v4l2 "'rcar_csi2
feaa0000.csi2':0[fmt:UYVY8_2X8/1920x1080 field:none]"
media-ctl --set-v4l2 "'rcar_csi2
feaa0000.csi2':1[fmt:UYVY8_2X8/1920x1080 field:none]"
media-ctl --set-v4l2 "'imx290 2-001a':0[fmt:UYVY8_2X8/1920x1080 field:non

but no matter what I do when I attempt to stream, I get a broken pipe,
even when I use fakesink as the target.

root@beacon-rzg2h:~# GST_DEBUG=2 gst-launch-1.0 -v v4l2src
device=/dev/video1 ! video/x-raw,width=1920,height=1080 ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:03.727500390   501     0x10efd4f0 ERROR                v4l2src
gstv4l2src.c:337:gst_v4l2src_get_input_size_info:<v4l2src0> Cropcap
fail, CROPCAP has not supported
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2,
framerate=(fraction)100/1, interlace-mode=(s1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2,
framerate=(fraction)100/1, interlace-m1
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2,
framerate=(fraction)100/1, interlace-mode1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
video/x-raw, width=(int)1920, height=(int)1080, format=(string)YUY2,
framerate=(fraction)100/1, interlace-1
0:00:03.737388309   501     0x10efd4f0 WARN          v4l2bufferpool
gstv4l2bufferpool.c:870:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src>
Uncertain or not enough buffers, enad
0:00:03.740266641   501     0x10efd4f0 ERROR         v4l2bufferpool
gstv4l2bufferpool.c:757:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool:src>
error with STREAMON 32 (Broken pi)
0:00:03.740474842   501     0x10efd4f0 WARN          v4l2bufferpool
gstv4l2bufferpool.c:1188:gst_v4l2_buffer_pool_poll:<v4l2src0> error:
poll error 1: Broken pipe (32)
0:00:03.740693123   501     0x10efd4f0 WARN                 v4l2src
gstv4l2src.c:1020:gst_v4l2src_create:<v4l2src0> error: Failed to
allocate a buffer
0:00:03.740791643   501     0x10efd4f0 WARN                 basesrc
gstbasesrc.c:2939:gst_base_src_loop:<v4l2src0> error: Internal data
stream error.
0:00:03.740822843   501     0x10efd4f0 WARN                 basesrc
gstbasesrc.c:2939:gst_base_src_loop:<v4l2src0> error: streaming
stopped, reason error (-5)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could
not read from resource.
Additional debug info:
../../../git/sys/v4l2/gstv4l2bufferpool.c(1188):
gst_v4l2_buffer_pool_poll ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
poll error 1: Broken pipe (32)
Execution ended after 0:00:00.013644415
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:03.741392965   501     0x10ec96c0 WARN          v4l2bufferpool
gstv4l2bufferpool.c:1042:gst_v4l2_buffer_pool_stop:<v4l2src0:pool:src>
some buffers are still outstanding
0:00:03.741428005   501     0x10ec96c0 WARN              bufferpool
gstbufferpool.c:567:gst_buffer_pool_set_active:<v4l2src0:pool:src>
stop failed
0:00:03.743868095   501     0x10ec96c0 ERROR         v4l2bufferpool
gstv4l2bufferpool.c:757:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool:src>
error with STREAMON 32 (Broken pi)
0:00:03.744090576   501     0x10ec96c0 WARN          v4l2bufferpool
gstv4l2bufferpool.c:1042:gst_v4l2_buffer_pool_stop:<v4l2src0:pool:src>
some buffers are still outstanding
0:00:03.744123936   501     0x10ec96c0 WARN              bufferpool
gstbufferpool.c:567:gst_buffer_pool_set_active:<v4l2src0:pool:src>
stop failed
0:00:03.744152376   501     0x10ec96c0 WARN          v4l2bufferpool
gstv4l2bufferpool.c:1042:gst_v4l2_buffer_pool_stop:<v4l2src0:pool:src>
some buffers are still outstanding
0:00:03.744178296   501     0x10ec96c0 WARN              bufferpool
gstbufferpool.c:567:gst_buffer_pool_set_active:<v4l2src0:pool:src>
stop failed
Setting pipeline to NULL ...
Total time: 0.013650 seconds
Freeing pipeline ...


I was hoping someone might have a suggestion as to what I might be missing.
Ideally, I'd like to get two IMX290 cameras operational with one in
4-lane mode and one in 2-lane mode.

Might anyone have any suggestions?  According to the media-ctl
--print-dot, the pipeline appears correct, but there is clearly
something I am missing.

thanks for any suggestions,

adam

             reply	other threads:[~2021-03-12 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 14:28 Adam Ford [this message]
2021-03-12 14:52 ` Renesas RZ/G2M + Sony IMX290 Camera questions/issues Niklas Söderlund
2021-03-13 17:47   ` Adam Ford
2021-03-13 19:42     ` Niklas Söderlund
2021-03-13 21:02       ` Adam Ford
2021-03-15  9:23         ` Niklas Söderlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHCN7xJUnMP-uA03a5x4djp4_RPbiMnSWXMdconpAxV7pwgTGw@mail.gmail.com \
    --to=aford173@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mani@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).