mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: "Yang, Wenyou" <Wenyou.Yang@Microchip.com>,
	Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Nicolas Ferre <nicolas.ferre@Microchip.com>,
	linux-kernel@vger.kernel.org, Sakari Ailus <sakari.ailus@iki.fi>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-arm-kernel@lists.infradead.org,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor.
Date: Tue, 22 Aug 2017 09:00:23 +0200	[thread overview]
Message-ID: <ce6d074b-1c13-d3ea-5dfa-89cca2f26feb@xs4all.nl> (raw)
In-Reply-To: <14941b74-8931-4d00-0664-0735fad9b5d1@Microchip.com>

On 08/22/2017 03:18 AM, Yang, Wenyou wrote:
> Hi Hans,
> 
> On 2017/8/21 22:07, Hans Verkuil wrote:
>> On 08/17/2017 09:16 AM, Wenyou Yang wrote:
>>> The 12-bit parallel interface supports the Raw Bayer, YCbCr,
>>> Monochrome and JPEG Compressed pixel formats from the external
>>> sensor, not support RBG pixel format.
>>>
>>> Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com>
>>> ---
>>>
>>>   drivers/media/platform/atmel/atmel-isc.c | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c
>>> index d4df3d4ccd85..535bb03783fe 100644
>>> --- a/drivers/media/platform/atmel/atmel-isc.c
>>> +++ b/drivers/media/platform/atmel/atmel-isc.c
>>> @@ -1478,6 +1478,11 @@ static int isc_formats_init(struct isc_device *isc)
>>>   	while (!v4l2_subdev_call(subdev, pad, enum_mbus_code,
>>>   	       NULL, &mbus_code)) {
>>>   		mbus_code.index++;
>>> +
>>> +		/* Not support the RGB pixel formats from sensor */
>>> +		if ((mbus_code.code & 0xf000) == 0x1000)
>>> +			continue;
>> Am I missing something? Here you skip any RGB mediabus formats, but in patch 3/3
>> you add RGB mediabus formats. But this patch prevents those new formats from being
>> selected, right?
> This patch prevents getting the RGB format from the sensor directly.
> The RGB format can be produced by ISC controller by itself.

OK, I think I see what is going on here. The isc_formats array really is two
arrays in one: up to RAW_FMT_IND_END it describes what it can receive from
the source, and after that it describes what it can convert it to.

But if you can't handle RGB formats from the sensor, then why not make
sure none of the mbus codes in isc_formats uses RGB? That makes much
more sense.

E.g.:

        { V4L2_PIX_FMT_RGB565, MEDIA_BUS_FMT_RGB565_2X8_LE, 16,
          ISC_PFE_CFG0_BPS_EIGHT, ISC_BAY_CFG_BGBG, ISC_RLP_CFG_MODE_RGB565,
          ISC_DCFG_IMODE_PACKED16, ISC_DCTRL_DVIEW_PACKED, 0x7b,
          false, false },

Why use MEDIA_BUS_FMT_RGB565_2X8_LE if this apparently is not supported?

Regards,

	Hans

> 
>> Regards,
>>
>> 	Hans
>>
>>> +
>>>   		fmt = find_format_by_code(mbus_code.code, &i);
>>>   		if (!fmt)
>>>   			continue;
>>>
> 
> Best Regards,
> Wenyou Yang
> 

  reply	other threads:[~2017-08-22  7:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17  7:16 [PATCH 0/3] media: atmel-isc: Supplement the configuration of formats Wenyou Yang
2017-08-17  7:16 ` [PATCH 1/3] media: atmel-isc: Not support RBG format from sensor Wenyou Yang
2017-08-21 14:07   ` Hans Verkuil
2017-08-22  1:18     ` Yang, Wenyou
2017-08-22  7:00       ` Hans Verkuil [this message]
2017-08-22  7:30         ` Wenyou.Yang
2017-08-23 10:37           ` Hans Verkuil
2017-08-24  6:25             ` Yang, Wenyou
2017-08-24  6:41               ` Hans Verkuil
2017-09-01  3:20                 ` Yang, Wenyou
2017-08-17  7:16 ` [PATCH 2/3] media: atmel-isc: Remove the redundant assignment Wenyou Yang
2017-08-17  7:16 ` [PATCH 3/3] media: atmel-isc: Add more format configurations Wenyou Yang
2017-08-22  6:54   ` Hans Verkuil
2017-08-22  7:45     ` Yang, Wenyou

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=ce6d074b-1c13-d3ea-5dfa-89cca2f26feb@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=Wenyou.Yang@Microchip.com \
    --cc=corbet@lwn.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    --cc=nicolas.ferre@Microchip.com \
    --cc=sakari.ailus@iki.fi \
    /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®