[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92d53749-4ba4-503c-f7c2-386d32d2876d@ideasonboard.com>
Date: Thu, 14 May 2020 11:05:24 +0100
From: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: linux-renesas-soc@...r.kernel.org, linux-media@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Kieran Bingham <kieran.bingham@...asonboard.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Jacopo Mondi <jacopo@...ndi.org>,
Niklas Söderlund <niklas.soderlund@...natech.se>,
sakari.ailus@....fi, Hans Verkuil <hverkuil@...all.nl>,
Hyun Kwon <hyunk@...inx.com>, Rob Herring <robh+dt@...nel.org>,
Jacopo Mondi <jacopo+renesas@...ndi.org>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>
Subject: Re: [PATCH v9 2/4] media: i2c: Add MAX9286 driver
Hi Mani,
On 14/05/2020 10:59, Manivannan Sadhasivam wrote:
> On Thu, May 14, 2020 at 10:53:00AM +0100, Kieran Bingham wrote:
>> Hi Mani,
>>>> +static int max9286_set_fmt(struct v4l2_subdev *sd,
>>>> + struct v4l2_subdev_pad_config *cfg,
>>>> + struct v4l2_subdev_format *format)
>>>> +{
>>>> + struct max9286_priv *priv = sd_to_max9286(sd);
>>>> + struct v4l2_mbus_framefmt *cfg_fmt;
>>>> +
>>>> + if (format->pad >= MAX9286_SRC_PAD)
>>>> + return -EINVAL;
>>>> +
>>>> + /* Refuse non YUV422 formats as we hardcode DT to 8 bit YUV422 */
>>>> + switch (format->format.code) {
>>>> + case MEDIA_BUS_FMT_UYVY8_2X8:
>>>> + case MEDIA_BUS_FMT_VYUY8_2X8:
>>>> + case MEDIA_BUS_FMT_YUYV8_2X8:
>>>> + case MEDIA_BUS_FMT_YVYU8_2X8:
>>>> + break;
>>>> + default:
>>>> + format->format.code = MEDIA_BUS_FMT_YUYV8_2X8;
>>>
>>> Is there any reason for not setting default format to MEDIA_BUS_FMT_UYVY8_2X8?
>>>
>>
>>
>> No good reason no, and I see that in max9286_enum_mbus_code(), we
>> currently code to MEDIA_BUS_FMT_YUYV8_2X8, and that's the value that we
>> init to, so that would be a better default indeed.
>>
>
> max9286_enum_mbus_code() returns MEDIA_BUS_FMT_UYVY8_2X8, no?
Argh, sorry - yet anther typo or copy/paste error.
Indeed, I have changed this locally to ...
<double checks> MEDIA_BUS_FMT_UYVY8_2X8 </double checks>
as suggested. ;-)
>
> Thanks,
> Mani
Powered by blists - more mailing lists