From: Hans Verkuil <hverkuil@xs4all.nl>
To: William Towle <william.towle@codethink.co.uk>
Cc: linux-kernel@lists.codethink.co.uk, linux-media@vger.kernel.org,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Subject: Re: [Linux-kernel] RFC: supporting adv7604.c under soc_camera/rcar_vin
Date: Wed, 04 Mar 2015 11:19:59 +0100 [thread overview]
Message-ID: <54F6DC4F.6040504@xs4all.nl> (raw)
In-Reply-To: <alpine.DEB.2.02.1503040911560.4552@xk120.dyn.ducie.codethink.co.uk>
On 03/04/15 10:51, William Towle wrote:
>
> Hi all,
>
> I would like to develop a point in my previous discussion based on
> new findings:
>
> On Thu, 29 Jan 2015, William Towle wrote:
>> 3. Our third problem concerns detecting the resolution of the stream.
>> Our code works with the obsoleted driver (adv761x.c) in place, but with
>> our modifications to adv7604.c we have seen a) recovery of a 640x480
>> image which is cropped rather than scaled, and/or b) recovery of a
>> 2048x2048 image with the stream content in the top left corner.
>
> We have since ported this code from 3.17 to 3.19 (Hans' "subdev2"
> branch) and removed the unnecessary backward compatibility sections.
> Some of the the behaviour is somewhat different in the port, but
> I'll discuss that separately. Here I intend to discuss a possible bug
> in adv7604.c.
>
> In our 3.17-based submission, we had shim code in soc_camera/rcar_vin
> in order to emulate the old driver (originally serving to "test drive"
> the new driver in an older kernel). For a test case with gstreamer
> capturing a single frame it was sufficient at the time a) to override
> the driver's default resolution with something larger when first probed
> [emulating adv761x.c defaulting to the maximum supported resolution],
> and b) to have a query_dv_timings() call ensuring rcar_vin_try_fmt()
> works with the resolution of the live stream [subsequent queries to the
> driver stop returning the default resolution after that, also as per
> adv761x.c].
>
> I am currently investigating an enhancement to that solution in
> which the enum_dv_timings op is used to recover the maximum supported
> resolution of the new driver, and we hit a line in the driver which
> exits the corresponding function. It reads:
> if (timings->pad >= state->source_pad)
> return -EINVAL;
> It suffices to comment out this line, but clearly this is not ideal.
> Depending on the intended semantics, should it be filtering out all pad
> IDs not matching the active one, or all pad IDs that are not valid
> input sources? Unfortunately the lager board's adv7180 chip is too
> simple to make a sensible comparison case (that we can also run tests
> on) here.
The adv7604 code is not ideal, although the pad test is valid (you shouldn't
be able to ask timings for pads that do not exist).
Perfect code would:
1) check if the requested pad is active (hooked up), and return -EINVAL if not.
2) check if the pad is digital or analog and return a different list of
timings accordingly (the max frequency is different between the two). See
the adv7842.c driver how that should be done.
But in the meantime, why not just set timings->pad to 0 in rcar_vin? Or
get it from platform data or something like that.
> Please advise. Comments would also be welcome regarding whether the
> shims describe changes that should live in the driver or elsewhere in
> soc_camera/rcar_vin in an acceptable solution.
I'm not entirely sure what it is you are referring to. As you know I am
working to get rid of the duplicated video ops that are also available as
pad ops. No shims required since everything will be converted.
Regards,
Hans
next prev parent reply other threads:[~2015-03-04 10:20 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 16:19 RFC: supporting adv7604.c under soc_camera/rcar_vin William Towle
2015-01-29 16:19 ` [PATCH 1/8] Add ability to read default input port from DT William Towle
2015-01-29 20:19 ` Jean-Michel Hautbois
2015-01-29 16:19 ` [PATCH 2/8] adv7604.c: formats, default colourspace, and IRQs William Towle
2015-01-29 16:19 ` [PATCH 3/8] WmT: document "adi,adv7612" William Towle
2015-01-29 16:19 ` [PATCH 4/8] WmT: m-5mols_core style pad handling for adv7604 William Towle
2015-01-29 20:23 ` Jean-Michel Hautbois
2015-02-04 14:14 ` William Towle
2015-02-04 14:40 ` Hans Verkuil
2015-01-29 16:19 ` [PATCH 5/8] media: rcar_vin: Add RGB888_1X24 input format support William Towle
2015-01-29 17:05 ` Sergei Shtylyov
2015-01-29 18:18 ` Guennadi Liakhovetski
2015-01-29 18:28 ` Sergei Shtylyov
2015-01-29 20:19 ` Guennadi Liakhovetski
2015-01-29 20:36 ` Sergei Shtylyov
2015-01-29 20:57 ` Guennadi Liakhovetski
2015-01-29 21:11 ` Guennadi Liakhovetski
2015-02-01 18:29 ` Guennadi Liakhovetski
2015-01-29 16:19 ` [PATCH 6/8] WmT: adv7604 driver compatibility William Towle
2015-01-31 23:56 ` Guennadi Liakhovetski
2015-02-01 11:26 ` Guennadi Liakhovetski
2015-02-02 10:01 ` Laurent Pinchart
2015-02-02 10:09 ` Hans Verkuil
2015-02-03 15:22 ` Laurent Pinchart
2015-02-03 15:24 ` Hans Verkuil
2015-02-03 15:29 ` Lars-Peter Clausen
2015-02-03 15:56 ` Laurent Pinchart
2015-02-03 15:55 ` Laurent Pinchart
2015-01-29 16:19 ` [PATCH 7/8] WmT: rcar_vin new ADV7612 support William Towle
2015-02-01 11:44 ` Guennadi Liakhovetski
2015-01-29 16:19 ` [PATCH 8/8] WmT: dts/i vin0/adv7612 (HDMI) William Towle
2015-01-29 16:51 ` Sergei Shtylyov
2015-02-01 15:51 ` RFC: supporting adv7604.c under soc_camera/rcar_vin Guennadi Liakhovetski
2015-03-04 9:51 ` [Linux-kernel] " William Towle
2015-03-04 10:19 ` Hans Verkuil [this message]
2015-03-05 8:58 ` William Towle
2015-03-25 9:55 ` William Towle
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=54F6DC4F.6040504@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-media@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=william.towle@codethink.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.