[PATCH 1/2] pm2fb: Blanking fixes

STALE7966d

2 messages, 2 authors, 2004-10-24 · open the first message on its own page

[PATCH 1/2] pm2fb: Blanking fixes

From: Jim Hague <hidden>
Date: 2004-10-22 09:54:42

- Current blanking code forces +ve (h|v)sync. Correct, match 2.4
  behaviour, and introduce VESA constants for clarity.

Signed-off-by: Jim Hague <redacted>

diff -u -p -r1.24 pm2fb.c
--- drivers/video/pm2fb.c	23 Sep 2004 01:19:45 -0000	1.24
+++ drivers/video/pm2fb.c	19 Oct 2004 08:51:23 -0000
@@ -973,24 +971,26 @@ static int pm2fb_blank(int blank_mode, s
 
 	DPRINTK("blank_mode %d\n", blank_mode);
 
-	/* Turn everything on, then disable as requested. */
-	video |= (PM2F_VIDEO_ENABLE | PM2F_HSYNC_MASK | PM2F_VSYNC_MASK);
-
 	switch (blank_mode) {
-	case 0: 	/* Screen: On; HSync: On, VSync: On */
+	case 0:
+		/* Screen: On */
+		video |= PM2F_VIDEO_ENABLE;
 		break;
-	case 1: 	/* Screen: Off; HSync: On, VSync: On */
+	case VESA_NO_BLANKING + 1:
+		/* Screen: Off */
 		video &= ~PM2F_VIDEO_ENABLE;
 		break;
-	case 2: /* Screen: Off; HSync: On, VSync: Off */
-		video &= ~(PM2F_VIDEO_ENABLE | PM2F_VSYNC_MASK | PM2F_BLANK_LOW );
-		break;
-	case 3: /* Screen: Off; HSync: Off, VSync: On */
-		video &= ~(PM2F_VIDEO_ENABLE | PM2F_HSYNC_MASK | PM2F_BLANK_LOW );
-		break;
-	case 4: /* Screen: Off; HSync: Off, VSync: Off */
-		video &= ~(PM2F_VIDEO_ENABLE | PM2F_VSYNC_MASK | PM2F_HSYNC_MASK|
-			   PM2F_BLANK_LOW);
+	case VESA_VSYNC_SUSPEND + 1:
+		/* VSync: Off */
+		video &= ~(PM2F_VSYNC_MASK | PM2F_BLANK_LOW );
+		break;
+	case VESA_HSYNC_SUSPEND + 1:
+		/* HSync: Off */
+		video &= ~(PM2F_HSYNC_MASK | PM2F_BLANK_LOW );
+		break;
+	case VESA_POWERDOWN + 1:
+		/* HSync: Off, VSync: Off */
+		video &= ~(PM2F_VSYNC_MASK | PM2F_HSYNC_MASK| PM2F_BLANK_LOW);
 		break;
 	}
 	set_video(par, video);



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

Re: [PATCH 1/2] pm2fb: Blanking fixes

From: Andrew Morton <hidden>
Date: 2004-10-24 10:06:59

Jim Hague [off-list ref] wrote:
Whee, lots of fbdev action at present...
 --- drivers/video/pm2fb.c	23 Sep 2004 01:19:45 -0000	1.24
 +++ drivers/video/pm2fb.c	19 Oct 2004 08:51:23 -0000
In future, please generate `patch -p1' form patches, thanks.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help