Skip to contentSkip to conversation

SM501: Call fb suspend function during suspend and resume.

RFC In review Ben Dooks 2 participants 2 messages Jul 10, 2007 – Jul 13, 2007 Framebuffer layer

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

RFC 1/1 SM501: Call fb suspend function during suspend and resume.

I belive the following patch to be correct:

Call the fb_set_suspend() over suspend and resume.

drivers/video/sm501fb.c +9 -0
Index: linux-2.6.21-quilt/drivers/video/sm501fb.c
===================================================================
@@ -28,6 +28,7 @@
 #include <linux/wait.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/console.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -1697,6 +1698,10 @@ static int sm501fb_suspend_fb(struct sm5
 	/* blank the relevant interface to ensure unit power minimised */
 	(par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi);
 
+	acquire_console_sem();
+	fb_set_suspend(fbi, 1);
+	release_console_sem();
+
 	return 0;
 
  err_nocursor:
@@ -1732,6 +1737,10 @@ static void sm501fb_resume_fb(struct sm5
 		memcpy_toio(par->cursor.k_addr, par->store_cursor,
 			    par->cursor.size);
 
+	acquire_console_sem();
+	fb_set_suspend(fbi, 0);
+	release_console_sem();
+
 	vfree(par->store_fb);
 	vfree(par->store_cursor);
 }

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

#1 lore raw
Quoted 4 lines · Ben Dooks

I belive the following patch to be correct:

Call the fb_set_suspend() over suspend and resume.

It's correct. I'll be pushing your patches to akpm after the next -mm release.

Tony

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/