fbdev: metronomefb and hecubafb bugfix and platforming v4
Subsystems (2)
cover fbdev: metronomefb and hecubafb bugfix and platforming v4
Hi Tony, Geert, Andrew, fbdev,
This is version4 of the metronomefb and hecubafb bugfix and platforming patchset. It has 4 patches, which are as follows:
1 - bugfix for metronomefb
2 - bugfix for hecubafb
3 - platforming metronomefb
4 - platforming hecubafb
The improvement over v2 is that the bugfixes are split into individual patches and that the Kconfig/Makefile changes for hecubafb are moved in patch 4 (as they should be) rather than patch 3. Thanks Geert.
I would be grateful for any feedback on this.
Thanks,
jaya
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
PATCH 1/4 fbdev: metronomefb bugfix v4
This patch is a bugfix for the use of cfb_* functions instead of sys_* functions. sys_* should be used with vmalloced framebuffers. the previous cfb_ use would not work for callers of imageblit/etc.
---
metronomefb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/video/metronomefb.c +3 -3
@@ -678,7 +678,7 @@ static void metronomefb_fillrect(struct fb_info *info, {struct metronomefb_par *par = info->par; -cfb_fillrect (info, rect); +sys_fillrect (info, rect);metronomefb_dpy_update (par); }
@@ -687,7 +687,7 @@ static void metronomefb_copyarea(struct fb_info *info, {struct metronomefb_par *par = info->par; -cfb_copyarea (info, area); +sys_copyarea (info, area);metronomefb_dpy_update (par); }
@@ -696,7 +696,7 @@ static void metronomefb_imageblit(struct fb_info *info, {struct metronomefb_par *par = info->par; -cfb_imageblit (info, image); +sys_imageblit (info, image);metronomefb_dpy_update (par); }
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
PATCH 2/4 fbdev: hecubafb bugfix v4
In reply to Jaya KumarThis patch is a bugfix for hecubafb_write which would return an incorrect error value for the bytecount from framebuffer writes.
--- hecubafb.c | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-)
drivers/video/hecubafb.c +27 -25
@@ -270,41 +270,43 @@ static void hecubafb_imageblit(struct fb_info *info,static ssize_t hecubafb_write (struct fb_info *info,const char __user *buf,size_t count,loff_t *ppos) { -unsigned long p; -int err=-EINVAL ; -struct hecubafb_par *par; -unsigned int xres; -unsigned int fbmemlength; +struct hecubafb_par *par = info->par; +unsigned long p = *ppos; +void *dst; +int err =0 ; +unsigned long total_size; - p = *ppos; - par = info->par; - xres = info->var.xres; - fbmemlength = (xres * info->var.yres)/8 ; +if (info->state !=FBINFO_STATE_RUNNING ) +return -EPERM ; -if (p > fbmemlength) -return -ENOSPC ; + total_size = info->fix.smem_len; - err =0 ; -if ((count + p) > fbmemlength) { - count = fbmemlength - p; - err = -ENOSPC ; +if (p > total_size) +return -EFBIG ; + +if (count > total_size) { + err = -EFBIG ; + count = total_size; } -if (count) { -char *base_addr; +if (count + p > total_size) { +if (!err) + err = -ENOSPC ; - base_addr = (char __force *)info->screen_base; - count -=copy_from_user (base_addr + p, buf, count); - *ppos += count; - err = -EFAULT ; + count = total_size - p; } -hecubafb_dpy_update (par); + dst = (void __force *) (info->screen_base + p); + +if (copy_from_user (dst, buf, count)) + err = -EFAULT ; -if (count) -return count; +if (!err) + *ppos += count; + +hecubafb_dpy_update (par); -return err; +return (err) ? err : count; }static struct fb_ops hecubafb_ops = {
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
PATCH 3/4 fbdev: platforming metronomefb and am200epd v4
In reply to Jaya KumarThis patch splits metronomefb into the platform independent metronomefb and the platform dependent am200epd.
---
Documentation/fb/metronomefb.txt | 16 - drivers/video/Kconfig | 16 + drivers/video/Makefile | 1 drivers/video/am200epd.c | 295 ++++++++++++++++++++++++++++++++++++ drivers/video/metronomefb.c | 314 +++++---------------------------------- include/video/metronomefb.h | 62 +++++++ 6 files changed, 422 insertions(+), 282 deletions(-)
Documentation/fb/metronomefb.txt +7 -9
@@ -1,7 +1,7 @@ Metronomefb ----------- Maintained by Jaya Kumar <jayakumar.lkml.gmail.com> -Last revised: Nov 20, 2007 +Last revised: Mar 10, 2008 Metronomefb is a driver for the Metronome display controller. The controller is from E-Ink Corporation. It is intended to be used to drive the E-Ink
@@ -11,20 +11,18 @@ display media here http://www.e-ink.com/products/matrix/metronome.html . Metronome is interfaced to the host CPU through the AMLCD interface. The host CPU generates the control information and the image in a framebuffer which is then delivered to the AMLCD interface by a host specific method. -Currently, that's implemented for the PXA's LCDC controller. The display and -error status are each pulled through individual GPIOs. +The display and error status are each pulled through individual GPIOs. -Metronomefb was written for the PXA255/gumstix/lyre combination and -therefore currently has board set specific code in it. If other boards based on -other architectures are available, then the host specific code can be separated -and abstracted out. +Metronomefb is platform independent and depends on a board specific driver +to do all physical IO work. Currently, an example is implemented for the +PXA board used in the AM-200 EPD devkit. This example is am200epd.c Metronomefb requires waveform information which is delivered via the AMLCD interface to the metronome controller. The waveform information is expected to be delivered from userspace via the firmware class interface. The waveform file can be compressed as long as your udev or hotplug script is aware of the need -to uncompress it before delivering it. metronomefb will ask for waveform.wbf -which would typically go into /lib/firmware/waveform.wbf depending on your +to uncompress it before delivering it. metronomefb will ask for metronome.wbf +which would typically go into /lib/firmware/metronome.wbf depending on your udev/hotplug setup. I have only tested with a single waveform file which was originally labeled 23P01201_60_WT0107_MTC. I do not know what it stands for. Caution should be exercised when manipulating the waveform as there may be
drivers/video/Kconfig +10 -6
@@ -149,6 +149,11 @@ config FB_DEFERRED_IO depends on FB default y +config FB_METRONOME + tristate + depends on FB + depends on FB_DEFERRED_IO + config FB_SVGALIB tristate depends on FB
@@ -1893,19 +1898,18 @@ config FB_XILINX framebuffer. ML300 carries a 640*480 LCD display on the board, ML403 uses a standard DB15 VGA connector. -config FB_METRONOME - tristate "Metronome display controller support" +config FB_AM200EPD + tristate "AM-200 E-Ink EPD devkit support" depends on FB && ARCH_PXA && MMU select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select FB_SYS_FOPS select FB_DEFERRED_IO + select FB_METRONOME help - This enables support for the Metronome display controller. Tested - with an E-Ink 800x600 display and Gumstix Connex through an AMLCD - interface. Please read <file:Documentation/fb/metronomefb.txt> - for more information. + This enables support for the Metronome display controller used on + the E-Ink AM-200 EPD devkit. config FB_VIRTUAL tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)"
drivers/video/Makefile +1 -0
@@ -29,6 +29,7 @@ obj-$(CONFIG_FB_DEFERRED_IO) += fb_defio.o # Hardware specific drivers go first obj-$(CONFIG_FB_AMIGA) += amifb.o c2p.o +obj-$(CONFIG_FB_AM200EPD) += am200epd.o obj-$(CONFIG_FB_ARC) += arcfb.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o
drivers/video/metronomefb.c +47 -267
491 lines not on this page · raw message
commit c04bd52415597550967cec19acaaba91bfc5c95c
Author: jaya <jaya@apodmy1.(none)> Date: Fri Apr 4 08:06:12 2008 -0400
iThis patch splits metronomefb into the platform independent metronomefb and the platform dependent am200epd.
drivers/video/am200epd.c new file +295 -0
295 lines not on this page · raw message
include/video/metronomefb.h new file +62 -0
62 lines not on this page · raw message
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
PATCH 4/4 fbdev: platforming hecubafb and n411 v4
In reply to Jaya KumarThis patch splits hecubafb into the platform independent hecubafb and the platform dependent n411.
---
drivers/video/Kconfig | 17 +-- drivers/video/hecubafb.c | 250 +++++++++-------------------------------------- drivers/video/n411.c | 202 +++++++++++++++++++++++++++++++++++++ include/video/hecubafb.h | 51 +++++++++ 4 files changed, 314 insertions(+), 206 deletions(-)
drivers/video/Kconfig +10 -7
@@ -154,6 +154,11 @@ config FB_METRONOME depends on FB depends on FB_DEFERRED_IO +config FB_HECUBA + tristate + depends on FB + depends on FB_DEFERRED_IO + config FB_SVGALIB tristate depends on FB
@@ -679,20 +684,18 @@ config FB_IMAC help This is the frame buffer device driver for the Intel-based Macintosh -config FB_HECUBA - tristate "Hecuba board support" +config FB_N411 + tristate "N411 Apollo/Hecuba devkit support" depends on FB && X86 && MMU select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT select FB_SYS_FOPS select FB_DEFERRED_IO + select FB_HECUBA help - This enables support for the Hecuba board. This driver was tested - with an E-Ink 800x600 display and x86 SBCs through a 16 bit GPIO - interface (8 bit data, 4 bit control). If you anticipate using - this driver, say Y or M; otherwise say N. You must specify the - GPIO IO address to be used for setting control and data. + This enables support for the Apollo display controller in its + Hecuba form using the n411 devkit. config FB_HGA tristate "Hercules mono graphics support"
drivers/video/hecubafb.c +51 -199
387 lines not on this page · raw message
drivers/video/n411.c new file +202 -0
202 lines not on this page · raw message
include/video/hecubafb.h new file +51 -0
51 lines not on this page · raw message
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Quoted 5 lines · On Fri, 04 Apr 2008 08:23:59 -0400 Jaya Kumar <[email protected]> wrote:
Hi Tony, Geert, Andrew, fbdev,
This is version4 of the metronomefb and hecubafb bugfix and platforming patchset. It has 4 patches, which are as follows:
Quoted 9 lines
1 - bugfix for metronomefb
2 - bugfix for hecubafb
3 - platforming metronomefb
4 - platforming hecubafbThe improvement over v2 is that the bugfixes are split into individual patches and that the Kconfig/Makefile changes for hecubafb are moved in patch 4 (as they should be) rather than patch 3. Thanks Geert.
Thanks.
Do you believe that #1 and #2 should be in 2.6.25? 2.6.24.x?
If so, for what reason(s)?
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Quoted 18 lines · Andrew Morton
Quoted 5 lines · On Fri, 04 Apr 2008 08:23:59 -0400 Jaya Kumar <[email protected]> wrote:
Hi Tony, Geert, Andrew, fbdev,
This is version4 of the metronomefb and hecubafb bugfix and platforming patchset. It has 4 patches, which are as follows:
Quoted 9 lines
1 - bugfix for metronomefb
2 - bugfix for hecubafb
3 - platforming metronomefb
4 - platforming hecubafbThe improvement over v2 is that the bugfixes are split into individual patches and that the Kconfig/Makefile changes for hecubafb are moved in patch 4 (as they should be) rather than patch 3. Thanks Geert.
Quoted 6 lines
Thanks.
Do you believe that #1 and #2 should be in 2.6.25? 2.6.24.x?
If so, for what reason(s)?
I think #1 and #2 don't need to get pushed into prior kernels. My reasoning is that both metronomefb and hecubafb don't have mainstream users yet. I think current users are using hand built patchsets against -rc kernels because support patches like the arch/arm patches for the gumstix platform used in am200 are still works-in-progress.
Thanks,
jaya
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone