Re: boot slow down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 11, 2012 at 9:06 PM, Andy Walls <awalls@xxxxxxxxxxxxxxxx> wrote:
> On Wed, 2012-08-08 at 13:18 -0400, bjlockie@xxxxxxxxx wrote:
>> How hard would it be to get an official kernel option not to load firmware
>
> Submit a patch for the cx23885 driver to the list.  It could add a
> module option so the user can specify not to load cx23885-av firmware
> (and maybe CX23417 firmware too).  The new module option could be set on
> your kernel commandline: cx23885.no_firmware_load=1
>
> Honestly though such a patch problably won't fly.  The real solution,
> that the cx23885 driver needs anyway, is to inhibit the load of all
> firmware during the device probe by the kernel, and load them on the
> first device open (like the ivtv and cx18 drivers do for analog).
>
> There are at least 2 places in the PCI device probe routine of the
> cx23885 driver, where firmware is requested.  Here is the call chain:
>
> cx23885_initdev()
>         cx23885_dev_setup()
>                 cx23885_card_setup()
>                         v4l2_subdev_call(dev->sd_cx25840, core, load_fw);
>                                 cx25840_load_fw()
>                                         cx23885_initialize()
>                                                 cx25840_work_handler()
>                                                         cx25840_loadfw()
>                                                                 request_firmware()
>                 cx23885_417_register()
>                         cx23885_initialize_codec()
>                                 cx23885_load_firmware()
>                                         request_firmware()
>
> The calls to
>         v4l2_subdev_call(dev->sd_cx25840, core, load_fw);

This one should be really easy, right?
The subdev can be created on probe and then the call to load_fw
can be done on first open.

It is remarkable this is documented in a comment placed just above
cx25840_load_fw:

"Since loading the firmware is often problematic when the driver is
 compiled into the kernel I recommend postponing calling this function
 until the first open of the video device. Another reason for
 postponing it is that loading this firmware takes a long time (seconds)
 due to the slow i2c bus speed. So it will speed up the boot process if
 you can avoid loading the fw as long as the video device isn't used."

If you want to, I can try that patch. Of course, someone must commit
to test it.

Regards,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux