All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Weber <rjohnweber@gmail.com>
To: Otavio Salvador <otavio@ossystems.com.br>
Cc: "meta-freescale@yoctoproject.org" <meta-freescale@yoctoproject.org>
Subject: Re: mxc_v4l2_capture sometimes not being modprobed
Date: Thu, 05 Jun 2014 15:30:32 -0500	[thread overview]
Message-ID: <5390D368.9000309@gmail.com> (raw)
In-Reply-To: <CAP9ODKornx_nFd4Xk+A_G-rS-XwKedwSuLi372iz+iZvNRgfww@mail.gmail.com>


On 6/5/14, 2:34 PM, Otavio Salvador wrote:
> On Thu, Jun 5, 2014 at 4:10 PM, John Weber <rjohnweber@gmail.com> wrote:
>> On 6/5/14, 1:38 PM, Otavio Salvador wrote:
>>> On Thu, Jun 5, 2014 at 3:23 PM, John Weber <rjohnweber@gmail.com> wrote:
>>>> On 6/5/14, 1:17 PM, Otavio Salvador wrote:
>>>>> On Thu, Jun 5, 2014 at 3:14 PM, John Weber <rjohnweber@gmail.com> wrote:
>>>>>> On 6/5/14, 1:08 PM, Otavio Salvador wrote:
>>>>>>> On Thu, Jun 5, 2014 at 3:05 PM, John Weber <rjohnweber@gmail.com>
>>>>>>> wrote:
>>>>>>>> On 6/5/14, 12:34 PM, Otavio Salvador wrote:
>>>>>>>>> On Mon, May 26, 2014 at 12:42 AM, John Weber <rjohnweber@gmail.com>
>>>>>>>>> wrote:
>>>>>>>>>> meta-freescalers:
>>>>>>>>>>
>>>>>>>>>> I'm seeing a behavior that I can't easily explain.  I'm not seeing
>>>>>>>>>> the
>>>>>>>>>> mxc_v4l2_capture drivers and dependent ipu drivers being
>>>>>>>>>> automatically
>>>>>>>>>> modprobed on Wandboard during a majority of system startups (but
>>>>>>>>>> not
>>>>>>>>>> all).
>>>>>>>>>> I was under the impression that this should be done by udev, but
>>>>>>>>>> for
>>>>>>>>>> some
>>>>>>>>>> reason it seems to either fail or is skipped.
>>>>>>>>>>
>>>>>>>>>> I can force the driver to be loaded at startup by adding the name
>>>>>>>>>> of
>>>>>>>>>> the
>>>>>>>>>> driver in a line in /etc/modules.  This works to load the driver
>>>>>>>>>> every
>>>>>>>>>> time
>>>>>>>>>> at startup, but I'm fairly certain that this is not the most ideal
>>>>>>>>>> approach
>>>>>>>>>> because (A) I have to write a recipe to make the change to
>>>>>>>>>> /etc/modules
>>>>>>>>>> and
>>>>>>>>>> (B) it does not explain why the driver load works sometimes, but
>>>>>>>>>> not
>>>>>>>>>> all
>>>>>>>>>> of
>>>>>>>>>> the time.
>>>>>>>>>>
>>>>>>>>>> Any ideas?
>>>>>>>>> Does this happens with 3.0.35 and 3.10.17?
>>>>>>>>>
>>>>>>>> I did notice it on both kernels.  From what I've been able to gather
>>>>>>>> after
>>>>>>>> sending this email, the modules load at first boot on a freshly
>>>>>>>> burned
>>>>>>>> rootfs (that hasn't been postinst'd).  After that, SW and HW resets
>>>>>>>> and
>>>>>>>> POR
>>>>>>>> to not result in loaded mxc_v4l2_capture module or its dependencies.
>>>>>>>> I
>>>>>>>> do
>>>>>>>> have other modules loaded, however, all the time - the ov5640_mipi
>>>>>>>> driver
>>>>>>>> and the Broadcom WLAN drivers load without fail.
>>>>>>>>
>>>>>>>> I suspect it could be a sequencing problem, but adding the line to
>>>>>>>> /etc/modules fixes it.
>>>>>>> Are you using udev-cache?
>>>>>>>
>>>>>> I believe so:
>>>>>> root@wandboard-dual:/etc# find . -name *udev-cache*
>>>>>> ./rcS.d/S36udev-cache
>>>>>> ./default/udev-cache
>>>>>> ./init.d/udev-cache
>>>>> Disable it in default, please, and check if it helps.
>>>>>
>>>> That did it.  Thanks!  Not sure how to fix the problem though.
>>> Well ... I need a coffee ...
>>>
>>> Ok ... it seems we have a timing issue but it is related to the device
>>> settling.
>>>
>>> Please apply following change in the udev init script:
>>>
>>> --- a/meta/recipes-core/udev/udev/init
>>> +++ b/meta/recipes-core/udev/udev/init
>>> @@ -103,7 +103,7 @@ case "$1" in
>>>        udevadm control --env=STARTUP=1
>>>        if [ "$not_first_boot" != "" ];then
>>>                udevadm trigger --action=add --subsystem-nomatch=tty
>>> --subsystem-nomatch=mem --subsystem-nomatch=vc
>>> --subsystem-nomatch=vtconsole --subsystem-nomatch=misc
>>> --subsystem-nomatch=dcon -
>>> -            (udevadm settle --timeout=3; udevadm control --env=STARTUP=)&
>>> +            (udevadm settle; udevadm control --env=STARTUP=)&
>>>        else
>>>                udevadm trigger --action=add
>>>                udevadm settle
>>>
>>>
>> Nope - that doesn't help the problem.  The udevadm trigger line above
>> includes "--subsystem-nomatch=platform" and if I remove that while keeping
>> everything else the same, it works fine.
> It kind of makes sense to me; if you keep the platform skip and remove
> the background & job, does it work?
If you mean, remove the timeout=3 on the udevadm settle, no.  If I keep the 
platform skip, it does not work at all.

