|
From: James S. <jsi...@tr...> - 2002-07-31 18:00:25
|
> I have fixed that for a long time or it wouldn't link anyway...
I have teh fix to push to linus soon.
> So if I don't have CONFIG_FBCON_ACCEL, it dies in fbcon_setup because
> dispsw is not set,
Correct. I should have it set to fbcon_dummy instead. Added fix to BK
repository.
> if I have CONFIG_FBCON_ACCEL set, it dies in cfb_imageblt,
> I think it's display->fb_info that is null, but I have to dbl check.
I think it might be a memset issue. Try this patch.
--- /usr/src/linus-2.5/drivers/video/offb.c Tue Jul 30 22:55:24 2002
+++ offb.c Wed Jul 31 10:43:33 2002
@@ -82,17 +82,15 @@
unsigned long address, struct device_node *dp);
static struct fb_ops offb_ops = {
- owner: THIS_MODULE,
- fb_get_fix: gen_get_fix,
- fb_get_var: gen_get_var,
- fb_set_var: gen_set_var,
- fb_get_cmap: gen_get_cmap,
- fb_set_cmap: gen_set_cmap,
- fb_setcolreg: offb_setcolreg,
- fb_blank: offb_blank,
- fb_fillrect: cfb_fillrect,
- fb_copyarea: cfb_copyarea,
- fb_imageblit: cfb_imageblit,
+ .owner = THIS_MODULE,
+ .fb_set_var = gen_set_var,
+ .fb_get_cmap = gen_get_cmap,
+ .fb_set_cmap = gen_set_cmap,
+ .fb_setcolreg = offb_setcolreg,
+ .fb_blank = offb_blank,
+ .fb_fillrect = cfb_fillrect,
+ .fb_copyarea = cfb_copyarea,
+ .fb_imageblit = cfb_imageblit,
};
/*
@@ -399,7 +397,7 @@
struct fb_fix_screeninfo *fix;
struct fb_var_screeninfo *var;
struct fb_info *info;
- int i;
+ int size, i;
if (!request_mem_region(res_start, res_size, "offb"))
return;
@@ -414,14 +412,15 @@
return;
}
- info =
- kmalloc(sizeof(struct fb_info) + sizeof(struct display) +
- sizeof(u32) * 17, GFP_ATOMIC);
+ size = sizeof(struct fb_info) + sizeof(struct display) + sizeof(u32) * 17;
+
+ info = kmalloc(size, GFP_ATOMIC);
+
if (info == 0) {
release_mem_region(res_start, res_size);
return;
}
- memset(info, 0, sizeof(*info));
+ memset(info, 0, size);
fix = &info->fix;
var = &info->var;
> Why would you kill the fbcon-cfg stuffs ? That would mean making
> CONFIG_FBCON_ACCEL not to be an option then. Or simple framebuffers like
> offb wouldn't work.
The goal is to eventually move fbcon_accel into the upper framebuffer
console layer. What we want to do is move all the console code out of
every fbdev driver into fbcon.c. This will allow fbdev to exist without
fbcon. This will be allow for smaller kernels which is needed by resource
constrant handheld devices.
The problem is that over the years the limitations of the console system
have been handled on the drivers side. Now I reworking the upper layers so
the low end drivers can be really really simple. You can see the
difference with the tdfx driver or example. It had 60% code size
reduction. 60% !!!!!
|