Skip to contentSkip to conversation

eink_apollofb: new driver for Apollo eInk controller.

PATCH New Yauhen Kharuzhy 1 participant 2 messages Jul 7, 2008 Framebuffer layer

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 FB deffered io: keep pagelist sorted

In reply to Yauhen Kharuzhy

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.

---
 drivers/video/fb_defio.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
drivers/video/fb_defio.c +6 -1
index 24843fd..5517e51 100644
@@ -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 */
Signature · 8 lines
1.5.6


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
#0 lore raw

PATCH 1/1 eink_apollofb: new driver for Apollo eInk controller.

Add a new driver for eInk Apollo controller. This controller is used in various bookreaders with eInk displays.

The eink_apollofb driver supports many features of Apollo chip, in difference with the hecubafb driver:
2-bit color depth, partial picture loading, flash read/write.

The driver uses platform_device framework for platform-specific functions (set values of control lines, read/write data from/to bus etc.) and can be used on any platform.

This driver have been developed for the OpenInkpot project (http://openinkpot.org/).

---
 drivers/video/Kconfig         |   17 +
 drivers/video/Makefile        |    1 +
 drivers/video/eink_apollofb.c | 1046 +++++++++++++++++++++++++++++++++++++++++
 include/linux/eink_apollofb.h |   60 +++
 4 files changed, 1124 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/eink_apollofb.c
 create mode 100644 include/linux/eink_apollofb.h
drivers/video/Kconfig +17 -0
index e0c5f96..ad23464 100644
@@ -718,6 +718,23 @@ config FB_N411
          This enables support for the Apollo display controller in its
          Hecuba form using the n411 devkit.
 
+config FB_EINK_APOLLO
+       tristate "Apollo eInk display controller support"
+       depends on EXPERIMENTAL && FB && MMU
+       select FB_SYS_FILLRECT
+       select FB_SYS_COPYAREA
+       select FB_SYS_IMAGEBLIT
+       select FB_SYS_FOPS
+       select FB_DEFERRED_IO
+       help
+         This enables support for Apollo eInk display controller.
+	 Includes support of deferred IO and 2-bit grayscale mode.
+
+	 Hardware-specific functions have been moved to platform data.
+
+	 To compile this driver as a module, choose M here: the
+	 module will be called eink_apollofb.
+
 config FB_HGA
 	tristate "Hercules mono graphics support"
 	depends on FB && X86
drivers/video/Makefile +1 -0
index 04bca35..2530f0c 100644
@@ -76,6 +76,7 @@ obj-$(CONFIG_FB_ATARI)            += atafb.o c2p.o atafb_mfb.o \
                                      atafb_iplan2p2.o atafb_iplan2p4.o atafb_iplan2p8.o
 obj-$(CONFIG_FB_MAC)              += macfb.o
 obj-$(CONFIG_FB_HECUBA)           += hecubafb.o
+obj-$(CONFIG_FB_EINK_APOLLO)      += eink_apollofb.o
 obj-$(CONFIG_FB_HGA)              += hgafb.o
 obj-$(CONFIG_FB_XVR500)           += sunxvr500.o
 obj-$(CONFIG_FB_XVR2500)          += sunxvr2500.o
drivers/video/eink_apollofb.c new file +1046 -0

1,046 lines not on this page · raw message

include/linux/eink_apollofb.h new file +60 -0

60 lines not on this page · raw message

Signature · 8 lines
1.5.6


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08