• Home
  • Raw
  • Download

Lines Matching +full:scaled +full:- +full:sync

8  * Copyright (c) 1998-2000 Ilario Nardinocchi (nardinoc@CS.UniBO.IT)
14 * I have a Creative Graphics Blaster Exxtreme card - pm2fb on x86. I
16 * hopefully other big-endian) devices now work, thanks to a lot of
70 * support on TVP4010 and similar where there is no RAMDAC - see
71 * comment in set_video) always request +ve sync regardless of what
73 * fixed-frequency monitor which absolutely has to have -ve sync. So
74 * these flags allow the user to specify that requests for +ve sync
75 * should be silently turned in -ve sync.
127 .height = -1,
128 .width = -1,
146 return fb_readl(p->v_regs + off); in pm2_RD()
151 fb_writel(v, p->v_regs + off); in pm2_WR()
266 curr = (clk > f) ? clk - f : f - clk; in pm2_mnp()
293 if (clk > f - delta && clk < f + delta) { in pm2v_mnp()
294 delta = (clk > f) ? clk - f : f - clk; in pm2v_mnp()
311 while (i--) { in clear_palette()
321 if (p->type == PM2_TYPE_PERMEDIA2V) in reset_card()
336 pm2_WR(p, PM2R_MEM_CONTROL, p->mem_control); in reset_card()
337 pm2_WR(p, PM2R_BOOT_ADDRESS, p->boot_address); in reset_card()
339 pm2_WR(p, PM2R_MEM_CONFIG, p->mem_config); in reset_card()
382 switch (p->type) { in reset_config()
402 * The hardware is little-endian. When used in big-endian in set_aperture()
403 * hosts, the on-chip aperture settings are used where in set_aperture()
411 case 24: /* RGB->BGR */ in set_aperture()
417 case 8: /* B->B */ in set_aperture()
420 case 16: /* HL->LH */ in set_aperture()
423 case 32: /* RGBA->ABGR */ in set_aperture()
451 switch (par->type) { in set_memclock()
462 for (i = 256; i; i--) in set_memclock()
476 for (i = 256; i; i--) in set_memclock()
488 switch (par->type) { in set_pixclock()
498 for (i = 256; i; i--) in set_pixclock()
525 * the RAMDAC to invert the sync if necessary. in set_video()
533 switch (p->type) { in set_video()
554 * pm2fb_check_var - Optional function. Validates a var passed in.
567 if (var->bits_per_pixel != 8 && var->bits_per_pixel != 16 && in pm2fb_check_var()
568 var->bits_per_pixel != 24 && var->bits_per_pixel != 32) { in pm2fb_check_var()
569 DPRINTK("depth not supported: %u\n", var->bits_per_pixel); in pm2fb_check_var()
570 return -EINVAL; in pm2fb_check_var()
573 if (var->xres != var->xres_virtual) { in pm2fb_check_var()
576 return -EINVAL; in pm2fb_check_var()
579 if (var->yres > var->yres_virtual) { in pm2fb_check_var()
582 return -EINVAL; in pm2fb_check_var()
586 if (var->yres_virtual > 2047) { in pm2fb_check_var()
587 var->yres_virtual = 2047; in pm2fb_check_var()
590 if (var->xoffset) { in pm2fb_check_var()
592 return -EINVAL; in pm2fb_check_var()
595 if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) { in pm2fb_check_var()
597 return -EINVAL; in pm2fb_check_var()
600 var->xres = (var->xres + 15) & ~15; /* could sometimes be 8 */ in pm2fb_check_var()
601 lpitch = var->xres * ((var->bits_per_pixel + 7) >> 3); in pm2fb_check_var()
603 if (var->xres < 320 || var->xres > 1600) { in pm2fb_check_var()
604 DPRINTK("width not supported: %u\n", var->xres); in pm2fb_check_var()
605 return -EINVAL; in pm2fb_check_var()
608 if (var->yres < 200 || var->yres > 1200) { in pm2fb_check_var()
609 DPRINTK("height not supported: %u\n", var->yres); in pm2fb_check_var()
610 return -EINVAL; in pm2fb_check_var()
613 if (lpitch * var->yres_virtual > info->fix.smem_len) { in pm2fb_check_var()
615 var->xres, var->yres_virtual, var->bits_per_pixel); in pm2fb_check_var()
616 return -EINVAL; in pm2fb_check_var()
619 if (PICOS2KHZ(var->pixclock) > PM2_MAX_PIXCLOCK) { in pm2fb_check_var()
621 PICOS2KHZ(var->pixclock)); in pm2fb_check_var()
622 return -EINVAL; in pm2fb_check_var()
625 var->transp.offset = 0; in pm2fb_check_var()
626 var->transp.length = 0; in pm2fb_check_var()
627 switch (var->bits_per_pixel) { in pm2fb_check_var()
629 var->red.length = 8; in pm2fb_check_var()
630 var->green.length = 8; in pm2fb_check_var()
631 var->blue.length = 8; in pm2fb_check_var()
634 var->red.offset = 11; in pm2fb_check_var()
635 var->red.length = 5; in pm2fb_check_var()
636 var->green.offset = 5; in pm2fb_check_var()
637 var->green.length = 6; in pm2fb_check_var()
638 var->blue.offset = 0; in pm2fb_check_var()
639 var->blue.length = 5; in pm2fb_check_var()
642 var->transp.offset = 24; in pm2fb_check_var()
643 var->transp.length = 8; in pm2fb_check_var()
644 var->red.offset = 16; in pm2fb_check_var()
645 var->green.offset = 8; in pm2fb_check_var()
646 var->blue.offset = 0; in pm2fb_check_var()
647 var->red.length = 8; in pm2fb_check_var()
648 var->green.length = 8; in pm2fb_check_var()
649 var->blue.length = 8; in pm2fb_check_var()
653 var->red.offset = 0; in pm2fb_check_var()
654 var->blue.offset = 16; in pm2fb_check_var()
656 var->red.offset = 16; in pm2fb_check_var()
657 var->blue.offset = 0; in pm2fb_check_var()
659 var->green.offset = 8; in pm2fb_check_var()
660 var->red.length = 8; in pm2fb_check_var()
661 var->green.length = 8; in pm2fb_check_var()
662 var->blue.length = 8; in pm2fb_check_var()
665 var->height = -1; in pm2fb_check_var()
666 var->width = -1; in pm2fb_check_var()
668 var->accel_flags = 0; /* Can't mmap if this is on */ in pm2fb_check_var()
671 var->xres, var->yres, var->bits_per_pixel); in pm2fb_check_var()
676 * pm2fb_set_par - Alters the hardware state.
684 struct pm2fb_par *par = info->par; in pm2fb_set_par()
686 u32 width = (info->var.xres_virtual + 7) & ~7; in pm2fb_set_par()
687 u32 height = info->var.yres_virtual; in pm2fb_set_par()
688 u32 depth = (info->var.bits_per_pixel + 7) & ~7; in pm2fb_set_par()
698 u32 misc = 1; /* 8-bit DAC */ in pm2fb_set_par()
699 u32 xres = (info->var.xres + 31) & ~31; in pm2fb_set_par()
705 if (par->memclock) in pm2fb_set_par()
706 set_memclock(par, par->memclock); in pm2fb_set_par()
709 data64 = depth > 8 || par->type == PM2_TYPE_PERMEDIA2V; in pm2fb_set_par()
711 pixclock = PICOS2KHZ(info->var.pixclock); in pm2fb_set_par()
714 return -EINVAL; in pm2fb_set_par()
717 hsstart = to3264(info->var.right_margin, depth, data64); in pm2fb_set_par()
718 hsend = hsstart + to3264(info->var.hsync_len, depth, data64); in pm2fb_set_par()
719 hbend = hsend + to3264(info->var.left_margin, depth, data64); in pm2fb_set_par()
720 htotal = to3264(xres, depth, data64) + hbend - 1; in pm2fb_set_par()
721 vsstart = (info->var.lower_margin) in pm2fb_set_par()
722 ? info->var.lower_margin - 1 in pm2fb_set_par()
724 vsend = info->var.lower_margin + info->var.vsync_len - 1; in pm2fb_set_par()
725 vbend = info->var.lower_margin + info->var.vsync_len + in pm2fb_set_par()
726 info->var.upper_margin; in pm2fb_set_par()
727 vtotal = info->var.yres + vbend - 1; in pm2fb_set_par()
729 base = to3264(info->var.yoffset * xres + info->var.xoffset, depth, 1); in pm2fb_set_par()
733 if (info->var.sync & FB_SYNC_HOR_HIGH_ACT) { in pm2fb_set_par()
735 DPRINTK("ignoring +hsync, using -hsync.\n"); in pm2fb_set_par()
742 if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) { in pm2fb_set_par()
744 DPRINTK("ignoring +vsync, using -vsync.\n"); in pm2fb_set_par()
751 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) { in pm2fb_set_par()
753 return -EINVAL; in pm2fb_set_par()
755 if ((info->var.vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) in pm2fb_set_par()
757 if ((info->var.activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) in pm2fb_set_par()
759 par->video = video; in pm2fb_set_par()
761 info->fix.visual = in pm2fb_set_par()
763 info->fix.line_length = info->var.xres * depth / 8; in pm2fb_set_par()
764 info->cmap.len = 256; in pm2fb_set_par()
769 if (par->type == PM2_TYPE_PERMEDIA2V) { in pm2fb_set_par()
831 switch (par->type) { in pm2fb_set_par()
847 info->var.xres, info->var.yres, info->var.bits_per_pixel); in pm2fb_set_par()
852 * pm2fb_setcolreg - Sets a color register.
861 * magnitude which needs to be scaled in this function for the hardware.
870 struct pm2fb_par *par = info->par; in pm2fb_setcolreg()
872 if (regno >= info->cmap.len) /* no. of hw registers */ in pm2fb_setcolreg()
873 return -EINVAL; in pm2fb_setcolreg()
880 if (info->var.grayscale) in pm2fb_setcolreg()
884 * var->{color}.offset contains start of bitfield in pm2fb_setcolreg()
885 * var->{color}.length contains length of bitfield in pm2fb_setcolreg()
893 * var->{color}.offset is 0 in pm2fb_setcolreg()
894 * var->{color}.length contains width of DAC in pm2fb_setcolreg()
899 * var->{color}.offset contains start of bitfield in pm2fb_setcolreg()
900 * var->{color}.length contains length of bitfield in pm2fb_setcolreg()
906 #define CNVT_TOHW(val, width) ((((val) << (width)) + 0x7FFF -(val)) >> 16) in pm2fb_setcolreg()
907 switch (info->fix.visual) { in pm2fb_setcolreg()
910 red = CNVT_TOHW(red, info->var.red.length); in pm2fb_setcolreg()
911 green = CNVT_TOHW(green, info->var.green.length); in pm2fb_setcolreg()
912 blue = CNVT_TOHW(blue, info->var.blue.length); in pm2fb_setcolreg()
913 transp = CNVT_TOHW(transp, info->var.transp.length); in pm2fb_setcolreg()
927 if (info->fix.visual == FB_VISUAL_TRUECOLOR) { in pm2fb_setcolreg()
931 return -EINVAL; in pm2fb_setcolreg()
933 v = (red << info->var.red.offset) | in pm2fb_setcolreg()
934 (green << info->var.green.offset) | in pm2fb_setcolreg()
935 (blue << info->var.blue.offset) | in pm2fb_setcolreg()
936 (transp << info->var.transp.offset); in pm2fb_setcolreg()
938 switch (info->var.bits_per_pixel) { in pm2fb_setcolreg()
944 par->palette[regno] = v; in pm2fb_setcolreg()
948 } else if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) in pm2fb_setcolreg()
955 * pm2fb_pan_display - Pans the display.
961 * If the values don't fit, return -EINVAL.
969 struct pm2fb_par *p = info->par; in pm2fb_pan_display()
971 u32 depth = (info->var.bits_per_pixel + 7) & ~7; in pm2fb_pan_display()
972 u32 xres = (info->var.xres + 31) & ~31; in pm2fb_pan_display()
975 base = to3264(var->yoffset * xres + var->xoffset, depth, 1); in pm2fb_pan_display()
982 * pm2fb_blank - Blanks the display.
987 * blanking succeeded, != 0 if un-/blanking failed due to e.g. a
999 struct pm2fb_par *par = info->par; in pm2fb_blank()
1000 u32 video = par->video; in pm2fb_blank()
1032 struct pm2fb_par *par = info->par; in pm2fb_sync()
1048 struct pm2fb_par *par = info->par; in pm2fb_fillrect()
1051 u32 color = (info->fix.visual == FB_VISUAL_TRUECOLOR) ? in pm2fb_fillrect()
1052 ((u32 *)info->pseudo_palette)[region->color] : region->color; in pm2fb_fillrect()
1054 if (info->state != FBINFO_STATE_RUNNING) in pm2fb_fillrect()
1056 if ((info->flags & FBINFO_HWACCEL_DISABLED) || in pm2fb_fillrect()
1057 region->rop != ROP_COPY ) { in pm2fb_fillrect()
1062 vxres = info->var.xres_virtual; in pm2fb_fillrect()
1063 vyres = info->var.yres_virtual; in pm2fb_fillrect()
1072 modded.width = vxres - modded.dx; in pm2fb_fillrect()
1074 modded.height = vyres - modded.dy; in pm2fb_fillrect()
1076 if (info->var.bits_per_pixel == 8) in pm2fb_fillrect()
1078 if (info->var.bits_per_pixel <= 16) in pm2fb_fillrect()
1085 if (info->var.bits_per_pixel != 24) { in pm2fb_fillrect()
1106 struct pm2fb_par *par = info->par; in pm2fb_copyarea()
1110 if (info->state != FBINFO_STATE_RUNNING) in pm2fb_copyarea()
1112 if (info->flags & FBINFO_HWACCEL_DISABLED) { in pm2fb_copyarea()
1119 vxres = info->var.xres_virtual; in pm2fb_copyarea()
1120 vyres = info->var.yres_virtual; in pm2fb_copyarea()
1128 modded.width = vxres - modded.sx; in pm2fb_copyarea()
1130 modded.width = vxres - modded.dx; in pm2fb_copyarea()
1132 modded.height = vyres - modded.sy; in pm2fb_copyarea()
1134 modded.height = vyres - modded.dy; in pm2fb_copyarea()
1140 ((modded.sy - modded.dy) & 0xfff) << 16 | in pm2fb_copyarea()
1141 ((modded.sx - modded.dx) & 0xfff)); in pm2fb_copyarea()
1152 struct pm2fb_par *par = info->par; in pm2fb_imageblit()
1153 u32 height = image->height; in pm2fb_imageblit()
1155 const u32 *src = (const u32 *)image->data; in pm2fb_imageblit()
1156 u32 xres = (info->var.xres + 31) & ~31; in pm2fb_imageblit()
1163 if (info->state != FBINFO_STATE_RUNNING) in pm2fb_imageblit()
1165 if (info->flags & FBINFO_HWACCEL_DISABLED || image->depth != 1) { in pm2fb_imageblit()
1169 switch (info->fix.visual) { in pm2fb_imageblit()
1171 fgx = image->fg_color; in pm2fb_imageblit()
1172 bgx = image->bg_color; in pm2fb_imageblit()
1176 fgx = par->palette[image->fg_color]; in pm2fb_imageblit()
1177 bgx = par->palette[image->bg_color]; in pm2fb_imageblit()
1180 if (info->var.bits_per_pixel == 8) { in pm2fb_imageblit()
1184 if (info->var.bits_per_pixel <= 16) { in pm2fb_imageblit()
1192 ((image->dy & 0xfff) << 16) | (image->dx & 0x0fff)); in pm2fb_imageblit()
1194 (((image->dy + image->height) & 0x0fff) << 16) | in pm2fb_imageblit()
1195 ((image->dx + image->width) & 0x0fff)); in pm2fb_imageblit()
1200 ((image->dy & 0xfff) << 16) | (image->dx & 0x0fff)); in pm2fb_imageblit()
1202 ((image->height & 0x0fff) << 16) | in pm2fb_imageblit()
1203 ((image->width) & 0x0fff)); in pm2fb_imageblit()
1204 if (info->var.bits_per_pixel == 24) { in pm2fb_imageblit()
1235 while (height--) { in pm2fb_imageblit()
1236 int width = ((image->width + 7) >> 3) in pm2fb_imageblit()
1237 + info->pixmap.scan_align - 1; in pm2fb_imageblit()
1240 while (width--) { in pm2fb_imageblit()
1261 struct pm2fb_par *par = info->par; in pm2vfb_cursor()
1263 int x = cursor->image.dx - info->var.xoffset; in pm2vfb_cursor()
1264 int y = cursor->image.dy - info->var.yoffset; in pm2vfb_cursor()
1266 if (cursor->enable) in pm2vfb_cursor()
1271 if (!cursor->enable) in pm2vfb_cursor()
1283 if (!cursor->set) in pm2vfb_cursor()
1286 if (cursor->set & FB_CUR_SETHOT) { in pm2vfb_cursor()
1288 cursor->hot.x & 0x3f); in pm2vfb_cursor()
1290 cursor->hot.y & 0x3f); in pm2vfb_cursor()
1293 if (cursor->set & FB_CUR_SETCMAP) { in pm2vfb_cursor()
1294 u32 fg_idx = cursor->image.fg_color; in pm2vfb_cursor()
1295 u32 bg_idx = cursor->image.bg_color; in pm2vfb_cursor()
1296 struct fb_cmap cmap = info->cmap; in pm2vfb_cursor()
1316 if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) { in pm2vfb_cursor()
1317 u8 *bitmap = (u8 *)cursor->image.data; in pm2vfb_cursor()
1318 u8 *mask = (u8 *)cursor->mask; in pm2vfb_cursor()
1322 for (i = 0; i < cursor->image.height; i++) { in pm2vfb_cursor()
1323 int j = (cursor->image.width + 7) >> 3; in pm2vfb_cursor()
1324 int k = 8 - j; in pm2vfb_cursor()
1328 for (; j > 0; j--) { in pm2vfb_cursor()
1331 if (cursor->rop == ROP_COPY) in pm2vfb_cursor()
1344 for (; k > 0; k--) { in pm2vfb_cursor()
1362 struct pm2fb_par *par = info->par; in pm2fb_cursor()
1366 return -EINVAL; /* just to force soft_cursor() call */ in pm2fb_cursor()
1368 /* Too large of a cursor or wrong bpp :-( */ in pm2fb_cursor()
1369 if (cursor->image.width > 64 || in pm2fb_cursor()
1370 cursor->image.height > 64 || in pm2fb_cursor()
1371 cursor->image.depth > 1) in pm2fb_cursor()
1372 return -EINVAL; in pm2fb_cursor()
1374 if (par->type == PM2_TYPE_PERMEDIA2V) in pm2fb_cursor()
1378 if (cursor->enable) in pm2fb_cursor()
1388 if (!cursor->set) in pm2fb_cursor()
1391 if (cursor->set & FB_CUR_SETPOS) { in pm2fb_cursor()
1392 int x = cursor->image.dx - info->var.xoffset + 63; in pm2fb_cursor()
1393 int y = cursor->image.dy - info->var.yoffset + 63; in pm2fb_cursor()
1402 if (cursor->set & FB_CUR_SETCMAP) { in pm2fb_cursor()
1403 u32 fg_idx = cursor->image.fg_color; in pm2fb_cursor()
1404 u32 bg_idx = cursor->image.bg_color; in pm2fb_cursor()
1409 info->cmap.red[bg_idx] >> 8); in pm2fb_cursor()
1411 info->cmap.green[bg_idx] >> 8); in pm2fb_cursor()
1413 info->cmap.blue[bg_idx] >> 8); in pm2fb_cursor()
1416 info->cmap.red[fg_idx] >> 8); in pm2fb_cursor()
1418 info->cmap.green[fg_idx] >> 8); in pm2fb_cursor()
1420 info->cmap.blue[fg_idx] >> 8); in pm2fb_cursor()
1423 if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) { in pm2fb_cursor()
1424 u8 *bitmap = (u8 *)cursor->image.data; in pm2fb_cursor()
1425 u8 *mask = (u8 *)cursor->mask; in pm2fb_cursor()
1431 for (i = 0; i < cursor->image.height; i++) { in pm2fb_cursor()
1432 int j = (cursor->image.width + 7) >> 3; in pm2fb_cursor()
1433 int k = 8 - j; in pm2fb_cursor()
1436 for (; j > 0; j--) { in pm2fb_cursor()
1439 if (cursor->rop == ROP_COPY) in pm2fb_cursor()
1446 for (; k > 0; k--) in pm2fb_cursor()
1452 while (j-- > 0) in pm2fb_cursor()
1456 mask = (u8 *)cursor->mask; in pm2fb_cursor()
1457 for (i = 0; i < cursor->image.height; i++) { in pm2fb_cursor()
1458 int j = (cursor->image.width + 7) >> 3; in pm2fb_cursor()
1459 int k = 8 - j; in pm2fb_cursor()
1462 for (; j > 0; j--) { in pm2fb_cursor()
1467 for (; k > 0; k--) in pm2fb_cursor()
1473 while (j-- > 0) in pm2fb_cursor()
1480 /* ------------ Hardware Independent Functions ------------ */
1518 int retval = -ENXIO; in pm2fb_probe()
1526 info = framebuffer_alloc(sizeof(struct pm2fb_par), &pdev->dev); in pm2fb_probe()
1528 return -ENOMEM; in pm2fb_probe()
1529 default_par = info->par; in pm2fb_probe()
1531 switch (pdev->device) { in pm2fb_probe()
1534 default_par->type = PM2_TYPE_PERMEDIA2; in pm2fb_probe()
1538 default_par->type = PM2_TYPE_PERMEDIA2; in pm2fb_probe()
1542 default_par->type = PM2_TYPE_PERMEDIA2V; in pm2fb_probe()
1552 * map is little-endian, upper map is big-endian. in pm2fb_probe()
1555 DPRINTK("Adjusting register base for big-endian.\n"); in pm2fb_probe()
1559 /* Registers - request region and map it. */ in pm2fb_probe()
1565 default_par->v_regs = in pm2fb_probe()
1567 if (!default_par->v_regs) { in pm2fb_probe()
1575 default_par->mem_control = pm2_RD(default_par, PM2R_MEM_CONTROL); in pm2fb_probe()
1576 default_par->boot_address = pm2_RD(default_par, PM2R_BOOT_ADDRESS); in pm2fb_probe()
1577 default_par->mem_config = pm2_RD(default_par, PM2R_MEM_CONFIG); in pm2fb_probe()
1579 default_par->mem_control, default_par->boot_address, in pm2fb_probe()
1580 default_par->mem_config); in pm2fb_probe()
1582 if (default_par->mem_control == 0 && in pm2fb_probe()
1583 default_par->boot_address == 0x31 && in pm2fb_probe()
1584 default_par->mem_config == 0x259fffff) { in pm2fb_probe()
1585 default_par->memclock = CVPPC_MEMCLOCK; in pm2fb_probe()
1586 default_par->mem_control = 0; in pm2fb_probe()
1587 default_par->boot_address = 0x20; in pm2fb_probe()
1588 default_par->mem_config = 0xe6002021; in pm2fb_probe()
1589 if (pdev->subsystem_vendor == 0x1048 && in pm2fb_probe()
1590 pdev->subsystem_device == 0x0a31) { in pm2fb_probe()
1593 pdev->subsystem_vendor, pdev->subsystem_device); in pm2fb_probe()
1597 default_par->memclock = 100000; in pm2fb_probe()
1599 if (pdev->subsystem_vendor == 0x3d3d && in pm2fb_probe()
1600 pdev->subsystem_device == 0x0100) { in pm2fb_probe()
1603 pdev->subsystem_vendor, pdev->subsystem_device); in pm2fb_probe()
1607 default_par->memclock = 74894; in pm2fb_probe()
1612 switch (default_par->mem_config & PM2F_MEM_CONFIG_RAM_MASK) { in pm2fb_probe()
1628 /* Linear frame buffer - request region and map it. */ in pm2fb_probe()
1634 info->screen_base = in pm2fb_probe()
1636 if (!info->screen_base) { in pm2fb_probe()
1643 default_par->wc_cookie = arch_phys_wc_add(pm2fb_fix.smem_start, in pm2fb_probe()
1646 info->fbops = &pm2fb_ops; in pm2fb_probe()
1647 info->fix = pm2fb_fix; in pm2fb_probe()
1648 info->pseudo_palette = default_par->palette; in pm2fb_probe()
1649 info->flags = FBINFO_DEFAULT | in pm2fb_probe()
1655 info->pixmap.addr = kmalloc(PM2_PIXMAP_SIZE, GFP_KERNEL); in pm2fb_probe()
1656 if (!info->pixmap.addr) { in pm2fb_probe()
1657 retval = -ENOMEM; in pm2fb_probe()
1660 info->pixmap.size = PM2_PIXMAP_SIZE; in pm2fb_probe()
1661 info->pixmap.buf_align = 4; in pm2fb_probe()
1662 info->pixmap.scan_align = 4; in pm2fb_probe()
1663 info->pixmap.access_align = 32; in pm2fb_probe()
1664 info->pixmap.flags = FB_PIXMAP_SYSTEM; in pm2fb_probe()
1668 info->flags |= FBINFO_HWACCEL_DISABLED; in pm2fb_probe()
1669 info->pixmap.scan_align = 1; in pm2fb_probe()
1675 err = fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8); in pm2fb_probe()
1677 info->var = pm2fb_var; in pm2fb_probe()
1679 retval = fb_alloc_cmap(&info->cmap, 256, 0); in pm2fb_probe()
1688 info->fix.id, pm2fb_fix.smem_len / 1024); in pm2fb_probe()
1698 fb_dealloc_cmap(&info->cmap); in pm2fb_probe()
1700 kfree(info->pixmap.addr); in pm2fb_probe()
1702 iounmap(info->screen_base); in pm2fb_probe()
1705 iounmap(default_par->v_regs); in pm2fb_probe()
1722 struct fb_fix_screeninfo *fix = &info->fix; in pm2fb_remove()
1723 struct pm2fb_par *par = info->par; in pm2fb_remove()
1726 arch_phys_wc_del(par->wc_cookie); in pm2fb_remove()
1727 iounmap(info->screen_base); in pm2fb_remove()
1728 release_mem_region(fix->smem_start, fix->smem_len); in pm2fb_remove()
1729 iounmap(par->v_regs); in pm2fb_remove()
1730 release_mem_region(fix->mmio_start, fix->mmio_len); in pm2fb_remove()
1732 fb_dealloc_cmap(&info->cmap); in pm2fb_remove()
1733 kfree(info->pixmap.addr); in pm2fb_remove()
1761 * This is, comma-separated options following `video=pm2fb:'.
1797 return -ENODEV; in pm2fb_init()
1821 MODULE_PARM_DESC(mode_option, "Initial video mode e.g. '648x480-8@60'");
1823 MODULE_PARM_DESC(mode, "Initial video mode e.g. '648x480-8@60' (deprecated)");
1825 MODULE_PARM_DESC(lowhsync, "Force horizontal sync low regardless of mode");
1827 MODULE_PARM_DESC(lowvsync, "Force vertical sync low regardless of mode");