Mailing List archive

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

[linux-dvb] Re: Removing PCI-latency settings from CVS



On Friday 01 August 2003 15:23, Rene Bartsch wrote:
> Am Fre, 2003-08-01 um 14.22 schrieb Dr. Werner Fink:
> > On Fri, Aug 01, 2003 at 01:20:21PM +0200, Oliver Endriss wrote:
> > > > Wouldn't it be better to do the calculating instead of breaking
> > > > other systems which do it better _with_ a latency of 64?
>
> What systems should that be? The SAA7146 needs at least 3750 ns
> access to the PCI-bus in one turn to deliver it's data. This is a
> latency of 128 on 33 MHz and 64 on 66 MHz systems. So a latency of 64
> makes only sense for 66 MHz PCI-bus. Otherwise you will loose data
> when setting latency to 64 on a 33 MHz system.

Not necessarily. IMHO there is no need to transfer all data during a 
single pass. It should be sufficient if the the saa7146 gets the bus 
again before a buffer overflow occurres.

> > > Sure, if someone really *knows* how to do that correctly. ;-)
> > > (I don't know enough about the PCI bus specs.)
> > >
> > > I considered the following:
> > > - DVB kernel does not set this value.
> > > - If required you can simply put setpci into your local boot
> > > script. - Many bioses allow to specify the default latency value.
> > > (64 seems to be a common default value.)
>
> That's for all devices on the board. But this may exceed the max.
> latency of a device.

Yep, but normally this is no problem because a device doesn't hold the 
bus longer than required. In a typical system there are only few 
devices which need high bandwidth.

Nevertheless, the latency settings get important whenever you reach the 
limits of the pci bus and/or the devices. Under normal circumstances 
the misconfiguration does not hurt. Otherwise most systems would not 
work. ;-)

> > > - The value 64 produces artefacts on some systems.
>
> I'm maintaining four different systems and all have artefacts with a
> latency of 64 but work flawless with a latency of 128 - see above for
> reason.
>
> > > - A built-in value makes it harder to use setpci to specify the
> > > correct
>
> And overwrites setpci in case of a driver-reload. Quite annoying if
> you're not in and all recordings get messed up.
>
> > >   value. You have to call setpci each time after the driver has
> > > been loaded.
> > > - I'm not sure whether the DVB driver ist the correct place to do
> > > it.
>
> You're right, it's the kernel to handle the PCI-bus.

Well, the driver is part of the kernel. :-)

> > > Anyway, if you prefer I could make it a module parameter.
> > > (default is 0 --> no change, otherwise set the specified value).
> >
> > Yep ... would be perfect for me.  This will help to do recording
> > and replaying on the same card with(out|less) glitches at least on
> > my 33MHz PCI system ;^) ... OK beside this a setpci command would
> > also help but requires lspci for getting the correct device/vendor.

In CVS I added module parameter 'latency' to dvb-ttpci (source file 
saa7146_core.c). Default value is 0, so latency settings done by magic, 
bios, setpci or whatever are *not* touched.
Those who want to play with latency settings may now simply specify any 
valid latency value, e.g. latency=64 or latency=128 as module parameter 
to dvb-ttpci.

Oliver


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



Home | Main Index | Thread Index