mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@zonque.org>
To: Todor Tomov <todor.tomov@linaro.org>
Cc: mchehab@kernel.org, hans.verkuil@cisco.com,
	s.nawrocki@samsung.com, sakari.ailus@iki.fi,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4 04/21] doc: media/v4l-drivers: Add Qualcomm Camera Subsystem driver document
Date: Mon, 16 Oct 2017 17:01:31 +0200	[thread overview]
Message-ID: <bfd290f4-4fb7-40b0-2d58-8b2a04a9aeca@zonque.org> (raw)
In-Reply-To: <7483f716-4240-899f-f9c5-23c6408f39ff@linaro.org>

Hi,

On 28.08.2017 09:10, Todor Tomov wrote:
> On 25.08.2017 17:10, Daniel Mack wrote:
>> Could you explain how ISPIF, CSID and CSIPHY are related?
>>
>> I have a userspace test setup that works fine for USB webcams, but when
>> operating on any of the video devices exposed by this driver, the
>> lowlevel functions such as .s_power of the ISPIF, CSID, CSIPHY and the
>> sensor driver layers aren't called into.
> 
> Have you activated the media controller links? The s_power is called
> when the subdev is part of a pipeline in which the video device node
> is opened. You can see example configurations for the Qualcomm CAMSS
> driver on:
> https://github.com/96boards/documentation/blob/master/ConsumerEdition/DragonBoard-410c/Guides/CameraModule.md
> This will probably answer most of your questions.

It did in fact, yes. Thanks again for the pointer.

I am however struggling getting a 4-lane OV13855 camera to work with
this camss driver, and I'd be happy to hear about similar setups that work.

In short, here's what my setup looks like:

1. I wrote a driver for the OV13855 sensor, based on the one for OV13858
but with updated register values. It announces
MEDIA_BUS_FMT_SBGGR10_1X10 as bus format which is what the sensor should
be sending, if I understand the specs correctly.


2. The DTS snippet for the endpoint connection look like this:

&blsp_i2c6 {
	cam0: ov13855@16 {
		/* ... */
		port {
			cam0_ep: endpoint {
				clock-lanes = <1>;
				data-lanes = <0 2 3 4>;
				remote-endpoint = <&csiphy0_ep>;
			};
		};
	};
};

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

There are also no lane swaps or any intermediate components in hardware.
We've checked the electrical bits many times, and that end seems alright.


3. The pads and links are set up like this:

# media-ctl -d /dev/media0 -l
'"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'

# media-ctl -d /dev/media0 -V '"ov13855
1-0010":0[fmt:SBGGR10_1X10/4224x3136
field:none],"msm_csiphy0":0[fmt:SBGGR10_1X10/4224x3136
field:none],"msm_csid0":0[fmt:SBGGR10_1X10/4224x3136
field:none],"msm_ispif0":0[fmt:SBGGR10_1X10/4224x3136
field:none],"msm_vfe0_rdi0":0[fmt:SBGGR10_1X10/4224x3136 field:none]'

Both commands succeed.


4. When streaming is started, the power consumption of the device goes
up, all necessary external clocks and voltages are provided and are
stable, and I can see a continuous stream of data on all 4 MIPI lanes
using an oscilloscope.


5. Capturing frames with the following yavta command doesn't work
though. The task is mostly stuck in the buffer dequeing ioctl:

# yavta -B capture-mplane -c10 -I -n 5 -f SBGGR10P -s 4224x3136 /dev/video0

vfe_isr() does fire sometimes with VFE_0_IRQ_STATUS_1_RDIn_SOF(0) set,
but very occasionally only, and the frames do not contain data.

FWIW, an ov6540 is connected to port 1 of the camss, and this sensor
works fine.

I'd be grateful for any pointer about what I could investigate on.


Thanks,
Daniel

  parent reply	other threads:[~2017-10-16 15:08 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 13:29 [PATCH v4 00/21] Qualcomm 8x16 Camera Subsystem driver Todor Tomov
2017-08-08 13:29 ` [PATCH v4 01/21] v4l: Add packed Bayer raw12 pixel formats Todor Tomov
2017-08-08 13:29 ` [PATCH v4 02/21] dt-bindings: media: Binding document for Qualcomm Camera subsystem driver Todor Tomov
2017-08-08 13:30 ` [PATCH v4 03/21] MAINTAINERS: Add " Todor Tomov
2017-08-08 13:30 ` [PATCH v4 04/21] doc: media/v4l-drivers: Add Qualcomm Camera Subsystem driver document Todor Tomov
2017-08-18  7:45   ` Hans Verkuil
2017-08-18  7:53     ` Todor Tomov
2017-08-25 14:10   ` Daniel Mack
2017-08-28  7:10     ` Todor Tomov
2017-08-29 17:02       ` Daniel Mack
2017-10-16 15:01       ` Daniel Mack [this message]
2017-10-25 12:07         ` Todor Tomov
2017-10-25 12:18           ` Daniel Mack
2017-08-08 13:30 ` [PATCH v4 05/21] media: camss: Add CSIPHY files Todor Tomov
2017-08-08 13:30 ` [PATCH v4 06/21] media: camss: Add CSID files Todor Tomov
2017-08-08 13:30 ` [PATCH v4 07/21] media: camss: Add ISPIF files Todor Tomov
2017-08-08 13:30 ` [PATCH v4 08/21] media: camss: Add VFE files Todor Tomov
2017-08-08 13:30 ` [PATCH v4 09/21] media: camss: Add files which handle the video device nodes Todor Tomov
2017-08-08 14:44   ` Sakari Ailus
2017-08-08 13:30 ` [PATCH v4 10/21] media: camms: Add core files Todor Tomov
2017-08-08 13:30 ` [PATCH v4 11/21] media: camss: Enable building Todor Tomov
2017-08-08 13:30 ` [PATCH v4 12/21] camss: vfe: Format conversion support using PIX interface Todor Tomov
2017-09-10  9:58   ` Geert Uytterhoeven
2017-09-11  6:56     ` Todor Tomov
2017-09-11  7:45       ` Geert Uytterhoeven
2017-08-08 13:30 ` [PATCH v4 13/21] doc: media/v4l-drivers: Qualcomm Camera Subsystem - PIX Interface Todor Tomov
2017-08-08 13:30 ` [PATCH v4 14/21] camss: vfe: Support for frame padding Todor Tomov
2017-08-08 13:30 ` [PATCH v4 15/21] camss: vfe: Add interface for scaling Todor Tomov
2017-08-08 13:30 ` [PATCH v4 16/21] camss: vfe: Configure scaler module in VFE Todor Tomov
2017-08-08 13:30 ` [PATCH v4 17/21] camss: vfe: Add interface for cropping Todor Tomov
2017-08-08 13:30 ` [PATCH v4 18/21] camss: vfe: Configure crop module in VFE Todor Tomov
2017-08-08 13:30 ` [PATCH v4 19/21] doc: media/v4l-drivers: Qualcomm Camera Subsystem - Scale and crop Todor Tomov
2017-08-08 13:30 ` [PATCH v4 20/21] camss: Use optimal clock frequency rates Todor Tomov
2017-08-08 13:30 ` [PATCH v4 21/21] doc: media/v4l-drivers: Qualcomm Camera Subsystem - Media graph Todor Tomov
2017-08-08 14:53 ` [PATCH v4 00/21] Qualcomm 8x16 Camera Subsystem driver Sakari Ailus

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=bfd290f4-4fb7-40b0-2d58-8b2a04a9aeca@zonque.org \
    --to=daniel@zonque.org \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=todor.tomov@linaro.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

all inboxes | Powered by JetHome®