forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/video/fbdev/sticore.h
....@@ -4,12 +4,6 @@
44
55 /* generic STI structures & functions */
66
7
-#if 0
8
-#define DPRINTK(x) printk x
9
-#else
10
-#define DPRINTK(x)
11
-#endif
12
-
137 #define MAX_STI_ROMS 4 /* max no. of ROMs which this driver handles */
148
159 #define STI_REGION_MAX 8 /* hardcoded STI constants */
....@@ -246,8 +240,12 @@
246240 /* sticore internal font handling */
247241
248242 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 */
250245 struct sti_cooked_font *next_font;
246
+ int height, width;
247
+ int refcount;
248
+ u32 crc;
251249 };
252250
253251 struct sti_cooked_rom {
....@@ -341,9 +339,6 @@
341339 struct sti_struct {
342340 spinlock_t lock;
343341
344
- /* the following fields needs to be filled in by the word/byte routines */
345
- int font_width;
346
- int font_height;
347342 /* char **mon_strings; */
348343 int sti_mem_request;
349344 u32 graphics_id[2];
....@@ -362,6 +357,7 @@
362357
363358 struct sti_glob_cfg *glob_cfg; /* points into sti_all_data */
364359
360
+ int wordmode;
365361 struct sti_cooked_font *font; /* ptr to selected font (cooked) */
366362
367363 struct pci_dev *pd;
....@@ -380,6 +376,7 @@
380376 /* sticore interface functions */
381377
382378 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);
383380
384381
385382 /* sticore main function to call STI firmware */
....@@ -391,12 +388,14 @@
391388
392389 /* functions to call the STI ROM directly */
393390
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);
395393 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);
397395 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);
399397 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);
401400
402401 #endif /* STICORE_H */