From: Michael Jones <michael.jones@matrix-vision.de>
To: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH v3 4/4] omap3isp: lane shifter support
Date: Thu, 17 Mar 2011 16:51:03 +0100 [thread overview]
Message-ID: <4D822DE7.9030909@matrix-vision.de> (raw)
In-Reply-To: <4D822B81.7060301@maxwell.research.nokia.com>
On 03/17/2011 04:40 PM, Sakari Ailus wrote:
> Hi Laurent and Michael,
>
> Laurent Pinchart wrote:
>> On Thursday 17 March 2011 11:07:40 Michael Jones wrote:
>>> On 03/16/2011 06:46 PM, Laurent Pinchart wrote:
>>>> On Wednesday 16 March 2011 18:08:04 Sakari Ailus wrote:
>>>>> Laurent Pinchart wrote:
>>>>>> Hi Sakari,
>>>>>>
>>>>>>>> + return in_info->bpp - out_info->bpp + additional_shift <= 6;
>>>>>>>
>>>>>>> Currently there are no formats that would behave badly in this check?
>>>>>>> Perhaps it'd be good idea to take that into consideration. The shift
>>>>>>> that can be done is even.
>>>>>>
>>>>>> I've asked Michael to remove the check because we have no misbehaving
>>>>>> formats
>>>>>>
>>>>>> :-) Do you think we need to add a check back ?
>>>>>
>>>>> I think it would be helpful in debugging if someone decides to attach a
>>>>> sensor which supports a shift of non-even bits (8 and 9 bits, for
>>>>> example). In any case an invalid configuration is possible in such case,
>>>>> and I don't think that should be allowed, should it?
>>>>
>>>> I agree it shouldn't be allowed, but the ISP driver doesn't support
>>>> non-even widths at the moment, so there's no big risk. There could be an
>>>> issue when a non-even width is added to the driver if the developer
>>>> forgets to update the shift code. Maybe a comment in ispvideo.c above
>>>> the big formats array would help making sure this is not forgotten ?
>>>
>>> I think now that additional_shift is also being considered which comes
>>> from the board file, it makes sense to reintroduce the check for an even
>>> shift. As Sakari points out, this would be helpful for debugging if
>>> someone tries using .data_lane_shift which is odd.
>>
>> How should we handle such a broken .data_lane_shift value ? Always refuse to
>> start streaming (maybe with a kernel log message) ? Or should we catch it in
>> isp_register_entities() instead ?
>
> If I understand correctly it's not possible to shift odd bits in any
> case. It's a hardware limitation.
>
> I'd perhaps have just the appropriate register bits in the platform data
> so that leaves no room for accidental misconfiguration, but this is
> perhaps just too much work for not much gain.
>
Actually, that's the way .data_lane_shift was originally defined
(0,1,2,3), and I left it that way to minimize confusion. I was mistaken
above when I said that .data_lane_shift could sneak an odd shift to
isp_video_is_shiftable(), because .data_lane_shift is multiplied by 2
before getting passed there. So I would like to leave this as is, and
it sounds like we have a consensus on this.
I'll submit v4 soon, then.
thanks,
Michael
MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
prev parent reply other threads:[~2011-03-17 15:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-11 8:05 [PATCH v3 0/4] OMAP3-ISP lane shifter support Michael Jones
2011-03-11 8:05 ` [PATCH v3 1/4] v4l: add V4L2_PIX_FMT_Y12 format Michael Jones
2011-03-11 8:56 ` Laurent Pinchart
2011-03-11 9:21 ` Antonio Ospite
2011-03-11 9:38 ` Michael Jones
2011-03-11 11:15 ` Antonio Ospite
2011-03-11 8:05 ` [PATCH v3 2/4] media: add 8-bit bayer formats and Y12 Michael Jones
2011-03-11 8:05 ` [PATCH v3 3/4] omap3isp: ccdc: support Y10/12, 8-bit bayer fmts Michael Jones
2011-03-11 8:05 ` [PATCH v3 4/4] omap3isp: lane shifter support Michael Jones
2011-03-16 15:44 ` Sakari Ailus
2011-03-16 16:27 ` Laurent Pinchart
2011-03-16 17:08 ` Sakari Ailus
2011-03-16 17:46 ` Laurent Pinchart
2011-03-17 10:07 ` Michael Jones
2011-03-17 11:04 ` Laurent Pinchart
2011-03-17 15:40 ` Sakari Ailus
2011-03-17 15:51 ` Michael Jones [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=4D822DE7.9030909@matrix-vision.de \
--to=michael.jones@matrix-vision.de \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@maxwell.research.nokia.com \
/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