From: Anatolij Gustschin <agust@denx.de>
To: Matteo Fortini <m.fortini@selcomgroup.com>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>,
linuxppc-dev@ozlabs.org, linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] Add new framebuffer driver for Fujitsu MB862xx GDCs
Date: Tue, 14 Oct 2008 23:24:39 +0200 [thread overview]
Message-ID: <48F50E17.7020801@denx.de> (raw)
In-Reply-To: <48F4D29F.6090909@selcomgroup.com>
Matteo Fortini wrote:
> Carminefb driver, though, supports 800x600 resolution.
if you use this patch below
diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c
index 26b66cb..904a111 100644
--- a/drivers/video/mb862xx/mb862xxfb.c
+++ b/drivers/video/mb862xx/mb862xxfb.c
@@ -218,6 +218,8 @@ static int mb862xxfb_set_par(struct fb_info *fbi)
if (par->pre_init)
return 0;
+ fbi->fix.line_length = (fbi->var.xres_virtual *
+ fbi->var.bits_per_pixel) / 8;
/* disp off */
reg = inreg(disp, GC_DCM1);
reg &= ~GC_DCM01_DEN;
and something like this in user space:
int fd;
struct fb_var_screeninfo var_info;
if ((fd=open("/dev/fb0", O_RDWR))==-1) {
fprintf(stderr, "Cannot open /dev/fb0\n");
exit(1);
}
var_info.xres = 800;
var_info.yres = 600;
var_info.xres_virtual = 800;
var_info.yres_virtual = 600;
var_info.pixclock = 25000;
var_info.left_margin = 88;
var_info.right_margin = 40;
var_info.lower_margin = 1;
var_info.upper_margin = 23;
var_info.hsync_len = 128;
var_info.vsync_len = 4;
if (ioctl(fd, FBIOPUT_VSCREENINFO, &var_info)<0) {
fprintf(stderr, "Cannot set fb var_info\n");
exit(1);
}
than 800x600 resolution should be possible too. Also 1024x768
resolution should be possible with appropriate parameters.
> BTW, I tried this patch and I get wrong colors on a patched DirectFB
> which is changing the endianness on the fly. Is this driver already
> taking care of this?
I don't know how it behaves with DirectFB. But to get proper
framebuffer console colors with carmine/coralp GDCs I used a
small patch below:
diff --git a/include/linux/fb.h b/include/linux/fb.h
index ae4ecdf..e998048 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -891,11 +891,11 @@ struct fb_info {
#define fb_readb __raw_readb
#define fb_readw __raw_readw
-#define fb_readl __raw_readl
+#define fb_readl readl
#define fb_readq __raw_readq
#define fb_writeb __raw_writeb
#define fb_writew __raw_writew
-#define fb_writel __raw_writel
+#define fb_writel writel
#define fb_writeq __raw_writeq
#define fb_memset memset_io
Best regards,
Anatolij
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de
next prev parent reply other threads:[~2008-10-14 21:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-14 15:25 [PATCH] Add new framebuffer driver for Fujitsu MB862xx GDCs Anatolij Gustschin
2008-10-14 15:50 ` Dmitry Baryshkov
2008-10-14 17:04 ` Anton Vorontsov
2008-10-14 17:10 ` Matteo Fortini
2008-10-14 17:53 ` Anton Vorontsov
2008-10-14 21:24 ` Anatolij Gustschin [this message]
2008-10-15 13:40 ` Matteo Fortini
2008-10-15 14:21 ` Anatolij Gustschin
2008-10-15 14:27 ` Matteo Fortini
2008-10-16 21:17 ` Andrew Morton
2008-10-19 2:52 ` Andrew Morton
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=48F50E17.7020801@denx.de \
--to=agust@denx.de \
--cc=dbaryshkov@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=m.fortini@selcomgroup.com \
/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).