Mailing List archive

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

[linux-dvb] Re: Busy waiting in i2c_busy_rise_and_fall



Hello Oliver,

I'm sorry that I'm answering so late...

@Michael:
Are ms-delays really required?
After I applied the following patch the cpu load dropped to 3%:
Hehe, once again: the i2c code is legacy cruft. It was written for my analog tv stuff, worked, and was never improved, because the data rates are very, very low. It was incorporated by the Metzlers, and tweaked so that it works.

For some DVB stuff, however, and frequent polling through the i2c bus, the functions are crap. ms delays are not required, but you have to keep the balance:

As Robert has already pointed out, for big amounts of data calling schedule() while transferring lengthens the whole transaction immensly. On the other hand, if you busy wait, the computer is locked up for a long time (just like within the firmware upload).

Please keep in my the separation between DVB and "dvb-kernel":

The DVB driver is completely separated, you can do with it whatever you want. If it works for all DVB people, you can rise the transfer speed, busy wait, whatever. It will be obsolete, once 2.6 comes out, though.

The "dvb-kernel" driver is a separate issue. There, the transfer speed can be different for every saa7146 "extension" (ie. a DVB card, or an analog tv card) and some improvements have already been done there, ie. the busy_rise_and_fall() function has been removed and some of Robert's suggestions have been incorporated.

It's possible to use irq based i2c, too, but this does not work for av7110 cards, because it screws up the irq handling between the saa7146 <=> av7110, you'll get DEBI oops and GPIO oops messages. 8-(

CU
Michael.



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index