>> I'd be interested to know if anyone else sees the same problem on other
>> machines?
> I bet it is not machine dependent.
>
I think you're right, but as far as I know the only other entity that could 
confirm this would be Boundary Devices.  Eric - do you see this same issue when 
connecting your camera to Nitrogen6x?

John


  reply	other threads:[~2014-06-05 20:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-26  3:42 mxc_v4l2_capture sometimes not being modprobed John Weber
2014-06-05 17:34 ` Otavio Salvador
2014-06-05 18:05   ` John Weber
2014-06-05 18:08     ` Otavio Salvador
2014-06-05 18:14       ` John Weber
2014-06-05 18:17         ` Otavio Salvador
2014-06-05 18:23           ` John Weber
2014-06-05 18:38             ` Otavio Salvador
2014-06-05 19:10               ` John Weber
2014-06-05 19:34                 ` Otavio Salvador
2014-06-05 20:30                   ` John Weber [this message]
2014-06-05 20:33                     ` Eric Nelson
2014-06-05 20:40                       ` John Weber
2014-06-06 23:10                       ` Eric Nelson
2014-06-08 15:51                         ` John Weber
2014-06-09 13:51                           ` Otavio Salvador
2014-06-09 13:52                             ` Otavio Salvador
2014-06-09 16:00                               ` John Weber
2014-06-09 17:16                               ` Eric Nelson
2014-06-09 17:35                                 ` John Weber
2014-06-09 17:49                                   ` Eric Nelson
2014-06-09 17:59                                     ` John Weber
2014-06-09 18:09                                       ` Eric Nelson

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=5390D368.9000309@gmail.com \
    --to=rjohnweber@gmail.com \
    --cc=meta-freescale@yoctoproject.org \
    --cc=otavio@ossystems.com.br \
    /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.