From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: ymiao3@marvell.com, linux-fbdev-devel@lists.sourceforge.net,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface
Date: Mon, 21 Jul 2008 12:11:59 +0100 [thread overview]
Message-ID: <20080721111159.GA18909@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1216534233-26674-2-git-send-email-jayakumar.lkml@gmail.com>
On Sun, Jul 20, 2008 at 02:10:29AM -0400, Jaya Kumar wrote:
> if (fbi->map_cpu) {
> /* prevent initial garbage on screen */
> memset(fbi->map_cpu, 0, fbi->map_size);
> - fbi->fb.screen_base = fbi->map_cpu + fbi->video_offset;
> + fbi->fb.screen_base = (char __force __iomem *) fbi->map_cpu
> + + fbi->video_offset;
I'm not sure this has any benefits - the use of __force in drivers is
definitely frowned upon.
It's well known that FB doesn't sit well with all the MMIO sparse checking
so it's probably a good idea not to try and make it work.
> @@ -1357,6 +1379,8 @@ static void pxafb_decode_mode_info(struct pxafb_info *fbi,
> smemlen = modes[i].xres * modes[i].yres * modes[i].bpp / 8;
> if (smemlen > fbi->fb.fix.smem_len)
> fbi->fb.fix.smem_len = smemlen;
> + if (inf->custom_xfer_div)
> + fbi->fb.fix.smem_len /= inf->custom_xfer_div;
I don't understand this. If you have a 640x480 display with 8 bits of
memory per pixel, then it's 307200 bytes no matter whether you're only
using the lower 4 bits and the upper 4 are unused.
If, on the other hand, the lower 4 bits contain one pixel and the upper
4 bits contain the other pixel, then you have a 4 bit per pixel
framebuffer, so 'bpp' should be 4. In which case the original calculation
gives the correct answer.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
next prev parent reply other threads:[~2008-07-21 11:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-20 6:10 [RFC 2.6.26-rc9 0/5] am200epd, pxafb, metronomefb changes v6 Jaya Kumar
2008-07-20 6:10 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-21 11:11 ` Russell King - ARM Linux [this message]
2008-07-21 12:32 ` Jaya Kumar
2008-07-21 13:53 ` SSP based framebuffer driver Blaine Booher
2008-07-26 3:30 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-30 2:41 ` Eric Miao
2008-07-30 3:10 ` Jaya Kumar
2008-07-20 6:10 ` [RFC 2.6.26-rc9 2/5] gumstix: conversion to MFP support and add bluetooth support Jaya Kumar
2008-07-21 2:13 ` eric miao
2008-07-20 6:10 ` [RFC 2.6.26-rc9 3/5] am200epd: convert to shared fb and use gpio api Jaya Kumar
2008-07-20 6:10 ` [RFC 2.6.26-rc9 4/5] metronomefb: convert printk to dev_dbg/err messages Jaya Kumar
2008-07-20 6:10 ` [RFC 2.6.26-rc9 5/5] metronomefb: changes to use separate framebuffer Jaya Kumar
-- strict thread matches above, loose matches on Subject: below --
2008-07-26 4:32 [RFC 2.6.26-rc9 0/5] am200epd, pxafb, metronomefb changes v7 Jaya Kumar
2008-07-26 4:32 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-29 15:28 ` Krzysztof Helt
2008-07-29 16:39 ` Jaya Kumar
2008-07-13 13:26 [RFC 2.6.26-rc9 0/5] am200epd, pxafb, metronomefb changes v5 Jaya Kumar
2008-07-13 13:26 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-16 7:00 ` eric miao
2008-07-16 8:59 ` Jaya Kumar
2008-07-16 9:08 ` eric miao
2008-07-16 11:10 ` Jaya Kumar
2008-07-16 9:38 ` Russell King - ARM Linux
2008-07-16 11:18 ` Jaya Kumar
2008-07-20 2:41 ` Jaya Kumar
2008-07-21 2:10 ` eric miao
2008-07-21 3:38 ` Jaya Kumar
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=20080721111159.GA18909@flint.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=jayakumar.lkml@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=ymiao3@marvell.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).