|
From: Yauhen K. <je...@gm...> - 2008-07-11 14:51:29
|
eInk display drivers will do less work if list of
changed pages will be sorted.
Apollo controller has 'Partial Update' feature ---
updating only a part of a image, which can be done in
small time.
Signed-off-by: Yauhen Kharuzhy <je...@gm...>
---
drivers/video/fb_defio.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c
index 24843fd..5517e51 100644
--- a/drivers/video/fb_defio.c
+++ b/drivers/video/fb_defio.c
@@ -74,6 +74,7 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
{
struct fb_info *info = vma->vm_private_data;
struct fb_deferred_io *fbdefio = info->fbdefio;
+ struct page *cur;
/* this is a callback we get when userspace first tries to
write to the page. we schedule a workqueue. that workqueue
@@ -83,7 +84,11 @@ static int fb_deferred_io_mkwrite(struct vm_area_struct *vma,
/* protect against the workqueue changing the page list */
mutex_lock(&fbdefio->lock);
- list_add(&page->lru, &fbdefio->pagelist);
+ list_for_each_entry(cur, &fbdefio->pagelist, lru) {
+ if (cur->index > page->index)
+ break;
+ }
+ list_add(&page->lru, cur->lru.prev);
mutex_unlock(&fbdefio->lock);
/* come back after delay to process the deferred IO */
--
1.5.6
|