From: Steve Longerbeam <slongerbeam@gmail.com>
To: "Jan Lübbe" <jlu@pengutronix.de>, linux-media@vger.kernel.org
Cc: p.zabel@pengutronix.de
Subject: Re: [PATCH 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus
Date: Tue, 8 May 2018 11:23:46 -0700 [thread overview]
Message-ID: <a0b447df-b805-b14b-8a98-e2b595efa161@gmail.com> (raw)
In-Reply-To: <1525788814.6317.28.camel@pengutronix.de>
Hi Jan,
On 05/08/2018 07:13 AM, Jan Lübbe wrote:
> Hi,
>
> On Mon, 2018-05-07 at 11:21 -0700, Steve Longerbeam wrote:
>> In other words, if the sensor bus is parallel, only 8-bit bus UYVY_2x8
>> and YUYV_2x8 can be routed to the IC pad or component packed/unpacked
>> by the IDMAC pad. All other sensor formats on a parallel bus (8 or 16
>> bit) must be sent to IDMAC pad as pass-through.
>>
>> I think the code can be simplified/made more readable because of this,
>> something like:
>>
>> static inline bool is_parallel_bus(struct v4l2_fwnode_endpoint *ep)
>> {
>> return ep->bus_type != V4L2_MBUS_CSI2;
>> }
>>
>> static inline bool requires_pass_through(
>> struct v4l2_fwnode_endpoint *ep,
>> struct v4l2_mbus_framefmt *infmt,
>> const struct imx_media_pixfmt *incc) {
>> return incc->bayer || (is_parallel_bus(ep) && infmt->code !=
>> UYVY_2x8 && infmt->code != YUYV_2x8);
>> }
>>
>>
>> Then requires_pass_through() can be used everywhere we need to
>> determine the pass-though requirement.
> OK, i've added these helper functions. In csi_link_validate() we don't
> have the infmt handy, but as the downstream elements check if they have
> a native format anyway, this check is redundant and so i've dropped it.
Makes sense.
>
>> Also, there's something wrong with the 'switch (image.pix.pixelformat)
>> {...}' block in csi_idmac_setup_channel(). Pass-though, burst size, pass-though
>> bits, should be determined by input media-bus code, not final capture V4L2 pix
>> format.
> I just followed the existing code there, which already configures all
> of these.
Sorry never mind, I forgot that there is a need to check for planar formats
here.
>>>> Assuming that above does not work (and indeed parallel RGB565
>>>> must be handled as pass-through), then I think support for capturing
>>>> parallel RGB555 as pass-through should be added to this series as
>>>> well.
>>> I don't have a sensor which produces RGB555, so it wouldn't be able to
>>> test it.
>> Understood, but for code readability and consistency I think the code
>> can be cleaned up as above.
> Yes, i've changed that for v2.
>
>
The new macros can be used in more places. I will respond to v2 patch.
Steve
prev parent reply other threads:[~2018-05-08 18:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 16:41 [PATCH 0/2] media: imx: add capture support for RGB565_2X8 on parallel bus Jan Luebbe
2018-05-03 16:41 ` [PATCH 1/2] media: imx: capture: refactor enum_/try_fmt Jan Luebbe
2018-05-03 16:41 ` [PATCH 2/2] media: imx: add support for RGB565_2X8 on parallel bus Jan Luebbe
2018-05-04 5:07 ` kbuild test robot
2018-05-04 14:44 ` Jan Lübbe
2018-05-04 6:44 ` [PATCH] media: imx: fix semicolon.cocci warnings kbuild test robot
2018-05-04 6:44 ` [PATCH 2/2] media: imx: add support for RGB565_2X8 on parallel bus kbuild test robot
2018-05-04 8:37 ` kbuild test robot
2018-05-05 22:22 ` [PATCH 0/2] media: imx: add capture " Steve Longerbeam
2018-05-07 14:23 ` Jan Lübbe
2018-05-07 18:21 ` Steve Longerbeam
2018-05-08 14:13 ` Jan Lübbe
2018-05-08 18:23 ` Steve Longerbeam [this message]
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=a0b447df-b805-b14b-8a98-e2b595efa161@gmail.com \
--to=slongerbeam@gmail.com \
--cc=jlu@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
/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.