| .. | .. |
|---|
| 4 | 4 | |
|---|
| 5 | 5 | /* generic STI structures & functions */ |
|---|
| 6 | 6 | |
|---|
| 7 | | -#if 0 |
|---|
| 8 | | -#define DPRINTK(x) printk x |
|---|
| 9 | | -#else |
|---|
| 10 | | -#define DPRINTK(x) |
|---|
| 11 | | -#endif |
|---|
| 12 | | - |
|---|
| 13 | 7 | #define MAX_STI_ROMS 4 /* max no. of ROMs which this driver handles */ |
|---|
| 14 | 8 | |
|---|
| 15 | 9 | #define STI_REGION_MAX 8 /* hardcoded STI constants */ |
|---|
| .. | .. |
|---|
| 246 | 240 | /* sticore internal font handling */ |
|---|
| 247 | 241 | |
|---|
| 248 | 242 | struct sti_cooked_font { |
|---|
| 249 | | - struct sti_rom_font *raw; |
|---|
| 243 | + struct sti_rom_font *raw; /* native ptr for STI functions */ |
|---|
| 244 | + void *raw_ptr; /* kmalloc'ed font data */ |
|---|
| 250 | 245 | struct sti_cooked_font *next_font; |
|---|
| 246 | + int height, width; |
|---|
| 247 | + int refcount; |
|---|
| 248 | + u32 crc; |
|---|
| 251 | 249 | }; |
|---|
| 252 | 250 | |
|---|
| 253 | 251 | struct sti_cooked_rom { |
|---|
| .. | .. |
|---|
| 341 | 339 | struct sti_struct { |
|---|
| 342 | 340 | spinlock_t lock; |
|---|
| 343 | 341 | |
|---|
| 344 | | - /* the following fields needs to be filled in by the word/byte routines */ |
|---|
| 345 | | - int font_width; |
|---|
| 346 | | - int font_height; |
|---|
| 347 | 342 | /* char **mon_strings; */ |
|---|
| 348 | 343 | int sti_mem_request; |
|---|
| 349 | 344 | u32 graphics_id[2]; |
|---|
| .. | .. |
|---|
| 362 | 357 | |
|---|
| 363 | 358 | struct sti_glob_cfg *glob_cfg; /* points into sti_all_data */ |
|---|
| 364 | 359 | |
|---|
| 360 | + int wordmode; |
|---|
| 365 | 361 | struct sti_cooked_font *font; /* ptr to selected font (cooked) */ |
|---|
| 366 | 362 | |
|---|
| 367 | 363 | struct pci_dev *pd; |
|---|
| .. | .. |
|---|
| 380 | 376 | /* sticore interface functions */ |
|---|
| 381 | 377 | |
|---|
| 382 | 378 | struct sti_struct *sti_get_rom(unsigned int index); /* 0: default sti */ |
|---|
| 379 | +void sti_font_convert_bytemode(struct sti_struct *sti, struct sti_cooked_font *f); |
|---|
| 383 | 380 | |
|---|
| 384 | 381 | |
|---|
| 385 | 382 | /* sticore main function to call STI firmware */ |
|---|
| .. | .. |
|---|
| 391 | 388 | |
|---|
| 392 | 389 | /* functions to call the STI ROM directly */ |
|---|
| 393 | 390 | |
|---|
| 394 | | -void sti_putc(struct sti_struct *sti, int c, int y, int x); |
|---|
| 391 | +void sti_putc(struct sti_struct *sti, int c, int y, int x, |
|---|
| 392 | + struct sti_cooked_font *font); |
|---|
| 395 | 393 | void sti_set(struct sti_struct *sti, int src_y, int src_x, |
|---|
| 396 | | - int height, int width, u8 color); |
|---|
| 394 | + int height, int width, u8 color); |
|---|
| 397 | 395 | void sti_clear(struct sti_struct *sti, int src_y, int src_x, |
|---|
| 398 | | - int height, int width, int c); |
|---|
| 396 | + int height, int width, int c, struct sti_cooked_font *font); |
|---|
| 399 | 397 | void sti_bmove(struct sti_struct *sti, int src_y, int src_x, |
|---|
| 400 | | - int dst_y, int dst_x, int height, int width); |
|---|
| 398 | + int dst_y, int dst_x, int height, int width, |
|---|
| 399 | + struct sti_cooked_font *font); |
|---|
| 401 | 400 | |
|---|
| 402 | 401 | #endif /* STICORE_H */ |
|---|