Lines Matching +full:display +full:- +full:rows

2  * linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
10 * - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
12 * - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
14 * - Revision 0.1.6 (17 Aug 2000): new style structs
16 * - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
18 * - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
19 * HGA-only systems
20 * - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
25 * - Revision 0.1.0 (6 Dec 1999): faster scrolling and minor fixes
26 * - First release (25 Nov 1999)
70 return info->screen_base + HGA_ROWADDR(row); in rowaddr()
73 static int hga_mode = -1; /* 0 = txt, 1 = gfx mode */
119 .height = -1,
120 .width = -1,
138 /* -------------------------------------------------------------------------
142 * ------------------------------------------------------------------------- */
289 return -ENOMEM; in hga_card_detect()
360 return -EINVAL; in hga_card_detect()
364 * hgafb_open - open the framebuffer device
380 * hgafb_release - open the framebuffer device
395 * hgafb_setcolreg - set color registers
419 * hgafb_pan_display - pan or wrap the display
425 * program the hardware. @info->var is updated to the new values.
427 * Returns: %0 on success or %-EINVAL for failure.
433 if (var->vmode & FB_VMODE_YWRAP) { in hgafb_pan_display()
434 if (var->yoffset >= info->var.yres_virtual || in hgafb_pan_display()
435 var->xoffset) in hgafb_pan_display()
436 return -EINVAL; in hgafb_pan_display()
438 if (var->xoffset + info->var.xres > info->var.xres_virtual in hgafb_pan_display()
439 || var->yoffset + info->var.yres > info->var.yres_virtual in hgafb_pan_display()
440 || var->yoffset % 8) in hgafb_pan_display()
441 return -EINVAL; in hgafb_pan_display()
444 hga_pan(var->xoffset, var->yoffset); in hgafb_pan_display()
449 * hgafb_blank - (un)blank the screen
474 u_int rows, y; in hgafb_fillrect() local
477 y = rect->dy; in hgafb_fillrect()
479 for (rows = rect->height; rows--; y++) { in hgafb_fillrect()
480 dest = rowaddr(info, y) + (rect->dx >> 3); in hgafb_fillrect()
481 switch (rect->rop) { in hgafb_fillrect()
483 memset_io(dest, rect->color, (rect->width >> 3)); in hgafb_fillrect()
494 u_int rows, y1, y2; in hgafb_copyarea() local
498 if (area->dy <= area->sy) { in hgafb_copyarea()
499 y1 = area->sy; in hgafb_copyarea()
500 y2 = area->dy; in hgafb_copyarea()
502 for (rows = area->height; rows--; ) { in hgafb_copyarea()
503 src = rowaddr(info, y1) + (area->sx >> 3); in hgafb_copyarea()
504 dest = rowaddr(info, y2) + (area->dx >> 3); in hgafb_copyarea()
505 memmove(dest, src, (area->width >> 3)); in hgafb_copyarea()
510 y1 = area->sy + area->height - 1; in hgafb_copyarea()
511 y2 = area->dy + area->height - 1; in hgafb_copyarea()
513 for (rows = area->height; rows--;) { in hgafb_copyarea()
514 src = rowaddr(info, y1) + (area->sx >> 3); in hgafb_copyarea()
515 dest = rowaddr(info, y2) + (area->dx >> 3); in hgafb_copyarea()
516 memmove(dest, src, (area->width >> 3)); in hgafb_copyarea()
517 y1--; in hgafb_copyarea()
518 y2--; in hgafb_copyarea()
526 u8 *cdat = (u8 *) image->data; in hgafb_imageblit()
527 u_int rows, y = image->dy; in hgafb_imageblit() local
531 for (rows = image->height; rows--; y++) { in hgafb_imageblit()
532 for (x = 0; x < image->width; x+= 8) { in hgafb_imageblit()
534 dest = rowaddr(info, y) + ((image->dx + x)>> 3); in hgafb_imageblit()
554 /* ------------------------------------------------------------------------- *
558 * ------------------------------------------------------------------------- */
560 /* ------------------------------------------------------------------------- */
578 info = framebuffer_alloc(0, &pdev->dev); in hgafb_probe()
581 return -ENOMEM; in hgafb_probe()
587 info->flags = FBINFO_HWACCEL_YPAN; in hgafb_probe()
588 info->var = hga_default_var; in hgafb_probe()
589 info->fix = hga_fix; in hgafb_probe()
590 info->monspecs.hfmin = 0; in hgafb_probe()
591 info->monspecs.hfmax = 0; in hgafb_probe()
592 info->monspecs.vfmin = 10000; in hgafb_probe()
593 info->monspecs.vfmax = 10000; in hgafb_probe()
594 info->monspecs.dpms = 0; in hgafb_probe()
595 info->fbops = &hgafb_ops; in hgafb_probe()
596 info->screen_base = hga_vram; in hgafb_probe()
601 return -EINVAL; in hgafb_probe()
604 fb_info(info, "%s frame buffer device\n", info->fix.id); in hgafb_probe()
645 return -ENODEV; in hgafb_init()
667 /* -------------------------------------------------------------------------
671 * ------------------------------------------------------------------------- */