Re: Re: fbdev cursor part 1.
From: Ville Syrjälä <syrjala@sci.fi>
Date: 2004-02-23 13:29:50
On Mon, Feb 23, 2004 at 01:44:34PM +0100, Geert Uytterhoeven wrote:
On Mon, 23 Feb 2004, Benjamin Herrenschmidt wrote:quoted
Here's the code in atyfb: static inline void wait_for_fifo(u16 entries, const struct atyfb_par *par) { while ((aty_ld_le32(FIFO_STAT, par) & 0xffff) > ((u32) (0x8000 >> entries))); }That's OK, as long as entries <= 15.
It's actually entries <= 16 since 0x0000 means all last 16 FIFO entries are free. I didn't see any place where this would be broken or too many register writes were done after wait_for_fifo().
Using this register you cannot check for more than 15. There's another register for that, and the difference between PRO and older is in that second register.
BTW would it be possible to add a new accelerator type for Pro chips. I'd like to identify Pro chips in my DirectFB driver because there are a few important differences between Pro and older models. Othwerwise I'm going to have to the same thing I did with matrox cards and use /proc/bus/pci :( -- Ville Syrjälä syrjala@sci.fi http://www.sci.fi/~syrjala/ ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click