linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: deferred io cleanup fix for sh_mobile_lcdcfb
@ 2009-03-10  6:08 Magnus Damm
  2009-03-10  6:19 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2009-03-10  6:08 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Magnus Damm, lethal, linux-sh

From: Magnus Damm <damm@igel.co.jp>

Fix deferred io cleanup patch in the sh_mobile_lcdcfb driver.

If probe() fails early the sh_mobile_lcdc_stop() function will
be called to clean up deferred io. This patch modifies the
code to only call fb_deferred_io_cleanup() after deferred io
has been initialized. 

With this patch applied we no longer hit BUG_ON() inside
fb_deferred_io_cleanup(). Triggers on a Migo-R with the
SYS QVGA panel board unmounted.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 drivers/video/sh_mobile_lcdcfb.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- 0001/drivers/video/sh_mobile_lcdcfb.c
+++ work/drivers/video/sh_mobile_lcdcfb.c	2009-03-03 18:31:37.000000000 +0900
@@ -446,7 +446,6 @@ static void sh_mobile_lcdc_stop(struct s
 {
 	struct sh_mobile_lcdc_chan *ch;
 	struct sh_mobile_lcdc_board_cfg	*board_cfg;
-	unsigned long tmp;
 	int k;
 
 	/* tell the board code to disable the panel */
@@ -456,9 +455,8 @@ static void sh_mobile_lcdc_stop(struct s
 		if (board_cfg->display_off)
 			board_cfg->display_off(board_cfg->board_data);
 
-		/* cleanup deferred io if SYS bus */
-		tmp = ch->cfg.sys_bus_cfg.deferred_io_msec;
-		if (ch->ldmt1r_value & (1 << 12) && tmp) {
+		/* cleanup deferred io if enabled */
+		if (ch->info.fbdefio) {
 			fb_deferred_io_cleanup(&ch->info);
 			ch->info.fbdefio = NULL;
 		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: deferred io cleanup fix for sh_mobile_lcdcfb
  2009-03-10  6:08 [PATCH] video: deferred io cleanup fix for sh_mobile_lcdcfb Magnus Damm
@ 2009-03-10  6:19 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2009-03-10  6:19 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-fbdev-devel, linux-sh

On Tue, Mar 10, 2009 at 03:08:49PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@igel.co.jp>
> 
> Fix deferred io cleanup patch in the sh_mobile_lcdcfb driver.
> 
> If probe() fails early the sh_mobile_lcdc_stop() function will
> be called to clean up deferred io. This patch modifies the
> code to only call fb_deferred_io_cleanup() after deferred io
> has been initialized. 
> 
> With this patch applied we no longer hit BUG_ON() inside
> fb_deferred_io_cleanup(). Triggers on a Migo-R with the
> SYS QVGA panel board unmounted.
> 
> Signed-off-by: Magnus Damm <damm@igel.co.jp>

Rolled in to the for-2.6.29 queue, thanks.

------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-10  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10  6:08 [PATCH] video: deferred io cleanup fix for sh_mobile_lcdcfb Magnus Damm
2009-03-10  6:19 ` Paul Mundt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).