Hi,
Attached is a patch (against 2.6.10) for a framebuffer driver for the
Geode family of processors. It does not use AMD's horrible Durango API.
It is, however, rather feature incomplete at the moment.
* Only Geode GX1 (with CS5530 companion chip) is supported.
* Tested resolutions: 640x480 to 1280x1024.
* Supported bit depths: 8 bit palette, 16 bit RGB 5-6-5.
* CRT output only.
* No accelerated features.
* Compression is not enabled.
(Flat panel support and compression will likely be added next week, and
acceleration after that.)
Could this patch be considered for inclusion, please?
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
On Friday 11 February 2005 19:11, David Vrabel wrote:
Hi,
Attached is a patch (against 2.6.10) for a framebuffer driver for the
Geode family of processors. It does not use AMD's horrible Durango API.
It is, however, rather feature incomplete at the moment.
* Only Geode GX1 (with CS5530 companion chip) is supported.
* Tested resolutions: 640x480 to 1280x1024.
* Supported bit depths: 8 bit palette, 16 bit RGB 5-6-5.
* CRT output only.
* No accelerated features.
* Compression is not enabled.
(Flat panel support and compression will likely be added next week, and
acceleration after that.)
Could this patch be considered for inclusion, please?
Yes.
However, I would prefer that instead of:
struct geodefb_info {
struct fb_info fb;
...
use struct fb_info.par for all driver private data and use
framebuffer_release()/framebuffer_alloc() to de/allocate the fb_info
structure.
You can also make the check_var() function less strict. You can
attempt to round up values instead of returning -EINVAL.
Tony
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Antonino A. Daplas wrote:
On Friday 11 February 2005 19:11, David Vrabel wrote:
quoted
Attached is a patch (against 2.6.10) for a framebuffer driver for the
Geode family of processors. It does not use AMD's horrible Durango API.
It is, however, rather feature incomplete at the moment.
* Only Geode GX1 (with CS5530 companion chip) is supported.
* Tested resolutions: 640x480 to 1280x1024.
* Supported bit depths: 8 bit palette, 16 bit RGB 5-6-5.
* CRT output only.
* No accelerated features.
* Compression is not enabled.
Could this patch be considered for inclusion, please?
Yes.
However, I would prefer that instead of:
struct geodefb_info {
struct fb_info fb;
...
use struct fb_info.par for all driver private data and use
framebuffer_release()/framebuffer_alloc() to de/allocate the fb_info
structure.
Done this now. An updated patch is attached.
This also includes a number of other changes:
- now works when built into the kernel
- flat panel support (panel=<x>x<y> option). (Only one 640x480 panel
has been tested though.)
- blank function for display blanking/powersaving.
- crt=<n> option to enable/disable the CRT output.
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
On Tuesday 15 February 2005 19:13, David Vrabel wrote:
Antonino A. Daplas wrote:
quoted
On Friday 11 February 2005 19:11, David Vrabel wrote:
quoted
Attached is a patch (against 2.6.10) for a framebuffer driver for the
Geode family of processors. It does not use AMD's horrible Durango API.
It is, however, rather feature incomplete at the moment.
* Only Geode GX1 (with CS5530 companion chip) is supported.
* Tested resolutions: 640x480 to 1280x1024.
* Supported bit depths: 8 bit palette, 16 bit RGB 5-6-5.
* CRT output only.
* No accelerated features.
* Compression is not enabled.
Could this patch be considered for inclusion, please?
Yes.
However, I would prefer that instead of:
struct geodefb_info {
struct fb_info fb;
...
use struct fb_info.par for all driver private data and use
framebuffer_release()/framebuffer_alloc() to de/allocate the fb_info
structure.
Done this now. An updated patch is attached.
This also includes a number of other changes:
- now works when built into the kernel
- flat panel support (panel=<x>x<y> option). (Only one 640x480 panel
has been tested though.)
- blank function for display blanking/powersaving.
- crt=<n> option to enable/disable the CRT output.
David Vrabel
A few minor comments:
+ /* Clear the frame buffer of garbage. */
+ memset(info->screen_base, 0, info->fix.smem_len);
Is the above really necessary? And if it is, memset_io is preferred.
+ info->screen_base = (unsigned char *)ioremap(info->fix.smem_start, info->fix.smem_len);
You also do not need the (unsigned char *) part. (sparse will complain.)
No need to resend the patch, just let me know what changes you want, if any.
Tony
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Note that this driver requires the FB_CFB_xxx and FB_SOFT_CURSOR kbuild
option patches I posted earlier today.
It's also:
Signed-off-by: David Vrabel <redacted>
Thanks for looking this over.
A few minor comments:
+ /* Clear the frame buffer of garbage. */
+ memset(info->screen_base, 0, info->fix.smem_len);
Is the above really necessary?
Yes. Otherwise the screen will show garbage until whatever application
you're using gets around to clearing the screen. (An embedded system
won't necessarily have fbcon.)
And if it is, memset_io is preferred.
Done.
+ info->screen_base = (unsigned char *)ioremap(info->fix.smem_start, info->fix.smem_len);
You also do not need the (unsigned char *) part. (sparse will complain.)
Done.
I think I got that from skeletonfb.c (which is looking a bit out of date).
No need to resend the patch, just let me know what changes you want, if any.
I've also fixed a warning and corrected some whitespace.
Here's a diff of these changes.
Index: linux-2.6-i386/drivers/video/geode/geodefb.h
===================================================================
--- linux-2.6-i386.orig/drivers/video/geode/geodefb.h 2005-02-15
10:33:59.000000000 +0000
+++ linux-2.6-i386/drivers/video/geode/geodefb.h 2005-02-15
13:49:54.782318435 +0000
@@ -22,7 +22,7 @@
struct geode_vid_ops {
void (*set_dclk)(struct fb_info *);
void (*configure_display)(struct fb_info *);
- int (*blank_display)(const struct fb_info *, int blank_mode);
+ int (*blank_display)(struct fb_info *, int blank_mode);
};
struct geodefb_par {Index: linux-2.6-i386/drivers/video/geode/gx1fb_core.c
===================================================================
--- linux-2.6-i386.orig/drivers/video/geode/gx1fb_core.c 2005-02-15
10:33:59.000000000 +0000
+++ linux-2.6-i386/drivers/video/geode/gx1fb_core.c 2005-02-15
13:53:56.244807541 +0000
@@ -139,7 +139,7 @@
return 0;
}
-static int gx1fb_blank(int blank_mode, const struct fb_info *info)
+static int gx1fb_blank(int blank_mode, struct fb_info *info)
{
struct geodefb_par *par = info->par;
@@ -174,7 +174,7 @@
if ((fb_len = gx1_frame_buffer_size()) < 0)
return -ENOMEM;
info->fix.smem_len = fb_len;
- info->screen_base = (unsigned char *)ioremap(info->fix.smem_start,
info->fix.smem_len);
+ info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
if (!info->screen_base)
return -ENOMEM;
@@ -269,7 +269,7 @@
int __init gx1fb_init(void)
{
struct fb_info *info;
- struct geodefb_par *par;
+ struct geodefb_par *par;
int ret;
#ifndef MODULE@@ -300,8 +300,8 @@
goto err;
}
- /* Clear the frame buffer of garbage. */
- memset(info->screen_base, 0, info->fix.smem_len);
+ /* Clear the frame buffer of garbage. */
+ memset_io(info->screen_base, 0, info->fix.smem_len);
gx1fb_check_var(&info->var, info);
gx1fb_set_par(info);
@@ -315,7 +315,7 @@
err:
if (info->screen_base)
- iounmap((void __iomem *)info->screen_base);
+ iounmap(info->screen_base);
if (par->vid_regs)
iounmap(par->vid_regs);
if (par->dc_regs)
@@ -330,7 +330,7 @@
static void __exit gx1fb_cleanup(void)
{
struct fb_info *info = gx1fb_info;
- struct geodefb_par *par = gx1fb_info->par;
+ struct geodefb_par *par = gx1fb_info->par;
unregister_framebuffer(info);
Index: linux-2.6-i386/drivers/video/geode/video_cs5530.c
===================================================================
--- linux-2.6-i386.orig/drivers/video/geode/video_cs5530.c 2005-02-15
10:33:59.000000000 +0000
+++ linux-2.6-i386/drivers/video/geode/video_cs5530.c 2005-02-15
13:50:10.660522983 +0000
@@ -135,7 +135,7 @@
writel(dcfg, par->vid_regs + CS5530_DISPLAY_CONFIG);
}
-static int cs5530_blank_display(const struct fb_info *info, int blank_mode)
+static int cs5530_blank_display(struct fb_info *info, int blank_mode)
{
struct geodefb_par *par = info->par;
u32 dcfg;
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
On Tuesday 15 February 2005 22:15, David Vrabel wrote:
Note that this driver requires the FB_CFB_xxx and FB_SOFT_CURSOR kbuild
option patches I posted earlier today.
It's also:
Signed-off-by: David Vrabel <redacted>
Noted. I'll submit this for the mm tree, it is too late for 2.6.11.
Tony
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click