* [PATCH] FB/SM501: Ensure console suspended before saving state
2007-11-19 18:06 [PATCH] SM501 and S3C2410 fb driver fixes for 2.6.24-rc3 Ben Dooks
@ 2007-11-19 18:06 ` Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Fix resume path in S3C2410 framebuffer driver Ben Dooks
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2007-11-19 18:06 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: vince, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-fb-sm501-suspendbeforecopy.patch --]
[-- Type: text/plain, Size: 1627 bytes --]
Move the console suspend to before we save the state of
the framebuffer to ensure that it does not try and change
the fb state again once we have copied it out.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.22-quilt9/drivers/video/sm501fb.c
===================================================================
--- linux-2.6.22-quilt9.orig/drivers/video/sm501fb.c
+++ linux-2.6.22-quilt9/drivers/video/sm501fb.c
@@ -1681,6 +1681,15 @@ static int sm501fb_suspend_fb(struct sm5
if (par->screen.size == 0)
return 0;
+ /* blank the relevant interface to ensure unit power minimised */
+ (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi);
+
+ /* tell console/fb driver we are suspending */
+
+ acquire_console_sem();
+ fb_set_suspend(fbi, 1);
+ release_console_sem();
+
/* backup copies in case chip is powered down over suspend */
par->store_fb = vmalloc(par->screen.size);
@@ -1700,12 +1709,6 @@ static int sm501fb_suspend_fb(struct sm5
memcpy_fromio(par->store_fb, par->screen.k_addr, par->screen.size);
memcpy_fromio(par->store_cursor, par->cursor.k_addr, par->cursor.size);
- /* 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;
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] FB: Fix resume path in S3C2410 framebuffer driver.
2007-11-19 18:06 [PATCH] SM501 and S3C2410 fb driver fixes for 2.6.24-rc3 Ben Dooks
2007-11-19 18:06 ` [PATCH] FB/SM501: Ensure console suspended before saving state Ben Dooks
@ 2007-11-19 18:06 ` Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Update debugging " Ben Dooks
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2007-11-19 18:06 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: vince, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-fb-s3c2410-resume.patch --]
[-- Type: text/plain, Size: 1024 bytes --]
Ensure that the LCD engine is correctly re-initialised
and the correct parameters passed ot s3c2410fb_init_registers.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.24-rc3-fb1.orig/drivers/video/s3c2410fb.c
+++ linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
@@ -1026,7 +1026,11 @@ static int s3c2410fb_resume(struct platf
clk_enable(info->clk);
msleep(1);
- s3c2410fb_init_registers(info);
+ s3c2410fb_init_registers(fbinfo);
+
+ /* re-activate our display after resume */
+ s3c2410fb_activate_var(fbinfo);
+ s3c2410fb_blank(FB_BLANK_UNBLANK, fbinfo);
return 0;
}
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] FB: Update debugging in S3C2410 framebuffer driver
2007-11-19 18:06 [PATCH] SM501 and S3C2410 fb driver fixes for 2.6.24-rc3 Ben Dooks
2007-11-19 18:06 ` [PATCH] FB/SM501: Ensure console suspended before saving state Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Fix resume path in S3C2410 framebuffer driver Ben Dooks
@ 2007-11-19 18:06 ` Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Ensure S3C2410 framebuffer clears initial memory to black Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Check default_display parameter passed in platform data Ben Dooks
4 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2007-11-19 18:06 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: vince, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-fb-s3c2410-debug-update.patch --]
[-- Type: text/plain, Size: 1248 bytes --]
Update the debugging in the s3c2410 framebuffer driver.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.24-rc3-fb1.orig/drivers/video/s3c2410fb.c
+++ linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
@@ -663,7 +663,7 @@ static int __init s3c2410fb_map_video_me
dma_addr_t map_dma;
unsigned map_size = PAGE_ALIGN(info->fix.smem_len);
- dprintk("map_video_memory(fbi=%p)\n", fbi);
+ dprintk("map_video_memory(fbi=%p) map_size %u\n", fbi, map_size);
info->screen_base = dma_alloc_writecombine(fbi->dev, map_size,
&map_dma, GFP_KERNEL);
@@ -891,6 +891,7 @@ static int __init s3c2410fb_probe(struct
smem_len *= mach_info->displays[i].yres;
smem_len *= mach_info->displays[i].bpp;
smem_len >>= 3;
+
if (fbinfo->fix.smem_len < smem_len)
fbinfo->fix.smem_len = smem_len;
}
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] FB: Ensure S3C2410 framebuffer clears initial memory to black
2007-11-19 18:06 [PATCH] SM501 and S3C2410 fb driver fixes for 2.6.24-rc3 Ben Dooks
` (2 preceding siblings ...)
2007-11-19 18:06 ` [PATCH] FB: Update debugging " Ben Dooks
@ 2007-11-19 18:06 ` Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Check default_display parameter passed in platform data Ben Dooks
4 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2007-11-19 18:06 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: vince, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-fb-s3c2410-cleartoblack.patch --]
[-- Type: text/plain, Size: 977 bytes --]
Change the initial pattern in the s3c2410 framebuffer driver
to black.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.24-rc3-fb1.orig/drivers/video/s3c2410fb.c
+++ linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
@@ -672,7 +672,7 @@ static int __init s3c2410fb_map_video_me
/* prevent initial garbage on screen */
dprintk("map_video_memory: clear %p:%08x\n",
info->screen_base, map_size);
- memset(info->screen_base, 0xf0, map_size);
+ memset(info->screen_base, 0x00, map_size);
info->fix.smem_start = map_dma;
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH] FB: Check default_display parameter passed in platform data
2007-11-19 18:06 [PATCH] SM501 and S3C2410 fb driver fixes for 2.6.24-rc3 Ben Dooks
` (3 preceding siblings ...)
2007-11-19 18:06 ` [PATCH] FB: Ensure S3C2410 framebuffer clears initial memory to black Ben Dooks
@ 2007-11-19 18:06 ` Ben Dooks
4 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2007-11-19 18:06 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: vince, Ben Dooks
[-- Attachment #1: simtec/simtec-drivers-fb-s3c2410-check-default-display.patch --]
[-- Type: text/plain, Size: 1326 bytes --]
Ensure that the default display parameter passed in via the
device's platform data is valid. It turns out when mach-bast.c
was updated, the default_display was set outside of the display
array bounds, causing a panic on startup.
If the default_display is bigger than num_displays, then generate
an error and refuse to initialise the driver.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Index: linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.24-rc3-fb1.orig/drivers/video/s3c2410fb.c
+++ linux-2.6.24-rc3-fb1/drivers/video/s3c2410fb.c
@@ -799,6 +799,12 @@ static int __init s3c2410fb_probe(struct
return -EINVAL;
}
+ if (mach_info->default_display >= mach_info->num_displays) {
+ dev_err(&pdev->dev, "default is %d but only %d displays\n",
+ mach_info->default_display, mach_info->num_displays);
+ return -EINVAL;
+ }
+
display = mach_info->displays + mach_info->default_display;
irq = platform_get_irq(pdev, 0);
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread