Lines Matching +full:abs +full:- +full:flat

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright 2001, 2002 - Jani Monoses <jani@iv.ro>
31 #include <linux/i2c-algo-bit.h>
80 MODULE_PARM_DESC(mode_option, "Initial video mode e.g. '648x480-8@60'");
82 MODULE_PARM_DESC(mode, "Initial video mode e.g. '648x480-8@60' (deprecated)");
167 fb_writeb(val, p->io_virt + reg); in t_outb()
172 return fb_readb(p->io_virt + reg); in t_inb()
177 fb_writel(v, par->io_virt + r); in writemmr()
182 return fb_readl(par->io_virt + r); in readmmr()
194 u8 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK_TGUI; in tridentfb_ddc_setscl_tgui()
197 reg &= ~DDC_SCL_DRIVE_TGUI; /* disable drive - don't drive hi */ in tridentfb_ddc_setscl_tgui()
201 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setscl_tgui()
207 u8 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK_TGUI; in tridentfb_ddc_setsda_tgui()
210 reg &= ~DDC_SDA_DRIVE_TGUI; /* disable drive - don't drive hi */ in tridentfb_ddc_setsda_tgui()
214 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setsda_tgui()
221 return !!(vga_mm_rcrt(par->io_virt, I2C) & DDC_SDA_TGUI); in tridentfb_ddc_getsda_tgui()
235 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK; in tridentfb_ddc_setscl()
240 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setscl()
248 reg = vga_mm_rcrt(par->io_virt, I2C) & DDC_MASK; in tridentfb_ddc_setsda()
253 vga_mm_wcrt(par->io_virt, I2C, reg); in tridentfb_ddc_setsda()
260 return !!(vga_mm_rcrt(par->io_virt, I2C) & DDC_SCL_IN); in tridentfb_ddc_getscl()
267 return !!(vga_mm_rcrt(par->io_virt, I2C) & DDC_SDA_IN); in tridentfb_ddc_getsda()
272 struct tridentfb_par *par = info->par; in tridentfb_setup_ddc_bus()
274 strscpy(par->ddc_adapter.name, info->fix.id, in tridentfb_setup_ddc_bus()
275 sizeof(par->ddc_adapter.name)); in tridentfb_setup_ddc_bus()
276 par->ddc_adapter.owner = THIS_MODULE; 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()
336 writemmr(par, DST2, point(x + w - 1, y + h - 1)); in blade_fill_rect()
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()
359 u32 s2 = point(x1 + w - 1, y1 + h - 1); in blade_copy_rect()
361 u32 d2 = point(x2 + w - 1, y2 + h - 1); in blade_copy_rect()
402 par->eng_oper = x | 0x40; in xp_init_accel()
439 t_outb(par, par->eng_oper, 0x2125); in xp_fill_rect()
450 x1_tmp = x1 + w - 1; in xp_copy_rect()
451 x2_tmp = x2 + w - 1; in xp_copy_rect()
459 y1_tmp = y1 + h - 1; in xp_copy_rect()
460 y2_tmp = y2 + h - 1; in xp_copy_rect()
511 writemmr(par, DST2, point(x + w - 1, y + h - 1)); in image_fill_rect()
521 u32 s2 = point(x1 + w - 1, y1 + h - 1); in image_copy_rect()
523 u32 d2 = point(x2 + w - 1, y2 + h - 1); in image_copy_rect()
567 fb_writew(x, par->io_virt + 0x2122); in tgui_init_accel()
576 writemmr(par, OLDDIM, point(w - 1, h - 1)); in tgui_fill_rect()
589 x1_tmp = x1 + w - 1; in tgui_copy_rect()
590 x2_tmp = x2 + w - 1; in tgui_copy_rect()
598 y1_tmp = y1 + h - 1; in tgui_copy_rect()
599 y2_tmp = y2 + h - 1; in tgui_copy_rect()
609 writemmr(par, OLDDIM, point(w - 1, h - 1)); in tgui_copy_rect()
619 struct tridentfb_par *par = info->par; in tridentfb_fillrect()
622 if (info->flags & FBINFO_HWACCEL_DISABLED) { in tridentfb_fillrect()
626 if (info->var.bits_per_pixel == 8) { in tridentfb_fillrect()
627 col = fr->color; in tridentfb_fillrect()
631 col = ((u32 *)(info->pseudo_palette))[fr->color]; in tridentfb_fillrect()
633 par->wait_engine(par); in tridentfb_fillrect()
634 par->fill_rect(par, fr->dx, fr->dy, fr->width, in tridentfb_fillrect()
635 fr->height, col, fr->rop); in tridentfb_fillrect()
641 struct tridentfb_par *par = info->par; in tridentfb_imageblit()
644 if ((info->flags & FBINFO_HWACCEL_DISABLED) || img->depth != 1) { in tridentfb_imageblit()
648 if (info->var.bits_per_pixel == 8) { in tridentfb_imageblit()
649 col = img->fg_color; in tridentfb_imageblit()
652 bgcol = img->bg_color; in tridentfb_imageblit()
656 col = ((u32 *)(info->pseudo_palette))[img->fg_color]; in tridentfb_imageblit()
657 bgcol = ((u32 *)(info->pseudo_palette))[img->bg_color]; in tridentfb_imageblit()
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()
663 img->width, img->height, col, bgcol); in tridentfb_imageblit()
671 struct tridentfb_par *par = info->par; in tridentfb_copyarea()
673 if (info->flags & FBINFO_HWACCEL_DISABLED) { in tridentfb_copyarea()
677 par->wait_engine(par); in tridentfb_copyarea()
678 par->copy_rect(par, ca->sx, ca->sy, ca->dx, ca->dy, in tridentfb_copyarea()
679 ca->width, ca->height); in tridentfb_copyarea()
684 struct tridentfb_par *par = info->par; in tridentfb_sync()
686 if (!(info->flags & FBINFO_HWACCEL_DISABLED)) in tridentfb_sync()
687 par->wait_engine(par); in tridentfb_sync()
697 return vga_mm_rcrt(par->io_virt, reg); in read3X4()
703 vga_mm_wcrt(par->io_virt, reg, val); in write3X4()
709 return vga_mm_rgfx(par->io_virt, reg); in read3CE()
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()
722 vga_mm_wgfx(par->io_virt, reg, val); in write3CE()
732 if (!is_oldprotect(par->chip_id)) in enable_mmio()
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()
761 /* Return flat panel's maximum x resolution */
787 output("%dx%d flat panel found\n", x, y); in get_nativex()
797 if (par->chip_id == TGUI9440 || par->chip_id == CYBER9320) in set_lwidth()
808 if (par->chip_id != CYBERBLADEXPAi1) in screen_stretch()
842 unsigned char shift = !is_oldclock(par->chip_id) ? 2 : 1; in set_vclk()
845 for (k = shift; k >= 0; k--) in set_vclk()
847 n = ((m + 2) << shift) - 8; in set_vclk()
850 di = abs(fi - freq); 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()
880 /* Set number of lines for flat panels*/
903 if (crt || !iscyber(par->chip_id)) in is_flatpanel()
918 switch (par->chip_id) { in get_memsize()
955 tmp2 = vga_mm_rseq(par->io_virt, 0xC1); in get_memsize()
984 k -= memdiff * Kb; in get_memsize()
993 struct tridentfb_par *par = info->par; in tridentfb_check_var()
994 int bpp = var->bits_per_pixel; in tridentfb_check_var()
999 if (!var->pixclock) in tridentfb_check_var()
1000 return -EINVAL; in tridentfb_check_var()
1004 bpp = var->bits_per_pixel = 32; in tridentfb_check_var()
1006 return -EINVAL; in tridentfb_check_var()
1007 if (par->chip_id == TGUI9440 && bpp == 32) in tridentfb_check_var()
1008 return -EINVAL; in tridentfb_check_var()
1010 if (par->flatpanel && nativex && var->xres > nativex) in tridentfb_check_var()
1011 return -EINVAL; in tridentfb_check_var()
1013 var->xres = (var->xres + 7) & ~0x7; in tridentfb_check_var()
1014 if (var->xres > var->xres_virtual) in tridentfb_check_var()
1015 var->xres_virtual = var->xres; in tridentfb_check_var()
1016 if (var->yres > var->yres_virtual) in tridentfb_check_var()
1017 var->yres_virtual = var->yres; in tridentfb_check_var()
1018 if (var->xres_virtual > 4095 || var->yres > 2048) in tridentfb_check_var()
1019 return -EINVAL; in tridentfb_check_var()
1021 if (var->yres_virtual > 0xffff) in tridentfb_check_var()
1022 return -EINVAL; in tridentfb_check_var()
1023 line_length = var->xres_virtual * bpp / 8; in tridentfb_check_var()
1025 if (!is3Dchip(par->chip_id) && in tridentfb_check_var()
1026 !(info->flags & FBINFO_HWACCEL_DISABLED)) { in tridentfb_check_var()
1029 var->xres_virtual = 512 * 8 / bpp; in tridentfb_check_var()
1031 var->xres_virtual = 1024 * 8 / bpp; in tridentfb_check_var()
1033 var->xres_virtual = 2048 * 8 / bpp; in tridentfb_check_var()
1035 var->xres_virtual = 4096 * 8 / bpp; in tridentfb_check_var()
1037 var->xres_virtual = 8192 * 8 / bpp; in tridentfb_check_var()
1039 return -EINVAL; in tridentfb_check_var()
1041 line_length = var->xres_virtual * bpp / 8; in tridentfb_check_var()
1045 if (line_length * (var->yres_virtual - var->yres) > (4 << 20)) in tridentfb_check_var()
1046 var->yres_virtual = ((4 << 20) / line_length) + var->yres; in tridentfb_check_var()
1048 if (line_length * var->yres_virtual > info->fix.smem_len) in tridentfb_check_var()
1049 return -EINVAL; in tridentfb_check_var()
1053 var->red.offset = 0; in tridentfb_check_var()
1054 var->red.length = 8; in tridentfb_check_var()
1055 var->green = var->red; in tridentfb_check_var()
1056 var->blue = var->red; in tridentfb_check_var()
1059 var->red.offset = 11; in tridentfb_check_var()
1060 var->green.offset = 5; in tridentfb_check_var()
1061 var->blue.offset = 0; in tridentfb_check_var()
1062 var->red.length = 5; in tridentfb_check_var()
1063 var->green.length = 6; in tridentfb_check_var()
1064 var->blue.length = 5; in tridentfb_check_var()
1067 var->red.offset = 16; in tridentfb_check_var()
1068 var->green.offset = 8; in tridentfb_check_var()
1069 var->blue.offset = 0; in tridentfb_check_var()
1070 var->red.length = 8; in tridentfb_check_var()
1071 var->green.length = 8; in tridentfb_check_var()
1072 var->blue.length = 8; in tridentfb_check_var()
1075 return -EINVAL; in tridentfb_check_var()
1078 if (is_xp(par->chip_id)) in tridentfb_check_var()
1081 switch (par->chip_id) { in tridentfb_check_var()
1101 if (PICOS2KHZ(var->pixclock) > ramdac) in tridentfb_check_var()
1102 return -EINVAL; in tridentfb_check_var()
1114 struct tridentfb_par *par = info->par; in tridentfb_pan_display()
1118 offset = (var->xoffset + (var->yoffset * info->var.xres_virtual)) in tridentfb_pan_display()
1119 * info->var.bits_per_pixel / 32; in tridentfb_pan_display()
1133 struct tridentfb_par *par = info->par; in tridentfb_set_par()
1136 struct fb_var_screeninfo *var = &info->var; in tridentfb_set_par()
1137 int bpp = var->bits_per_pixel; in tridentfb_set_par()
1142 hdispend = var->xres / 8 - 1; in tridentfb_set_par()
1143 hsyncstart = (var->xres + var->right_margin) / 8; in tridentfb_set_par()
1144 hsyncend = (var->xres + var->right_margin + var->hsync_len) / 8; in tridentfb_set_par()
1145 htotal = (var->xres + var->left_margin + var->right_margin + in tridentfb_set_par()
1146 var->hsync_len) / 8 - 5; in tridentfb_set_par()
1150 vdispend = var->yres - 1; in tridentfb_set_par()
1151 vsyncstart = var->yres + var->lower_margin; in tridentfb_set_par()
1152 vsyncend = vsyncstart + var->vsync_len; in tridentfb_set_par()
1153 vtotal = var->upper_margin + vsyncend - 2; in tridentfb_set_par()
1157 if (info->var.vmode & FB_VMODE_INTERLACED) { in tridentfb_set_par()
1170 if (var->sync & FB_SYNC_HOR_HIGH_ACT) in tridentfb_set_par()
1172 if (var->sync & FB_SYNC_VERT_HIGH_ACT) in tridentfb_set_par()
1175 if (par->flatpanel && var->xres < nativex) { in tridentfb_set_par()
1177 * on flat panels with native size larger in tridentfb_set_par()
1240 //FIXME if (info->var.vmode & FB_VMODE_DOUBLE) tmp |= 0x80; /* double scan for 200 line modes */ in tridentfb_set_par()
1249 tmp = (info->var.vmode & FB_VMODE_INTERLACED) ? 0x84 : 0x80; in tridentfb_set_par()
1253 if (info->var.vmode & FB_VMODE_INTERLACED) in tridentfb_set_par()
1278 if (!is_oldprotect(par->chip_id)) in tridentfb_set_par()
1280 if (iscyber(par->chip_id)) in tridentfb_set_par()
1285 if (!is_xp(par->chip_id)) in tridentfb_set_par()
1288 if (par->chip_id != TGUI9440 && par->chip_id != IMAGE975) in tridentfb_set_par()
1291 vga_mm_wseq(par->io_virt, 0, 3); in tridentfb_set_par()
1292 vga_mm_wseq(par->io_virt, 1, 1); /* set char clock 8 dots wide */ in tridentfb_set_par()
1294 vga_mm_wseq(par->io_virt, 2, 0x0F); in tridentfb_set_par()
1295 vga_mm_wseq(par->io_virt, 3, 0); in tridentfb_set_par()
1296 vga_mm_wseq(par->io_virt, 4, 0x0E); /* memory mode enable bitmaps ?? */ in tridentfb_set_par()
1299 vclk = PICOS2KHZ(info->var.pixclock); in tridentfb_set_par()
1303 if (bpp == 32 || (par->chip_id == TGUI9440 && bpp == 16)) { in tridentfb_set_par()
1321 fb_readb(par->io_virt + VGA_IS1_RC); /* flip-flop to index */ in tridentfb_set_par()
1345 if (par->flatpanel) in tridentfb_set_par()
1346 set_number_of_lines(par, info->var.yres); in tridentfb_set_par()
1347 info->fix.line_length = info->var.xres_virtual * bpp / 8; in tridentfb_set_par()
1348 set_lwidth(par, info->fix.line_length / 8); in tridentfb_set_par()
1350 if (!(info->flags & FBINFO_HWACCEL_DISABLED)) in tridentfb_set_par()
1351 par->init_accel(par, info->var.xres_virtual, bpp); in tridentfb_set_par()
1353 info->fix.visual = (bpp == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; in tridentfb_set_par()
1354 info->cmap.len = (bpp == 8) ? 256 : 16; in tridentfb_set_par()
1364 int bpp = info->var.bits_per_pixel; in tridentfb_setcolreg()
1365 struct tridentfb_par *par = info->par; in tridentfb_setcolreg()
1367 if (regno >= info->cmap.len) in tridentfb_setcolreg()
1385 ((u32 *)(info->pseudo_palette))[regno] = col; in tridentfb_setcolreg()
1387 ((u32 *)info->pseudo_palette)[regno] = in tridentfb_setcolreg()
1397 /* Try blanking the screen. For flat panels it does nothing */
1401 struct tridentfb_par *par = info->par; in tridentfb_blank()
1404 if (par->flatpanel) in tridentfb_blank()
1478 info = framebuffer_alloc(sizeof(struct tridentfb_par), &dev->dev); in trident_pci_probe()
1480 return -ENOMEM; in trident_pci_probe()
1481 default_par = info->par; in trident_pci_probe()
1483 chip_id = id->device; in trident_pci_probe()
1524 default_par->init_accel = xp_init_accel; in trident_pci_probe()
1525 default_par->wait_engine = xp_wait_engine; in trident_pci_probe()
1526 default_par->fill_rect = xp_fill_rect; in trident_pci_probe()
1527 default_par->copy_rect = xp_copy_rect; in trident_pci_probe()
1530 default_par->init_accel = blade_init_accel; in trident_pci_probe()
1531 default_par->wait_engine = blade_wait_engine; in trident_pci_probe()
1532 default_par->fill_rect = blade_fill_rect; in trident_pci_probe()
1533 default_par->copy_rect = blade_copy_rect; in trident_pci_probe()
1534 default_par->image_blit = blade_image_blit; in trident_pci_probe()
1537 default_par->init_accel = image_init_accel; in trident_pci_probe()
1538 default_par->wait_engine = image_wait_engine; in trident_pci_probe()
1539 default_par->fill_rect = image_fill_rect; in trident_pci_probe()
1540 default_par->copy_rect = image_copy_rect; in trident_pci_probe()
1543 default_par->init_accel = tgui_init_accel; in trident_pci_probe()
1544 default_par->wait_engine = xp_wait_engine; in trident_pci_probe()
1545 default_par->fill_rect = tgui_fill_rect; in trident_pci_probe()
1546 default_par->copy_rect = tgui_copy_rect; in trident_pci_probe()
1550 default_par->chip_id = chip_id; in trident_pci_probe()
1560 return -1; in trident_pci_probe()
1563 default_par->io_virt = ioremap(tridentfb_fix.mmio_start, in trident_pci_probe()
1566 if (!default_par->io_virt) { in trident_pci_probe()
1568 err = -1; in trident_pci_probe()
1581 disable_mmio(info->par); in trident_pci_probe()
1582 err = -1; in trident_pci_probe()
1586 info->screen_base = ioremap(tridentfb_fix.smem_start, in trident_pci_probe()
1589 if (!info->screen_base) { in trident_pci_probe()
1591 err = -1; in trident_pci_probe()
1595 default_par->flatpanel = is_flatpanel(default_par); in trident_pci_probe()
1597 if (default_par->flatpanel) in trident_pci_probe()
1600 info->fix = tridentfb_fix; in trident_pci_probe()
1601 info->fbops = &tridentfb_ops; in trident_pci_probe()
1602 info->pseudo_palette = default_par->pseudo_pal; in trident_pci_probe()
1604 info->flags = FBINFO_HWACCEL_YPAN; in trident_pci_probe()
1605 if (!noaccel && default_par->init_accel) { in trident_pci_probe()
1606 info->flags &= ~FBINFO_HWACCEL_DISABLED; in trident_pci_probe()
1607 info->flags |= FBINFO_HWACCEL_COPYAREA; in trident_pci_probe()
1608 info->flags |= FBINFO_HWACCEL_FILLRECT; in trident_pci_probe()
1610 info->flags |= FBINFO_HWACCEL_DISABLED; in trident_pci_probe()
1613 info->flags |= FBINFO_READS_FAST; in trident_pci_probe()
1615 info->pixmap.addr = kmalloc(4096, GFP_KERNEL); in trident_pci_probe()
1616 if (!info->pixmap.addr) { in trident_pci_probe()
1617 err = -ENOMEM; in trident_pci_probe()
1621 info->pixmap.size = 4096; in trident_pci_probe()
1622 info->pixmap.buf_align = 4; in trident_pci_probe()
1623 info->pixmap.scan_align = 1; in trident_pci_probe()
1624 info->pixmap.access_align = 32; in trident_pci_probe()
1625 info->pixmap.flags = FB_PIXMAP_SYSTEM; in trident_pci_probe()
1626 info->var.bits_per_pixel = 8; in trident_pci_probe()
1628 if (default_par->image_blit) { in trident_pci_probe()
1629 info->flags |= FBINFO_HWACCEL_IMAGEBLIT; in trident_pci_probe()
1630 info->pixmap.scan_align = 4; in trident_pci_probe()
1635 info->flags |= FBINFO_HWACCEL_DISABLED; in trident_pci_probe()
1636 info->pixmap.scan_align = 1; in trident_pci_probe()
1640 u8 *edid = fb_ddc_read(&default_par->ddc_adapter); in trident_pci_probe()
1642 default_par->ddc_registered = true; in trident_pci_probe()
1644 fb_edid_to_monspecs(edid, &info->monspecs); in trident_pci_probe()
1646 if (!info->monspecs.modedb) in trident_pci_probe()
1647 dev_err(info->device, "error getting mode database\n"); in trident_pci_probe()
1651 fb_videomode_to_modelist(info->monspecs.modedb, in trident_pci_probe()
1652 info->monspecs.modedb_len, in trident_pci_probe()
1653 &info->modelist); in trident_pci_probe()
1654 m = fb_find_best_display(&info->monspecs, in trident_pci_probe()
1655 &info->modelist); in trident_pci_probe()
1657 fb_videomode_to_var(&info->var, m); in trident_pci_probe()
1658 /* fill all other info->var's fields */ in trident_pci_probe()
1659 if (tridentfb_check_var(&info->var, in trident_pci_probe()
1668 mode_option = "640x480-8@60"; in trident_pci_probe()
1672 err = fb_find_mode(&info->var, info, mode_option, in trident_pci_probe()
1673 info->monspecs.modedb, in trident_pci_probe()
1674 info->monspecs.modedb_len, in trident_pci_probe()
1675 NULL, info->var.bits_per_pixel); in trident_pci_probe()
1677 err = -EINVAL; in trident_pci_probe()
1678 dev_err(info->device, "mode %s not found\n", in trident_pci_probe()
1680 fb_destroy_modedb(info->monspecs.modedb); in trident_pci_probe()
1681 info->monspecs.modedb = NULL; in trident_pci_probe()
1686 fb_destroy_modedb(info->monspecs.modedb); in trident_pci_probe()
1687 info->monspecs.modedb = NULL; in trident_pci_probe()
1689 err = fb_alloc_cmap(&info->cmap, 256, 0); in trident_pci_probe()
1693 info->var.activate |= FB_ACTIVATE_NOW; in trident_pci_probe()
1694 info->device = &dev->dev; in trident_pci_probe()
1697 fb_dealloc_cmap(&info->cmap); in trident_pci_probe()
1698 err = -EINVAL; in trident_pci_probe()
1701 output("fb%d: %s frame buffer device %dx%d-%dbpp\n", in trident_pci_probe()
1702 info->node, info->fix.id, info->var.xres, in trident_pci_probe()
1703 info->var.yres, info->var.bits_per_pixel); in trident_pci_probe()
1709 if (default_par->ddc_registered) in trident_pci_probe()
1710 i2c_del_adapter(&default_par->ddc_adapter); in trident_pci_probe()
1711 kfree(info->pixmap.addr); in trident_pci_probe()
1712 if (info->screen_base) in trident_pci_probe()
1713 iounmap(info->screen_base); in trident_pci_probe()
1714 disable_mmio(info->par); in trident_pci_probe()
1716 if (default_par->io_virt) in trident_pci_probe()
1717 iounmap(default_par->io_virt); in trident_pci_probe()
1725 struct tridentfb_par *par = info->par; in trident_pci_remove()
1728 if (par->ddc_registered) in trident_pci_remove()
1729 i2c_del_adapter(&par->ddc_adapter); in trident_pci_remove()
1730 iounmap(par->io_virt); in trident_pci_remove()
1731 iounmap(info->screen_base); in trident_pci_remove()
1732 kfree(info->pixmap.addr); in trident_pci_remove()
1733 fb_dealloc_cmap(&info->cmap); in trident_pci_remove()
1818 return -ENODEV; in tridentfb_init()
1822 return -ENODEV; in tridentfb_init()