Thread (3 messages) 3 messages, 2 authors, 2005-07-27

Re: [PATCH 2/2]][RESEND] vesafb: Add blanking support

flat view

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2005-07-27 08:09:54

On Wed, 27 Jul 2005, Antonino A. Daplas wrote:
 Add rudimentary support by manipulating the VGA registers. However,
 not all vesa modes are VGA compatible, so VGA compatiblity is
 checked first. Only 2 levels are supported, powerup and powerdown.
quoted hunk ↗ jump to hunk
+static int vesafb_blank(int blank, struct fb_info *info)
+{
+	int err = 1;
+
+	if (vga_compat) {
+		int loop = 10000;
+		u8 seq = 0, crtc17 = 0;
+	    +		err = 0;
+
+		if (blank) {
+			seq = 0x20;
+			crtc17 = 0x00;
+		} else {
+			seq = 0x00;
+			crtc17 = 0x80;
+		}
+		+		vga_wseq(NULL, 0x00, 0x01);
+		seq |= vga_rseq(NULL, 0x01) & ~0x20;
+		vga_wseq(NULL, 0x00, seq);
+		+		crtc17 |= vga_rcrt(NULL, 0x17) & ~0x80;
+		while (loop--);
+		vga_wcrt(NULL, 0x17, crtc17);
+		vga_wseq(NULL, 0x00, 0x03);		  +	}
+
+	return err;
+}
+
static void vesa_setpalette(int regno, unsigned red, unsigned green,
			    unsigned blue)
{
@@ -176,6 +209,7 @@
	.owner		= THIS_MODULE,
	.fb_setcolreg	= vesafb_setcolreg,
	.fb_pan_display	= vesafb_pan_display,
+	.fb_blank       = vesafb_blank,
Is the screen still blanked (by setting all color registers to black in CLUT
mode) if vga_compat is false?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help