From: Paul Mackerras <paulus@samba.org>
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH] fix offb
Date: Thu, 12 Dec 2002 14:45:17 +1100 [thread overview]
Message-ID: <15864.1613.688767.520790@argo.ozlabs.ibm.com> (raw)
This patch fixes the offb driver, and fixes the Makefile so it doesn't
go looking for a nonexistent file (cfbimgblit.o) when CONFIG_FB_OF is
turned on. In the offb driver, we were overrunning the end of the
info->fix.id field on some cards, plus it had an undefined variable.
I guess we could also get rid of the "info->node = NODEV;" line too.
Paul.
diff -urN linux-2.5/drivers/video/Makefile pmac-2.5/drivers/video/Makefile
--- linux-2.5/drivers/video/Makefile 2002-12-10 15:20:32.000000000 +1100
+++ pmac-2.5/drivers/video/Makefile 2002-12-10 21:25:36.000000000 +1100
@@ -42,7 +42,7 @@
obj-$(CONFIG_FB_3DFX) += tdfxfb.o
obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o
-obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblit.o cfbcopyarea.o
+obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o
obj-$(CONFIG_FB_IMSTT) += imsttfb.o
obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o
obj-$(CONFIG_FB_CLGEN) += clgenfb.o
diff -urN linux-2.5/drivers/video/offb.c pmac-2.5/drivers/video/offb.c
--- linux-2.5/drivers/video/offb.c 2002-12-10 15:20:32.000000000 +1100
+++ pmac-2.5/drivers/video/offb.c 2002-12-10 19:58:24.000000000 +1100
@@ -393,6 +393,7 @@
struct fb_fix_screeninfo *fix;
struct fb_var_screeninfo *var;
struct fb_info *info;
+ int size;
if (!request_mem_region(res_start, res_size, "offb"))
return;
@@ -421,7 +422,7 @@
var = &info->var;
strcpy(fix->id, "OFfb ");
- strncat(fix->id, name, sizeof(fix->id));
+ strncat(fix->id, name, sizeof(fix->id) - sizeof("OFfb "));
fix->id[sizeof(fix->id) - 1] = '\0';
var->xres = var->xres_virtual = width;
@@ -522,8 +523,6 @@
var->sync = 0;
var->vmode = FB_VMODE_NONINTERLACED;
- strcpy(fix->id, "OFfb ");
- strncat(fix->id, full_name, sizeof(fix->id));
info->node = NODEV;
info->fbops = &offb_ops;
info->screen_base = ioremap(address, fix->smem_len);
next reply other threads:[~2002-12-12 3:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-12 3:45 Paul Mackerras [this message]
2002-12-13 5:06 ` James Simmons
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=15864.1613.688767.520790@argo.ozlabs.ibm.com \
--to=paulus@samba.org \
--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
all inboxes | Powered by JetHome®