| .. | .. |
|---|
| 147 | 147 | u16 pci_id; |
|---|
| 148 | 148 | u32 accel_flags; |
|---|
| 149 | 149 | int blitter_may_be_busy; |
|---|
| 150 | + unsigned fifo_space; |
|---|
| 150 | 151 | int asleep; |
|---|
| 151 | 152 | int lock_blank; |
|---|
| 152 | 153 | unsigned long res_start; |
|---|
| .. | .. |
|---|
| 286 | 287 | #endif |
|---|
| 287 | 288 | } |
|---|
| 288 | 289 | |
|---|
| 289 | | -#if defined(CONFIG_PM) || defined(CONFIG_PMAC_BACKLIGHT) || \ |
|---|
| 290 | | -defined (CONFIG_FB_ATY_GENERIC_LCD) || defined (CONFIG_FB_ATY_BACKLIGHT) |
|---|
| 290 | +#if defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) || \ |
|---|
| 291 | +defined (CONFIG_FB_ATY_BACKLIGHT) |
|---|
| 291 | 292 | extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par); |
|---|
| 292 | 293 | extern u32 aty_ld_lcd(int index, const struct atyfb_par *par); |
|---|
| 293 | 294 | #endif |
|---|
| .. | .. |
|---|
| 340 | 341 | * Hardware cursor support |
|---|
| 341 | 342 | */ |
|---|
| 342 | 343 | |
|---|
| 343 | | -extern int aty_init_cursor(struct fb_info *info); |
|---|
| 344 | +extern int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops); |
|---|
| 344 | 345 | |
|---|
| 345 | 346 | /* |
|---|
| 346 | 347 | * Hardware acceleration |
|---|
| 347 | 348 | */ |
|---|
| 348 | 349 | |
|---|
| 349 | | -static inline void wait_for_fifo(u16 entries, const struct atyfb_par *par) |
|---|
| 350 | +static inline void wait_for_fifo(u16 entries, struct atyfb_par *par) |
|---|
| 350 | 351 | { |
|---|
| 351 | | - while ((aty_ld_le32(FIFO_STAT, par) & 0xffff) > |
|---|
| 352 | | - ((u32) (0x8000 >> entries))); |
|---|
| 352 | + unsigned fifo_space = par->fifo_space; |
|---|
| 353 | + while (entries > fifo_space) { |
|---|
| 354 | + fifo_space = 16 - fls(aty_ld_le32(FIFO_STAT, par) & 0xffff); |
|---|
| 355 | + } |
|---|
| 356 | + par->fifo_space = fifo_space - entries; |
|---|
| 353 | 357 | } |
|---|
| 354 | 358 | |
|---|
| 355 | 359 | static inline void wait_for_idle(struct atyfb_par *par) |
|---|
| .. | .. |
|---|
| 359 | 363 | par->blitter_may_be_busy = 0; |
|---|
| 360 | 364 | } |
|---|
| 361 | 365 | |
|---|
| 362 | | -extern void aty_reset_engine(const struct atyfb_par *par); |
|---|
| 366 | +extern void aty_reset_engine(struct atyfb_par *par); |
|---|
| 363 | 367 | extern void aty_init_engine(struct atyfb_par *par, struct fb_info *info); |
|---|
| 364 | 368 | |
|---|
| 365 | 369 | void atyfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); |
|---|