From patchwork Fri Dec 31 05:56:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Cook X-Patchwork-Id: 442091 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBV5v5sf029002 for ; Fri, 31 Dec 2010 05:57:07 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750738Ab0LaF5D (ORCPT ); Fri, 31 Dec 2010 00:57:03 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:33980 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750767Ab0LaF5C (ORCPT ); Fri, 31 Dec 2010 00:57:02 -0500 Received: by gyb11 with SMTP id 11so4535088gyb.19 for ; Thu, 30 Dec 2010 21:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=C14fbkhH8ivrHJXDT7jV50KjjPpeXoGQNlOOl5KrKOU=; b=FZZGN9GjBxlRoyL3pkzgETfJzDsA3vbKgG4L1Zq488GF2WW+6ekCX9Di0X2t5zsLN4 w7AeSJqErFyam0M9JVi7BsXLapO+CF1FnAHApEpcfflLQvvR9wwlyCaE7ZguZjYMkqd6 o//2v97O0DYZG2fOUxj7dzi5MsQs9DnPdRqpY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=dNQmYEsLLx0+rxOTwwN9+sRorii+Jc9CDTah6yO4CaV/hge/LMw9Ajf9GBPnourlxU wiYuNbzuJdg8jRJ619t9qdNXROVNgPz3dInJqAT+gHcBnpxCCEB2feZc/ZwqtuMgMIH/ ELHjjjDgoF2wgT/R8ERVV4+V5D5XREKp9IP94= Received: by 10.236.95.17 with SMTP id o17mr9108130yhf.10.1293775021205; Thu, 30 Dec 2010 21:57:01 -0800 (PST) Received: from localhost.localdomain ([71.145.150.5]) by mx.google.com with ESMTPS id 8sm339782yhl.44.2010.12.30.21.56.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Dec 2010 21:57:00 -0800 (PST) From: Brent Cook To: linux-fbdev@vger.kernel.org Cc: Brent Cook Subject: [PATCH] Fix the HGA framebuffer driver Date: Thu, 30 Dec 2010 23:56:50 -0600 Message-Id: <1293775010-4503-1-git-send-email-busterb@gmail.com> X-Mailer: git-send-email 1.7.2.3 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 31 Dec 2010 05:57:07 +0000 (UTC) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 27c1fb4..d6af5a2 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -750,24 +750,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" diff --git a/drivers/video/hgafb.c b/drivers/video/hgafb.c index af8f0f2..4052718 100644 --- a/drivers/video/hgafb.c +++ b/drivers/video/hgafb.c @@ -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; @@ -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); @@ -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++; } @@ -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--; } @@ -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,