mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Schlichter <schlicht@uni-mannheim.de>
To: Thomas Molina <tmolina@cox.net>, jsimmons@infradead.org
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: fbcon sleeping function call from illegal context
Date: Wed, 26 Mar 2003 15:48:25 +0100	[thread overview]
Message-ID: <200303261548.45370.schlicht@uni-mannheim.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0303260821590.944-100000@localhost.localdomain>


[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 851 bytes --]

Am Mittwoch, 26. März 2003 15:31 schrieb Thomas Molina:
> One hunk applied with fuzz and two hunks were rejected when applied both 
> to 2.5.66 stock and bk-latest.  I fixed up the rejects by hand and 
> compiled a new kernel against bk-latest.  I am running with that version 
> now, which doesn't emit the string of messages I reported originally.  The 
> only minor anomaly I note is the cursor is a three-segment underscore 
> rather than a solid underscore.  

I had the same problems patching my 2.5.66 and so applied the patch by hand, 
too. The problem with the wrong shaped cursor was here, too, I solved it with 
the attached patch. The 'data' area was not initialized correctly. The patch 
also uses 'memset()' to generate the 'mask' instead of writing the bytes by 
hand...

I hope this helps you,too!

   Thomas Schlichter

[-- Attachment #1.2: fbcon.patch --]
[-- Type: text/x-diff, Size: 1573 bytes --]

--- linux-2.5.66/drivers/video/console/fbcon.c.patched	Wed Mar 26 15:16:41 2003
+++ linux-2.5.66/drivers/video/console/fbcon.c	Wed Mar 26 15:27:15 2003
@@ -1001,7 +1001,7 @@
 	int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 	int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
 	int height, width, size, c;
-	int w, cur_height, i = 0;
+	int w, cur_height;
 	char *font, *mask, *data;
 	
 	if (cursor->set & FB_CUR_SETCUR)
@@ -1021,7 +1021,8 @@
 		cursor->set |= FB_CUR_SETSIZE;
 	}	
 
-	size = ((width + 7) >> 3) * height;
+	w = (width + 7) >> 3;
+	size = w * height;
 
 	data = kmalloc(size, GFP_KERNEL);
 
@@ -1034,10 +1035,7 @@
 		return;
 	}
 
-	if (cursor->set & FB_CUR_SETSIZE) {
-		memset(data, 0xff, size);
-		cursor->set |= FB_CUR_SETSHAPE;
-	}
+	memset(data, 0xff, size);
 
 	c = scr_readw((u16 *) vc->vc_pos);
 
@@ -1053,8 +1051,6 @@
 		cursor->set |= FB_CUR_SETDEST;
 	}
 
-	w = (width + 7) >> 3;
-
 	switch (vc->vc_cursor_type & 0x0f) {
 		case CUR_NONE:
 			cur_height = 0;
@@ -1078,13 +1074,15 @@
 	}
 
 	size = (height - cur_height) * w;
-	while (size--)
-		mask[i++] = 0;
-	size = cur_height * w;
-	while (size--)
-		mask[i++] = 0xff;
 
-	if (!info->cursor.mask ||  (memcmp(mask, info->cursor.mask, w*height)))
+	if (size)
+		memset(mask, 0x00, size);
+
+	if (cur_height)
+		memset(mask + size, 0xff, cur_height * w);
+
+	if ((cursor->set & FB_CUR_SETSIZE) || !info->cursor.mask ||
+	    memcmp(mask, info->cursor.mask, w*height))
 		cursor->set |= FB_CUR_SETSHAPE;
 
 	cursor->image.width = width;

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-03-26 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-26 14:31 Thomas Molina
2003-03-26 14:48 ` Thomas Schlichter [this message]
2003-03-26 16:58   ` Thomas Molina
2003-03-26 18:33     ` James Simmons
2003-03-26 21:57       ` [Linux-fbdev-devel] " Benjamin Herrenschmidt

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=200303261548.45370.schlicht@uni-mannheim.de \
    --to=schlicht@uni-mannheim.de \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tmolina@cox.net \
    /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

all inboxes | Powered by JetHome®