• Home
  • Raw
  • Download

Lines Matching refs:par

40 		(struct tridentfb_par *par, u32, u32, u32, u32, u32, u32);
42 (struct tridentfb_par *par, u32, u32, u32, u32, u32, u32);
44 (struct tridentfb_par *par, const char*,
174 static inline void writemmr(struct tridentfb_par *par, u16 r, u32 v) in writemmr() argument
176 fb_writel(v, par->io_virt + r); in writemmr()
179 static inline u32 readmmr(struct tridentfb_par *par, u16 r) in readmmr() argument
181 return fb_readl(par->io_virt + r); in readmmr()
192 struct tridentfb_par *par = data; in tridentfb_ddc_setscl_tgui() local
193 u8 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK_TGUI; in tridentfb_ddc_setscl_tgui()
200 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setscl_tgui()
205 struct tridentfb_par *par = data; in tridentfb_ddc_setsda_tgui() local
206 u8 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK_TGUI; in tridentfb_ddc_setsda_tgui()
213 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setsda_tgui()
218 struct tridentfb_par *par = data; in tridentfb_ddc_getsda_tgui() local
220 return !!(vga_mm_rcrt(par->io_virt, I2C) & DDC_SDA_TGUI); in tridentfb_ddc_getsda_tgui()
231 struct tridentfb_par *par = data; in tridentfb_ddc_setscl() local
234 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK; in tridentfb_ddc_setscl()
239 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setscl()
244 struct tridentfb_par *par = data; in tridentfb_ddc_setsda() local
247 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK; in tridentfb_ddc_setsda()
252 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setsda()
257 struct tridentfb_par *par = data; in tridentfb_ddc_getscl() local
259 return !!(vga_mm_rcrt(par->io_virt, I2C) & DDC_SCL_IN); in tridentfb_ddc_getscl()
264 struct tridentfb_par *par = data; in tridentfb_ddc_getsda() local
266 return !!(vga_mm_rcrt(par->io_virt, I2C) & DDC_SDA_IN); in tridentfb_ddc_getsda()
271 struct tridentfb_par *par = info->par; in tridentfb_setup_ddc_bus() local
273 strlcpy(par->ddc_adapter.name, info->fix.id, in tridentfb_setup_ddc_bus()
274 sizeof(par->ddc_adapter.name)); in tridentfb_setup_ddc_bus()
275 par->ddc_adapter.owner = THIS_MODULE; in tridentfb_setup_ddc_bus()
276 par->ddc_adapter.class = I2C_CLASS_DDC; in tridentfb_setup_ddc_bus()
277 par->ddc_adapter.algo_data = &par->ddc_algo; in tridentfb_setup_ddc_bus()
278 par->ddc_adapter.dev.parent = info->device; in tridentfb_setup_ddc_bus()
279 if (is_oldclock(par->chip_id)) { /* not sure if this check is OK */ in tridentfb_setup_ddc_bus()
280 par->ddc_algo.setsda = tridentfb_ddc_setsda_tgui; in tridentfb_setup_ddc_bus()
281 par->ddc_algo.setscl = tridentfb_ddc_setscl_tgui; in tridentfb_setup_ddc_bus()
282 par->ddc_algo.getsda = tridentfb_ddc_getsda_tgui; in tridentfb_setup_ddc_bus()
285 par->ddc_algo.setsda = tridentfb_ddc_setsda; in tridentfb_setup_ddc_bus()
286 par->ddc_algo.setscl = tridentfb_ddc_setscl; in tridentfb_setup_ddc_bus()
287 par->ddc_algo.getsda = tridentfb_ddc_getsda; in tridentfb_setup_ddc_bus()
288 par->ddc_algo.getscl = tridentfb_ddc_getscl; in tridentfb_setup_ddc_bus()
290 par->ddc_algo.udelay = 10; in tridentfb_setup_ddc_bus()
291 par->ddc_algo.timeout = 20; in tridentfb_setup_ddc_bus()
292 par->ddc_algo.data = par; in tridentfb_setup_ddc_bus()
294 i2c_set_adapdata(&par->ddc_adapter, par); in tridentfb_setup_ddc_bus()
296 return i2c_bit_add_bus(&par->ddc_adapter); in tridentfb_setup_ddc_bus()
305 static void blade_init_accel(struct tridentfb_par *par, int pitch, int bpp) in blade_init_accel() argument
311 writemmr(par, 0x21C0, v2); in blade_init_accel()
312 writemmr(par, 0x21C4, v2); in blade_init_accel()
313 writemmr(par, 0x21B8, v2); in blade_init_accel()
314 writemmr(par, 0x21BC, v2); in blade_init_accel()
315 writemmr(par, 0x21D0, v1); in blade_init_accel()
316 writemmr(par, 0x21D4, v1); in blade_init_accel()
317 writemmr(par, 0x21C8, v1); in blade_init_accel()
318 writemmr(par, 0x21CC, v1); in blade_init_accel()
319 writemmr(par, 0x216C, 0); in blade_init_accel()
322 static void blade_wait_engine(struct tridentfb_par *par) in blade_wait_engine() argument
324 while (readmmr(par, STATUS) & 0xFA800000) in blade_wait_engine()
328 static void blade_fill_rect(struct tridentfb_par *par, in blade_fill_rect() argument
331 writemmr(par, COLOR, c); in blade_fill_rect()
332 writemmr(par, ROP, rop ? ROP_X : ROP_S); in blade_fill_rect()
333 writemmr(par, CMD, 0x20000000 | 1 << 19 | 1 << 4 | 2 << 2); in blade_fill_rect()
335 writemmr(par, DST1, point(x, y)); in blade_fill_rect()
336 writemmr(par, DST2, point(x + w - 1, y + h - 1)); in blade_fill_rect()
339 static void blade_image_blit(struct tridentfb_par *par, const char *data, in blade_image_blit() argument
344 writemmr(par, COLOR, c); in blade_image_blit()
345 writemmr(par, BGCOLOR, b); in blade_image_blit()
346 writemmr(par, CMD, 0xa0000000 | 3 << 19); in blade_image_blit()
348 writemmr(par, DST1, point(x, y)); in blade_image_blit()
349 writemmr(par, DST2, point(x + w - 1, y + h - 1)); in blade_image_blit()
351 iowrite32_rep(par->io_virt + 0x10000, data, size); in blade_image_blit()
354 static void blade_copy_rect(struct tridentfb_par *par, in blade_copy_rect() argument
366 writemmr(par, ROP, ROP_S); in blade_copy_rect()
367 writemmr(par, CMD, 0xE0000000 | 1 << 19 | 1 << 4 | 1 << 2 | direction); in blade_copy_rect()
369 writemmr(par, SRC1, direction ? s2 : s1); in blade_copy_rect()
370 writemmr(par, SRC2, direction ? s1 : s2); in blade_copy_rect()
371 writemmr(par, DST1, direction ? d2 : d1); in blade_copy_rect()
372 writemmr(par, DST2, direction ? d1 : d2); in blade_copy_rect()
379 static void xp_init_accel(struct tridentfb_par *par, int pitch, int bpp) in xp_init_accel() argument
400 t_outb(par, x, 0x2125); in xp_init_accel()
402 par->eng_oper = x | 0x40; in xp_init_accel()
404 writemmr(par, 0x2154, v1); in xp_init_accel()
405 writemmr(par, 0x2150, v1); in xp_init_accel()
406 t_outb(par, 3, 0x2126); in xp_init_accel()
409 static void xp_wait_engine(struct tridentfb_par *par) in xp_wait_engine() argument
414 while (t_inb(par, STATUS) & 0x80) { in xp_wait_engine()
422 t_outb(par, 0x00, STATUS); in xp_wait_engine()
430 static void xp_fill_rect(struct tridentfb_par *par, in xp_fill_rect() argument
433 writemmr(par, 0x2127, ROP_P); in xp_fill_rect()
434 writemmr(par, 0x2158, c); in xp_fill_rect()
435 writemmr(par, DRAWFL, 0x4000); in xp_fill_rect()
436 writemmr(par, OLDDIM, point(h, w)); in xp_fill_rect()
437 writemmr(par, OLDDST, point(y, x)); in xp_fill_rect()
438 t_outb(par, 0x01, OLDCMD); in xp_fill_rect()
439 t_outb(par, par->eng_oper, 0x2125); in xp_fill_rect()
442 static void xp_copy_rect(struct tridentfb_par *par, in xp_copy_rect() argument
466 writemmr(par, DRAWFL, direction); in xp_copy_rect()
467 t_outb(par, ROP_S, 0x2127); in xp_copy_rect()
468 writemmr(par, OLDSRC, point(y1_tmp, x1_tmp)); in xp_copy_rect()
469 writemmr(par, OLDDST, point(y2_tmp, x2_tmp)); in xp_copy_rect()
470 writemmr(par, OLDDIM, point(h, w)); in xp_copy_rect()
471 t_outb(par, 0x01, OLDCMD); in xp_copy_rect()
477 static void image_init_accel(struct tridentfb_par *par, int pitch, int bpp) in image_init_accel() argument
481 writemmr(par, 0x2120, 0xF0000000); in image_init_accel()
482 writemmr(par, 0x2120, 0x40000000 | tmp); in image_init_accel()
483 writemmr(par, 0x2120, 0x80000000); in image_init_accel()
484 writemmr(par, 0x2144, 0x00000000); in image_init_accel()
485 writemmr(par, 0x2148, 0x00000000); in image_init_accel()
486 writemmr(par, 0x2150, 0x00000000); in image_init_accel()
487 writemmr(par, 0x2154, 0x00000000); in image_init_accel()
488 writemmr(par, 0x2120, 0x60000000 | (pitch << 16) | pitch); in image_init_accel()
489 writemmr(par, 0x216C, 0x00000000); in image_init_accel()
490 writemmr(par, 0x2170, 0x00000000); in image_init_accel()
491 writemmr(par, 0x217C, 0x00000000); in image_init_accel()
492 writemmr(par, 0x2120, 0x10000000); in image_init_accel()
493 writemmr(par, 0x2130, (2047 << 16) | 2047); in image_init_accel()
496 static void image_wait_engine(struct tridentfb_par *par) in image_wait_engine() argument
498 while (readmmr(par, 0x2164) & 0xF0000000) in image_wait_engine()
502 static void image_fill_rect(struct tridentfb_par *par, in image_fill_rect() argument
505 writemmr(par, 0x2120, 0x80000000); in image_fill_rect()
506 writemmr(par, 0x2120, 0x90000000 | ROP_S); in image_fill_rect()
508 writemmr(par, 0x2144, c); in image_fill_rect()
510 writemmr(par, DST1, point(x, y)); in image_fill_rect()
511 writemmr(par, DST2, point(x + w - 1, y + h - 1)); in image_fill_rect()
513 writemmr(par, 0x2124, 0x80000000 | 3 << 22 | 1 << 10 | 1 << 9); in image_fill_rect()
516 static void image_copy_rect(struct tridentfb_par *par, in image_copy_rect() argument
528 writemmr(par, 0x2120, 0x80000000); in image_copy_rect()
529 writemmr(par, 0x2120, 0x90000000 | ROP_S); in image_copy_rect()
531 writemmr(par, SRC1, direction ? s2 : s1); in image_copy_rect()
532 writemmr(par, SRC2, direction ? s1 : s2); in image_copy_rect()
533 writemmr(par, DST1, direction ? d2 : d1); in image_copy_rect()
534 writemmr(par, DST2, direction ? d1 : d2); in image_copy_rect()
535 writemmr(par, 0x2124, in image_copy_rect()
543 static void tgui_init_accel(struct tridentfb_par *par, int pitch, int bpp) in tgui_init_accel() argument
548 writemmr(par, 0x2148, 0); in tgui_init_accel()
549 writemmr(par, 0x214C, point(4095, 2047)); in tgui_init_accel()
567 fb_writew(x, par->io_virt + 0x2122); in tgui_init_accel()
570 static void tgui_fill_rect(struct tridentfb_par *par, in tgui_fill_rect() argument
573 t_outb(par, ROP_P, 0x2127); in tgui_fill_rect()
574 writemmr(par, OLDCLR, c); in tgui_fill_rect()
575 writemmr(par, DRAWFL, 0x4020); in tgui_fill_rect()
576 writemmr(par, OLDDIM, point(w - 1, h - 1)); in tgui_fill_rect()
577 writemmr(par, OLDDST, point(x, y)); in tgui_fill_rect()
578 t_outb(par, 1, OLDCMD); in tgui_fill_rect()
581 static void tgui_copy_rect(struct tridentfb_par *par, in tgui_copy_rect() argument
605 writemmr(par, DRAWFL, 0x4 | flags); in tgui_copy_rect()
606 t_outb(par, ROP_S, 0x2127); in tgui_copy_rect()
607 writemmr(par, OLDSRC, point(x1_tmp, y1_tmp)); in tgui_copy_rect()
608 writemmr(par, OLDDST, point(x2_tmp, y2_tmp)); in tgui_copy_rect()
609 writemmr(par, OLDDIM, point(w - 1, h - 1)); in tgui_copy_rect()
610 t_outb(par, 1, OLDCMD); in tgui_copy_rect()
619 struct tridentfb_par *par = info->par; in tridentfb_fillrect() local
633 par->wait_engine(par); in tridentfb_fillrect()
634 par->fill_rect(par, fr->dx, fr->dy, fr->width, in tridentfb_fillrect()
641 struct tridentfb_par *par = info->par; in tridentfb_imageblit() local
660 par->wait_engine(par); in tridentfb_imageblit()
661 if (par->image_blit) in tridentfb_imageblit()
662 par->image_blit(par, img->data, img->dx, img->dy, in tridentfb_imageblit()
671 struct tridentfb_par *par = info->par; in tridentfb_copyarea() local
677 par->wait_engine(par); in tridentfb_copyarea()
678 par->copy_rect(par, ca->sx, ca->sy, ca->dx, ca->dy, in tridentfb_copyarea()
684 struct tridentfb_par *par = info->par; in tridentfb_sync() local
687 par->wait_engine(par); in tridentfb_sync()
695 static inline unsigned char read3X4(struct tridentfb_par *par, int reg) in read3X4() argument
697 return vga_mm_rcrt(par->io_virt, reg); in read3X4()
700 static inline void write3X4(struct tridentfb_par *par, int reg, in write3X4() argument
703 vga_mm_wcrt(par->io_virt, reg, val); in write3X4()
706 static inline unsigned char read3CE(struct tridentfb_par *par, in read3CE() argument
709 return vga_mm_rgfx(par->io_virt, reg); in read3CE()
712 static inline void writeAttr(struct tridentfb_par *par, int reg, in writeAttr() argument
715 fb_readb(par->io_virt + VGA_IS1_RC); /* flip-flop to index */ in writeAttr()
716 vga_mm_wattr(par->io_virt, reg, val); in writeAttr()
719 static inline void write3CE(struct tridentfb_par *par, int reg, in write3CE() argument
722 vga_mm_wgfx(par->io_virt, reg, val); in write3CE()
725 static void enable_mmio(struct tridentfb_par *par) in enable_mmio() argument
732 if (!is_oldprotect(par->chip_id)) in enable_mmio()
740 static void disable_mmio(struct tridentfb_par *par) in disable_mmio() argument
743 vga_mm_rseq(par->io_virt, 0x0B); in disable_mmio()
746 vga_mm_wseq(par->io_virt, NewMode1, 0x80); in disable_mmio()
747 if (!is_oldprotect(par->chip_id)) in disable_mmio()
748 vga_mm_wseq(par->io_virt, Protection, 0x92); in disable_mmio()
751 t_outb(par, PCIReg, 0x3D4); in disable_mmio()
752 t_outb(par, t_inb(par, 0x3D5) & ~0x01, 0x3D5); in disable_mmio()
755 static inline void crtc_unlock(struct tridentfb_par *par) in crtc_unlock() argument
757 write3X4(par, VGA_CRTC_V_SYNC_END, in crtc_unlock()
758 read3X4(par, VGA_CRTC_V_SYNC_END) & 0x7F); in crtc_unlock()
762 static int get_nativex(struct tridentfb_par *par) in get_nativex() argument
769 tmp = (read3CE(par, VertStretch) >> 4) & 3; in get_nativex()
792 static inline void set_lwidth(struct tridentfb_par *par, int width) in set_lwidth() argument
794 write3X4(par, VGA_CRTC_OFFSET, width & 0xFF); in set_lwidth()
797 if (par->chip_id == TGUI9440 || par->chip_id == CYBER9320) in set_lwidth()
798 write3X4(par, AddColReg, in set_lwidth()
799 (read3X4(par, AddColReg) & 0xEF) | ((width & 0x100) >> 4)); in set_lwidth()
801 write3X4(par, AddColReg, in set_lwidth()
802 (read3X4(par, AddColReg) & 0xCF) | ((width & 0x300) >> 4)); in set_lwidth()
806 static void screen_stretch(struct tridentfb_par *par) in screen_stretch() argument
808 if (par->chip_id != CYBERBLADEXPAi1) in screen_stretch()
809 write3CE(par, BiosReg, 0); in screen_stretch()
811 write3CE(par, BiosReg, 8); in screen_stretch()
812 write3CE(par, VertStretch, (read3CE(par, VertStretch) & 0x7C) | 1); in screen_stretch()
813 write3CE(par, HorStretch, (read3CE(par, HorStretch) & 0x7C) | 1); in screen_stretch()
817 static inline void screen_center(struct tridentfb_par *par) in screen_center() argument
819 write3CE(par, VertStretch, (read3CE(par, VertStretch) & 0x7C) | 0x80); in screen_center()
820 write3CE(par, HorStretch, (read3CE(par, HorStretch) & 0x7C) | 0x80); in screen_center()
824 static void set_screen_start(struct tridentfb_par *par, int base) in set_screen_start() argument
827 write3X4(par, VGA_CRTC_START_LO, base & 0xFF); in set_screen_start()
828 write3X4(par, VGA_CRTC_START_HI, (base & 0xFF00) >> 8); in set_screen_start()
829 tmp = read3X4(par, CRTCModuleTest) & 0xDF; in set_screen_start()
830 write3X4(par, CRTCModuleTest, tmp | ((base & 0x10000) >> 11)); in set_screen_start()
831 tmp = read3X4(par, CRTHiOrd) & 0xF8; in set_screen_start()
832 write3X4(par, CRTHiOrd, tmp | ((base & 0xE0000) >> 17)); in set_screen_start()
836 static void set_vclk(struct tridentfb_par *par, unsigned long freq) in set_vclk() argument
842 unsigned char shift = !is_oldclock(par->chip_id) ? 2 : 1; in set_vclk()
862 if (is_oldclock(par->chip_id)) { in set_vclk()
870 if (is3Dchip(par->chip_id)) { in set_vclk()
871 vga_mm_wseq(par->io_virt, ClockHigh, hi); in set_vclk()
872 vga_mm_wseq(par->io_virt, ClockLow, lo); in set_vclk()
874 t_outb(par, lo, 0x43C8); in set_vclk()
875 t_outb(par, hi, 0x43C9); in set_vclk()
881 static void set_number_of_lines(struct tridentfb_par *par, int lines) in set_number_of_lines() argument
883 int tmp = read3CE(par, CyberEnhance) & 0x8F; in set_number_of_lines()
892 write3CE(par, CyberEnhance, tmp); in set_number_of_lines()
899 static int is_flatpanel(struct tridentfb_par *par) in is_flatpanel() argument
903 if (crt || !iscyber(par->chip_id)) in is_flatpanel()
905 return (read3CE(par, FPConfig) & 0x10) ? 1 : 0; in is_flatpanel()
909 static unsigned int get_memsize(struct tridentfb_par *par) in get_memsize() argument
918 switch (par->chip_id) { in get_memsize()
923 tmp = read3X4(par, SPR) & 0x0F; in get_memsize()
955 tmp2 = vga_mm_rseq(par->io_virt, 0xC1); in get_memsize()
993 struct tridentfb_par *par = info->par; in tridentfb_check_var() local
1004 if (par->chip_id == TGUI9440 && bpp == 32) in tridentfb_check_var()
1007 if (par->flatpanel && nativex && var->xres > nativex) in tridentfb_check_var()
1022 if (!is3Dchip(par->chip_id) && in tridentfb_check_var()
1075 if (is_xp(par->chip_id)) in tridentfb_check_var()
1078 switch (par->chip_id) { in tridentfb_check_var()
1111 struct tridentfb_par *par = info->par; in tridentfb_pan_display() local
1117 set_screen_start(par, offset); in tridentfb_pan_display()
1122 static inline void shadowmode_on(struct tridentfb_par *par) in shadowmode_on() argument
1124 write3CE(par, CyberControl, read3CE(par, CyberControl) | 0x81); in shadowmode_on()
1127 static inline void shadowmode_off(struct tridentfb_par *par) in shadowmode_off() argument
1129 write3CE(par, CyberControl, read3CE(par, CyberControl) & 0x7E); in shadowmode_off()
1135 struct tridentfb_par *par = info->par; in tridentfb_set_par() local
1168 enable_mmio(par); in tridentfb_set_par()
1169 crtc_unlock(par); in tridentfb_set_par()
1170 write3CE(par, CyberControl, 8); in tridentfb_set_par()
1177 if (par->flatpanel && var->xres < nativex) { in tridentfb_set_par()
1183 t_outb(par, tmp | 0xC0, VGA_MIS_W); in tridentfb_set_par()
1185 shadowmode_on(par); in tridentfb_set_par()
1188 screen_center(par); in tridentfb_set_par()
1190 screen_stretch(par); in tridentfb_set_par()
1193 t_outb(par, tmp, VGA_MIS_W); in tridentfb_set_par()
1194 write3CE(par, CyberControl, 8); in tridentfb_set_par()
1198 write3X4(par, VGA_CRTC_V_TOTAL, vtotal & 0xFF); in tridentfb_set_par()
1199 write3X4(par, VGA_CRTC_V_DISP_END, vdispend & 0xFF); in tridentfb_set_par()
1200 write3X4(par, VGA_CRTC_V_SYNC_START, vsyncstart & 0xFF); in tridentfb_set_par()
1201 write3X4(par, VGA_CRTC_V_SYNC_END, (vsyncend & 0x0F)); in tridentfb_set_par()
1202 write3X4(par, VGA_CRTC_V_BLANK_START, vblankstart & 0xFF); in tridentfb_set_par()
1203 write3X4(par, VGA_CRTC_V_BLANK_END, vblankend & 0xFF); in tridentfb_set_par()
1206 write3X4(par, VGA_CRTC_H_TOTAL, htotal & 0xFF); in tridentfb_set_par()
1207 write3X4(par, VGA_CRTC_H_DISP, hdispend & 0xFF); in tridentfb_set_par()
1208 write3X4(par, VGA_CRTC_H_SYNC_START, hsyncstart & 0xFF); in tridentfb_set_par()
1209 write3X4(par, VGA_CRTC_H_SYNC_END, in tridentfb_set_par()
1211 write3X4(par, VGA_CRTC_H_BLANK_START, hblankstart & 0xFF); in tridentfb_set_par()
1212 write3X4(par, VGA_CRTC_H_BLANK_END, hblankend & 0x1F); in tridentfb_set_par()
1224 write3X4(par, VGA_CRTC_OVERFLOW, tmp); in tridentfb_set_par()
1226 tmp = read3X4(par, CRTHiOrd) & 0x07; in tridentfb_set_par()
1232 write3X4(par, CRTHiOrd, tmp); in tridentfb_set_par()
1238 write3X4(par, HorizOverflow, tmp); in tridentfb_set_par()
1243 write3X4(par, VGA_CRTC_MAX_SCAN, tmp); in tridentfb_set_par()
1245 write3X4(par, VGA_CRTC_LINE_COMPARE, 0xFF); in tridentfb_set_par()
1246 write3X4(par, VGA_CRTC_PRESET_ROW, 0); in tridentfb_set_par()
1247 write3X4(par, VGA_CRTC_MODE, 0xC3); in tridentfb_set_par()
1249 write3X4(par, LinearAddReg, 0x20); /* enable linear addressing */ in tridentfb_set_par()
1253 write3X4(par, CRTCModuleTest, tmp); in tridentfb_set_par()
1254 tmp = read3CE(par, MiscIntContReg) & ~0x4; in tridentfb_set_par()
1257 write3CE(par, MiscIntContReg, tmp); in tridentfb_set_par()
1260 write3X4(par, GraphEngReg, 0x80); in tridentfb_set_par()
1277 write3X4(par, PixelBusReg, tmp); in tridentfb_set_par()
1279 tmp = read3X4(par, DRAMControl); in tridentfb_set_par()
1280 if (!is_oldprotect(par->chip_id)) in tridentfb_set_par()
1282 if (iscyber(par->chip_id)) in tridentfb_set_par()
1284 write3X4(par, DRAMControl, tmp); /* both IO, linear enable */ in tridentfb_set_par()
1286 write3X4(par, InterfaceSel, read3X4(par, InterfaceSel) | 0x40); in tridentfb_set_par()
1287 if (!is_xp(par->chip_id)) in tridentfb_set_par()
1288 write3X4(par, Performance, read3X4(par, Performance) | 0x10); in tridentfb_set_par()
1290 if (par->chip_id != TGUI9440 && par->chip_id != IMAGE975) in tridentfb_set_par()
1291 write3X4(par, PCIReg, read3X4(par, PCIReg) | 0x06); in tridentfb_set_par()
1293 vga_mm_wseq(par->io_virt, 0, 3); in tridentfb_set_par()
1294 vga_mm_wseq(par->io_virt, 1, 1); /* set char clock 8 dots wide */ in tridentfb_set_par()
1296 vga_mm_wseq(par->io_virt, 2, 0x0F); in tridentfb_set_par()
1297 vga_mm_wseq(par->io_virt, 3, 0); in tridentfb_set_par()
1298 vga_mm_wseq(par->io_virt, 4, 0x0E); /* memory mode enable bitmaps ?? */ in tridentfb_set_par()
1304 tmp = read3CE(par, MiscExtFunc) & 0xF0; in tridentfb_set_par()
1305 if (bpp == 32 || (par->chip_id == TGUI9440 && bpp == 16)) { in tridentfb_set_par()
1309 set_vclk(par, vclk); in tridentfb_set_par()
1310 write3CE(par, MiscExtFunc, tmp | 0x12); in tridentfb_set_par()
1311 write3CE(par, 0x5, 0x40); /* no CGA compat, allow 256 col */ in tridentfb_set_par()
1312 write3CE(par, 0x6, 0x05); /* graphics mode */ in tridentfb_set_par()
1313 write3CE(par, 0x7, 0x0F); /* planes? */ in tridentfb_set_par()
1316 writeAttr(par, 0x10, 0x41); in tridentfb_set_par()
1317 writeAttr(par, 0x12, 0x0F); /* planes */ in tridentfb_set_par()
1318 writeAttr(par, 0x13, 0); /* horizontal pel panning */ in tridentfb_set_par()
1322 writeAttr(par, tmp, tmp); in tridentfb_set_par()
1323 fb_readb(par->io_virt + VGA_IS1_RC); /* flip-flop to index */ in tridentfb_set_par()
1324 t_outb(par, 0x20, VGA_ATT_W); /* enable attr */ in tridentfb_set_par()
1339 t_inb(par, VGA_PEL_IW); in tridentfb_set_par()
1340 t_inb(par, VGA_PEL_MSK); in tridentfb_set_par()
1341 t_inb(par, VGA_PEL_MSK); in tridentfb_set_par()
1342 t_inb(par, VGA_PEL_MSK); in tridentfb_set_par()
1343 t_inb(par, VGA_PEL_MSK); in tridentfb_set_par()
1344 t_outb(par, tmp, VGA_PEL_MSK); in tridentfb_set_par()
1345 t_inb(par, VGA_PEL_IW); in tridentfb_set_par()
1347 if (par->flatpanel) in tridentfb_set_par()
1348 set_number_of_lines(par, info->var.yres); in tridentfb_set_par()
1350 set_lwidth(par, info->fix.line_length / 8); in tridentfb_set_par()
1353 par->init_accel(par, info->var.xres_virtual, bpp); in tridentfb_set_par()
1367 struct tridentfb_par *par = info->par; in tridentfb_setcolreg() local
1373 t_outb(par, 0xFF, VGA_PEL_MSK); in tridentfb_setcolreg()
1374 t_outb(par, regno, VGA_PEL_IW); in tridentfb_setcolreg()
1376 t_outb(par, red >> 10, VGA_PEL_D); in tridentfb_setcolreg()
1377 t_outb(par, green >> 10, VGA_PEL_D); in tridentfb_setcolreg()
1378 t_outb(par, blue >> 10, VGA_PEL_D); in tridentfb_setcolreg()
1403 struct tridentfb_par *par = info->par; in tridentfb_blank() local
1406 if (par->flatpanel) in tridentfb_blank()
1408 t_outb(par, 0x04, 0x83C8); /* Read DPMS Control */ in tridentfb_blank()
1409 PMCont = t_inb(par, 0x83C6) & 0xFC; in tridentfb_blank()
1410 DPMSCont = read3CE(par, PowerStatus) & 0xFC; in tridentfb_blank()
1436 write3CE(par, PowerStatus, DPMSCont); in tridentfb_blank()
1437 t_outb(par, 4, 0x83C8); in tridentfb_blank()
1438 t_outb(par, PMCont, 0x83C6); in tridentfb_blank()
1477 default_par = info->par; in trident_pci_probe()
1577 disable_mmio(info->par); in trident_pci_probe()
1711 disable_mmio(info->par); in trident_pci_probe()
1723 struct tridentfb_par *par = info->par; in trident_pci_remove() local
1726 if (par->ddc_registered) in trident_pci_remove()
1727 i2c_del_adapter(&par->ddc_adapter); in trident_pci_remove()
1728 iounmap(par->io_virt); in trident_pci_remove()