EDIT: oops, will a mederator please edit the subject line to read "geode-lx" instead of "geode-klx", Thanks.
Hey Guys....
AMD provide a linux kernel patch ( for 2.6.11 ) to add a driver
for the geode-lx hardware accelerated framebuffer.
This patch is also circulated by embedded hardware vendors who use the geode-lx.
this driver is almost completely useless to userland applications ( thanks to an unitiialised frame buffer base pointer )
the X11 Hardware acceleration works... but any attempt to read / write from /dev/fb0 will fail, and fbset -i reports the framebuffer address as NULL
any attempt to mmap the framebuffer will fail !
Anyways... The Fix is a 2 liner...
Does anyone know how i can submit a patch to amd ?
there are no links / info on how at amd.com, or amd's open source driver page
For the mean time....
I will post it here.. ( as no doubt others will be googling )
After patching your 2.6.11 kernel (straight from kernel.org )
with this patch
http://www.amd.com/files/connectivit....03.0100.patch
then open the file
drivers/video/geode/geodefb_lx.c
find the following function
Code:
static int
lxfb_mem_init(struct lxfb_par *par)
{
int ret;
par->fbsize = (maxmem * 1024);
if (par->fbsize > cim_get_fb_active())
par->fbsize = cim_get_fb_active();
KWRN("Allocating %dK of framebuffer memory\n", par->fbsize / 1024);
par->fbphys = cim_get_fb_base();
par->fbvirt = cim_get_fb_ptr();
ret = cim_get_memory("geodefb", "framebuffer", par->fbsize, CIM_F_PUBLIC);
if (!ret) return -ENOMEM;
/* Set up acceleration - if this fails, its not fatal */
#ifdef CONFIG_FB_GEODE_ACCEL
if (accel) {
par->gpphys = cim_get_cmd_base();
par->gpsize = cim_get_cmd_size();
if (par->gpphys)
par->accel = ACCEL_NOT_READY;
}
#endif
return 0;
}
On The Line After "par->fbvirt = cim_get_fb_ptr();"
add these 2 lines
Code:
lxfb_fix.smem_start = par->fbphys;
lxfb_fix.smem_len = par->fbsize;
so the function now looks like this...
Code:
static int
lxfb_mem_init(struct lxfb_par *par)
{
int ret;
par->fbsize = (maxmem * 1024);
if (par->fbsize > cim_get_fb_active())
par->fbsize = cim_get_fb_active();
KWRN("Allocating %dK of framebuffer memory\n", par->fbsize / 1024);
par->fbphys = cim_get_fb_base();
par->fbvirt = cim_get_fb_ptr();
/* ADD THESE 2 LINES */
lxfb_fix.smem_start = par->fbphys;
lxfb_fix.smem_len = par->fbsize;
ret = cim_get_memory("geodefb", "framebuffer", par->fbsize, CIM_F_PUBLIC);
if (!ret) return -ENOMEM;
/* Set up acceleration - if this fails, its not fatal */
#ifdef CONFIG_FB_GEODE_ACCEL
if (accel) {
par->gpphys = cim_get_cmd_base();
par->gpsize = cim_get_cmd_size();
if (par->gpphys)
par->accel = ACCEL_NOT_READY;
}
#endif
return 0;
}
Now re-compile your kernel.
/dev/fb0 will now work as expected.
Good Luck