lkml.org 
[lkml]   [2003]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [Linux-fbdev-devel] Much better framebuffer fixes.
Date
Helge Hafting wrote:
> Antonino Daplas wrote:
> > On Thu, 2003-03-27 at 08:18, James Simmons wrote:
> >
> >>Okay. Here are more framebuffer fixes. Please try these fixes and let me
> >>know how they work out for you.
> >>
> >
> >
> > This is a resend of the patch I previously sent. I see that you have
> > made changes to the logo drawing code targeted for monochrome logo
> > drawing to use mono expansion. You still need a few changes though,
> > image->bg_color and image->fg_color must be initialized correctly when
> > image->depth == 1.
>
> This applied on top of James Simmons' patch, but didn't compile.
> spin_lock_irqsave was "unknown".

I had that problem, too, so I changed some code to make it compile, remove
some warnings and even fix a possible memory leak... A patch is attached and
applies after applying the patches fom James Simmons and Antonino Daplas.

With these changes my framebuffer works correctly again, I don't even have any
problem with a misshaped cursor anymore...

Regards
Thomas Schlichterdiff -ur linux-2.5.66/drivers/video/console/fbcon.c linux-2.5.66-bk2/drivers/video/console/fbcon.c
--- linux-2.5.66/drivers/video/console/fbcon.c Thu Mar 27 17:56:12 2003
+++ linux-2.5.66-bk2/drivers/video/console/fbcon.c Thu Mar 27 16:06:04 2003
@@ -216,12 +216,14 @@
}
}

+#if defined(CONFIG_ATARI) || defined(CONFIG_MAC) || ( defined(__arm__) && defined(IRQ_VSYNCPULSE) )
static void fb_vbl_handler(int irq, void *dev_id, struct pt_regs *fp)
{
struct fb_info *info = dev_id;

schedule_work(&info->queue);
}
+#endif

static void cursor_timer_handler(unsigned long dev_addr);

@@ -586,7 +588,7 @@

font = get_default_font(info->var.xres, info->var.yres);

- vc = (struct vc_data *) kmalloc(sizeof(struct vc_data), GFP_ATOMIC);
+ vc = (struct vc_data *) kmalloc(sizeof(struct vc_data), GFP_KERNEL);

if (!vc) {
if (softback_buf)
@@ -597,6 +599,8 @@
/* Allocate private data */
info->fbcon_priv = kmalloc(sizeof(struct fbcon_private), GFP_KERNEL);
if (info->fbcon_priv == NULL) {
+ if (softback_buf)
+ kfree((void *) softback_buf);
kfree(vc);
return NULL;
}
diff -ur linux-2.5.66/drivers/video/fbmem.c linux-2.5.66-bk2/drivers/video/fbmem.c
--- linux-2.5.66/drivers/video/fbmem.c Thu Mar 27 17:56:12 2003
+++ linux-2.5.66-bk2/drivers/video/fbmem.c Thu Mar 27 14:40:04 2003
@@ -471,7 +471,7 @@
atomic_inc(&info->pixmap.count);
smp_mb__after_atomic_inc();

- spin_unlock_irqrestore(&info->pixmap.lock);
+ spin_unlock(&info->pixmap.lock);
return offset;
}

@@ -566,9 +566,8 @@
const struct linux_logo *logo, u8 *dst,
int depth)
{
- int i, j, shift;
+ int i, j;
const u8 *src = logo->data;
- u8 d, xor = 0;

switch (depth) {
case 4:
@@ -649,7 +648,7 @@
/* What depth we asked for might be different from what we get */
if (fb_logo.logo->type == LINUX_LOGO_CLUT224)
fb_logo.depth = 8;
- else if (fb_logo.logo->type = LINUX_LOGO_VGA16)
+ else if (fb_logo.logo->type == LINUX_LOGO_VGA16)
fb_logo.depth = 4;
else
fb_logo.depth = 1; [unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.101 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site