Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225660
b: refs/heads/master
c: 529ed80
h: refs/heads/master
v: v3
  • Loading branch information
Brent Cook authored and Paul Mundt committed Jan 6, 2011
1 parent 96bf6b6 commit 6ce99d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e045da7d835a28950543f5f10f0cb1905ca9bbaf
refs/heads/master: 529ed806d4540d23ca2f68b28c3715d1566fc3ac
14 changes: 2 additions & 12 deletions trunk/drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -824,24 +824,14 @@ config FB_N411
config FB_HGA
tristate "Hercules mono graphics support"
depends on FB && X86
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
help
Say Y here if you have a Hercules mono graphics card.

To compile this driver as a module, choose M here: the
module will be called hgafb.

As this card technology is 15 years old, most people will answer N
here.

config FB_HGA_ACCEL
bool "Hercules mono Acceleration functions (EXPERIMENTAL)"
depends on FB_HGA && EXPERIMENTAL
---help---
This will compile the Hercules mono graphics with
acceleration functions.
As this card technology is at least 25 years old,
most people will answer N here.

config FB_SGIVW
tristate "SGI Visual Workstation framebuffer support"
Expand Down
22 changes: 9 additions & 13 deletions trunk/drivers/video/hgafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ static int hgafb_blank(int blank_mode, struct fb_info *info)
/*
* Accel functions
*/
#ifdef CONFIG_FB_HGA_ACCEL
static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
u_int rows, y;
Expand All @@ -466,7 +465,7 @@ static void hgafb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
dest = rowaddr(info, y) + (rect->dx >> 3);
switch (rect->rop) {
case ROP_COPY:
//fb_memset(dest, rect->color, (rect->width >> 3));
memset_io(dest, rect->color, (rect->width >> 3));
break;
case ROP_XOR:
fb_writeb(~(fb_readb(dest)), dest);
Expand All @@ -488,7 +487,7 @@ static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
for (rows = area->height; rows--; ) {
src = rowaddr(info, y1) + (area->sx >> 3);
dest = rowaddr(info, y2) + (area->dx >> 3);
//fb_memmove(dest, src, (area->width >> 3));
memmove(dest, src, (area->width >> 3));
y1++;
y2++;
}
Expand All @@ -499,7 +498,7 @@ static void hgafb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
for (rows = area->height; rows--;) {
src = rowaddr(info, y1) + (area->sx >> 3);
dest = rowaddr(info, y2) + (area->dx >> 3);
//fb_memmove(dest, src, (area->width >> 3));
memmove(dest, src, (area->width >> 3));
y1--;
y2--;
}
Expand All @@ -511,20 +510,17 @@ static void hgafb_imageblit(struct fb_info *info, const struct fb_image *image)
u8 __iomem *dest;
u8 *cdat = (u8 *) image->data;
u_int rows, y = image->dy;
u_int x;
u8 d;

for (rows = image->height; rows--; y++) {
d = *cdat++;
dest = rowaddr(info, y) + (image->dx >> 3);
fb_writeb(d, dest);
for (x = 0; x < image->width; x+= 8) {
d = *cdat++;
dest = rowaddr(info, y) + ((image->dx + x)>> 3);
fb_writeb(d, dest);
}
}
}
#else /* !CONFIG_FB_HGA_ACCEL */
#define hgafb_fillrect cfb_fillrect
#define hgafb_copyarea cfb_copyarea
#define hgafb_imageblit cfb_imageblit
#endif /* CONFIG_FB_HGA_ACCEL */


static struct fb_ops hgafb_ops = {
.owner = THIS_MODULE,
Expand Down

0 comments on commit 6ce99d0

Please sign in to comment.