From: Mike Rapoport <hidden> Date: 2006-07-06 14:25:54
This patch adds frame buffer driver for 2700G LCD controller present on CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
--
Sincerely yours,
Mike Rapoport
From: "Antonino A. Daplas" <adaplas@gmail.com> Date: 2006-07-07 02:19:48
Mike Rapoport wrote:
This patch adds frame buffer driver for 2700G LCD controller present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
+#include <linux/config.h>
config.h is not needed, remove that particular line.
+{+ u8 m, n, p;+ unsigned int err = 0;+ unsigned int min_err = ~0x0;+ unsigned int clk;+ unsigned int best_clk = 0;+ unsigned int ref_clk = 13000; /* FIXME: take from platform data */+ unsigned int pixclock;++ /* convert pixclock to KHz */+ pixclock = PICOS2KHZ(pixclock_ps);++ for ( m = 1; m < 64; m++ ) {
Coding style, "static int" and "mbxfb_setcolreg" in one line.
+{
+ uint val, ret = 1;
If you can, avoid u_int and family and just use u32 and family.
quoted hunk
++ if ( regno < 255 ) {+ val = (red & 0xff) << 16;+ val |= (green & 0xff) << 8;+ val |= (blue & 0xff) << 0;+ GPLUT = Gplut_Lutadr(regno) | Gplut_Lutdata(val);+ udelay(1000);+ ret = 0;
If you want this to work as a console driver, make sure you also
write 'val' to info->pseudo_palette (for bpp 16 and above) and only
for regno's 0-15.
+ switch ( info->var.bits_per_pixel ) {
+ case 16:
Kernel coding style. the "case" statements must begin at the same column
as the "switch", ie:
switch (info->var.bits_per_pixel) {
case 16:
if (info->var.green.length == 5)
GSCTRL |= GSCTRL_GPIXFMT_ARGB1555;
else
GSCTRL |= GSCTRL_GPIXFMT_RGB565;
break;
Most of the attributes violate the "one file, one value" rule. GregKH won't
like it. Try using debugfs if you cannot separate them.
Tony
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Mike Rapoport <hidden> Date: 2006-07-09 13:40:13
Antonino A. Daplas wrote:
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
No arch-specific function/macro's to determine the resource length?
I searched for one but in vain.
`grep resource_len include/linux/*.h' indeed doesn't show one for generic use,
only for the PCI, Zorro, and DIO busses.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: "Antonino A. Daplas" <adaplas@gmail.com> Date: 2006-07-09 23:21:23
Mike Rapoport wrote:
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
Coding style, "static int" and "mbxfb_setcolreg" in one line.
I've tried hard to remove all the coding styles mistakes and misprints,
but some maybe still in there.
quoted
quoted
+{
+ uint val, ret = 1;
If you can, avoid u_int and family and just use u32 and family.
Done
quoted
quoted
++ if ( regno < 255 ) {+ val = (red & 0xff) << 16;+ val |= (green & 0xff) << 8;+ val |= (blue & 0xff) << 0;+ GPLUT = Gplut_Lutadr(regno) | Gplut_Lutdata(val);+ udelay(1000);+ ret = 0;
If you want this to work as a console driver, make sure you also
write 'val' to info->pseudo_palette (for bpp 16 and above) and only
for regno's 0-15.
I've tried to use this driver as console, but all I see is a blank
screen. So, at least for now it cannot be used as a console :(
It's because you don't have an info->pseudo_palette. And if you accidentally
load the framebuffer console, your kernel will just crash because the
drawing functions (cfb_{fillrect,imageblit}) unconditionally refers to that
array.
So you have to do either one:
1. Create a properly filled up info->pseudo_palette; or
2. Do not use the cfb_* functions, and instead write one for your
own. It can be just dummy functions that don't do anything.
BTW, you will need to use generic accessors (readb|w|l, writeb|w|l or
__raw_readb|w|l, __raw_writeb|w|l, etc). This will entail a lot of changes.
Otherwise, this driver won't get past Andrew Morton and Rusty.
See include/asm/io.h.
Tony
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Mike Rapoport <hidden> Date: 2006-07-11 09:09:09
Antonino A. Daplas wrote:
Mike Rapoport wrote:
quoted
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
BTW, you will need to use generic accessors (readb|w|l, writeb|w|l or
__raw_readb|w|l, __raw_writeb|w|l, etc). This will entail a lot of changes.
Otherwise, this driver won't get past Andrew Morton and Rusty.
See include/asm/io.h.
--
Sincerely yours,
Mike Rapoport
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: "Antonino A. Daplas" <adaplas@gmail.com> Date: 2006-07-11 09:34:04
Mike Rapoport wrote:
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller
present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
BTW, you will need to use generic accessors (readb|w|l, writeb|w|l or
__raw_readb|w|l, __raw_writeb|w|l, etc). This will entail a lot of
changes.
Otherwise, this driver won't get past Andrew Morton and Rusty.
See include/asm/io.h.
Both are okay, but I prefer the first one for its brevity.
Tony
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Mike Rapoport <hidden> Date: 2006-07-11 11:11:32
Antonino A. Daplas wrote:
Mike Rapoport wrote:
quoted
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
It's because you don't have an info->pseudo_palette. And if you accidentally
load the framebuffer console, your kernel will just crash because the
drawing functions (cfb_{fillrect,imageblit}) unconditionally refers to that
array.
So you have to do either one:
1. Create a properly filled up info->pseudo_palette; or
I think I've succeded to make it. At least I can see tux logo and getty output at startup.
BTW, you will need to use generic accessors (readb|w|l, writeb|w|l or
__raw_readb|w|l, __raw_writeb|w|l, etc). This will entail a lot of changes.
Otherwise, this driver won't get past Andrew Morton and Rusty.
See include/asm/io.h.
From: "Antonino A. Daplas" <adaplas@gmail.com> Date: 2006-07-11 12:53:55
Mike Rapoport wrote:
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller
present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
It's because you don't have an info->pseudo_palette. And if you
accidentally
load the framebuffer console, your kernel will just crash because the
drawing functions (cfb_{fillrect,imageblit}) unconditionally refers to
that
array.
So you have to do either one:
1. Create a properly filled up info->pseudo_palette; or
I think I've succeded to make it. At least I can see tux logo and getty
output at startup.
quoted
BTW, you will need to use generic accessors (readb|w|l, writeb|w|l or
__raw_readb|w|l, __raw_writeb|w|l, etc). This will entail a lot of
changes.
Otherwise, this driver won't get past Andrew Morton and Rusty.
See include/asm/io.h.
Done.
Definitely much, much better. I'm attaching a clean-up patch. If you
approve, I'll send your patch + cleanup upstream.
Tony
mbxfb: Various fixes
From: <>
- Add more informative help text to Kconfig
- Make DEBUG a Kconfig option as FB_MBX_DEBUG
- Remove #include mbxdebug.c, this is frowned upon
- Remove redundant casts
- Arrange #include's alphabetically
- Trivial whitespace changes
Signed-off-by: Antonino Daplas <redacted>
---
drivers/video/Kconfig | 12 +++++++++++-
drivers/video/mbx/Makefile | 3 ++-
drivers/video/mbx/mbxfb.c | 24 +++++++++++-------------
3 files changed, 24 insertions(+), 15 deletions(-)
@@ -1,3 +1,4 @@# Makefile for the 2700G controller driver.-obj-$(CONFIG_FB_MBX)+=mbxfb.o+obj-$(CONFIG_FB_MBX)+=mbxfb.o+obj-$(CONFIG_FB_MBX_DEBUG)+=mbxfbdebugfs.o
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Mike Rapoport <hidden> Date: 2006-07-11 13:14:30
Antonino A. Daplas wrote:
Mike Rapoport wrote:
quoted
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
Antonino A. Daplas wrote:
quoted
Mike Rapoport wrote:
quoted
This patch adds frame buffer driver for 2700G LCD controller
present on
CompuLab CM-X270 computer module.
This pacth is versus current Linus git tree.
Signed-off-by: Mike Rapoport <redacted>
Definitely much, much better. I'm attaching a clean-up patch. If you
approve, I'll send your patch + cleanup upstream.
It's Ok with me, thanks.
quoted hunk
Tony
mbxfb: Various fixes
From: <>
- Add more informative help text to Kconfig
- Make DEBUG a Kconfig option as FB_MBX_DEBUG
- Remove #include mbxdebug.c, this is frowned upon
- Remove redundant casts
- Arrange #include's alphabetically
- Trivial whitespace changes
Signed-off-by: Antonino Daplas <redacted>
---
drivers/video/Kconfig | 12 +++++++++++-
drivers/video/mbx/Makefile | 3 ++-
drivers/video/mbx/mbxfb.c | 24 +++++++++++-------------
3 files changed, 24 insertions(+), 15 deletions(-)
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
---help---
+ Framebuffer driver for the Intel 2700G (Marathon) Graphics
+ Accelerator
- If unsure, say N.
+config FB_MBX_DEBUG
+ bool "Enable debugging info via debugfs"
+ depends on FB_MBX && DEBUG_FS
+ default n
+ ---help---
+ Enable this if you want debugging information using the debug
+ filesystem (debugfs)
+
+ If unsure, say N.
config FB_W100
tristate "W100 frame buffer support"
--
Sincerely yours,
Mike Rapoport
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Bernhard Fischer <hidden> Date: 2006-07-11 13:24:12
Could some kind soul do a recursive s/timming/timing/g in
drivers/video, please? TIA.
A few cosmetic remarks regarding the mbx driver below..
On Tue, Jul 11, 2006 at 02:10:53PM +0200, Mike Rapoport wrote:
+#define MAX_PALETTES 16++/* FIXME: take care of different chip reivsions with different sizes
s/reivsions/revisions/
quoted hunk
+#ifdef CONFIG_PM+/*+ * Power management hooks. Note that we won't be called from IRQ context,+ * unlike the blank functions above, so we may sleep.+ */+static int mbxfb_suspend(struct platform_device *dev, pm_message_t state)+{+ /* make frame buffer memory enter self-refresh mode */+ writel(LMPWR_MC_PWR_SRM, LMPWR);+ while (LMPWRSTAT != LMPWRSTAT_MC_PWR_SRM)+ ; /* empty statement */++ /* reset the device, since it's initial state is 'mostly sleeping' */+ writel(SYSRST_RST, SYSRST);+ return 0;+}++static int mbxfb_resume(struct platform_device *dev)+{+ struct fb_info *fbi = (struct fb_info *)platform_get_drvdata(dev);++ enable_clocks(fbi);+/* setup_graphics(fbi); */+/* setup_display(fbi); */++ writel((readl(DSCTRL) | DSCTRL_SYNCGEN_EN), DSCTRL);+ return 0;+}
IIRC it was already stated that it is better to only set the .suspend
and .resume ops depending on CONFIG_PM (see below instead of the #if
#else #endif stanza here).
cheers,
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: "Antonino A. Daplas" <adaplas@gmail.com> Date: 2006-07-11 13:46:55
Bernhard Fischer wrote:
Could some kind soul do a recursive s/timming/timing/g in
drivers/video, please? TIA.
IIRC it was already stated that it is better to only set the .suspend
and .resume ops depending on CONFIG_PM (see below instead of the #if
#else #endif stanza here).
No, this is preferred. If possible, we want to avoid ifdef's within
functions or structures.
Tony
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642