Google
  Web www.spinics.net

Re: [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux Arm]     [Fedora ARM]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux Book List]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Google PageRank Checking tool