From: Thomas Schlichter <schlicht@uni-mannheim.de>
To: Helge Hafting <helgehaf@aitel.hist.no>,
Antonino Daplas <adaplas@pol.net>
Cc: James Simmons <jsimmons@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Much better framebuffer fixes.
Date: Thu, 27 Mar 2003 18:16:24 +0100 [thread overview]
Message-ID: <200303271816.30636.schlicht@uni-mannheim.de> (raw)
In-Reply-To: <3E82C580.1000801@aitel.hist.no>
[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 1062 bytes --]
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 Schlichter
[-- Attachment #1.2: fbcon.diff --]
[-- Type: text/x-diff, Size: 2093 bytes --]
diff -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;
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2003-03-27 17:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-27 0:18 Much better framebuffer fixes James Simmons
2003-03-27 3:29 ` [Linux-fbdev-devel] " Antonino Daplas
2003-03-27 9:33 ` Helge Hafting
2003-03-27 17:16 ` Thomas Schlichter [this message]
2003-03-27 19:15 ` Antonino Daplas
2003-03-27 9:18 ` Geert Uytterhoeven
2003-03-27 19:15 ` Antonino Daplas
2003-03-27 9:58 ` Helge Hafting
2003-03-27 15:58 ` Thomas Molina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200303271816.30636.schlicht@uni-mannheim.de \
--to=schlicht@uni-mannheim.de \
--cc=adaplas@pol.net \
--cc=helgehaf@aitel.hist.no \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).