From 0dcc1ea004961981d2cc0f1158a2a1d1673c3eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20St=C3=BCbner?= Date: Sat, 28 Apr 2012 12:19:10 +0200 Subject: [PATCH] --- yaml --- r: 310261 b: refs/heads/master c: 1f45f9dbb392f9ca0919e9cd2370ab66ae752ec8 h: refs/heads/master i: 310259: d57d223446deb40065314b6dba5286b897dec8b8 v: v3 --- [refs] | 2 +- trunk/drivers/video/fb_defio.c | 4 ++++ trunk/drivers/video/smscufx.c | 2 +- trunk/drivers/video/udlfb.c | 2 +- trunk/include/linux/fb.h | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index de4453a6c1f0..decd5965d754 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 13f36e9ea0f1419039763e7ba947fccd7f4b5a41 +refs/heads/master: 1f45f9dbb392f9ca0919e9cd2370ab66ae752ec8 diff --git a/trunk/drivers/video/fb_defio.c b/trunk/drivers/video/fb_defio.c index c27e153d8882..070f26f0bf99 100644 --- a/trunk/drivers/video/fb_defio.c +++ b/trunk/drivers/video/fb_defio.c @@ -107,6 +107,10 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma, /* protect against the workqueue changing the page list */ mutex_lock(&fbdefio->lock); + /* first write in this cycle, notify the driver */ + if (fbdefio->first_io && list_empty(&fbdefio->pagelist)) + fbdefio->first_io(info); + /* * We want the page to remain locked from ->page_mkwrite until * the PTE is marked dirty to avoid page_mkclean() being called diff --git a/trunk/drivers/video/smscufx.c b/trunk/drivers/video/smscufx.c index ccbfef5e828f..99857857f6fa 100644 --- a/trunk/drivers/video/smscufx.c +++ b/trunk/drivers/video/smscufx.c @@ -1083,7 +1083,7 @@ static int ufx_ops_open(struct fb_info *info, int user) struct fb_deferred_io *fbdefio; - fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); + fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); if (fbdefio) { fbdefio->delay = UFX_DEFIO_WRITE_DELAY; diff --git a/trunk/drivers/video/udlfb.c b/trunk/drivers/video/udlfb.c index a159b63e18b9..e9d43b403432 100644 --- a/trunk/drivers/video/udlfb.c +++ b/trunk/drivers/video/udlfb.c @@ -893,7 +893,7 @@ static int dlfb_ops_open(struct fb_info *info, int user) struct fb_deferred_io *fbdefio; - fbdefio = kmalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); + fbdefio = kzalloc(sizeof(struct fb_deferred_io), GFP_KERNEL); if (fbdefio) { fbdefio->delay = DL_DEFIO_WRITE_DELAY; diff --git a/trunk/include/linux/fb.h b/trunk/include/linux/fb.h index d31cb682e173..c10e71efb8f5 100644 --- a/trunk/include/linux/fb.h +++ b/trunk/include/linux/fb.h @@ -607,6 +607,7 @@ struct fb_deferred_io { struct mutex lock; /* mutex that protects the page list */ struct list_head pagelist; /* list of touched pages */ /* callback */ + void (*first_io)(struct fb_info *info); void (*deferred_io)(struct fb_info *info, struct list_head *pagelist); }; #endif