From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966962AbWKUJpn (ORCPT ); Tue, 21 Nov 2006 04:45:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S966963AbWKUJpn (ORCPT ); Tue, 21 Nov 2006 04:45:43 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]:32548 "EHLO ug-out-1314.google.com") by vger.kernel.org with ESMTP id S966962AbWKUJpn (ORCPT ); Tue, 21 Nov 2006 04:45:43 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f+iThdCIOkjP921KxATBEafjhQgw0fdRnkDNSVLyVnrfLVrRZ38blVYjCJ6wvdyMsqjyMJ9kRFi4pTrBoLVEJdYBpAo/xnwdVLfs5wdAMcW1w7MBDKsErGCpT1v4Jr0C2GhHNQbYEuia3zeEOzMW1Q0CrKpz2oXGBHvwouG/xDI= Message-ID: Date: Tue, 21 Nov 2006 10:45:41 +0100 From: "Franck Bui-Huu" To: "James Simmons" Subject: Re: [Linux-fbdev-devel] fbmem: is bootup logo broken for monochrome LCD ? Cc: "Linux Fbdev development list" , "Linux Kernel Mailing List" , "Andrew Morton" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45535C08.5020607@innova-card.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 11/20/06, James Simmons wrote: > > > On 11/17/06, James Simmons wrote: > > > > > > Are those actually numbers? If they are the problem isn't byte reversal > > > but bit shifting. > > > > > > 1010100 = 54 > > > 0101010 = 2A > > > > It's not byte reversal, but _bits_ of each bytes have been inversed > > (bit7->bit0, bit6->bit1, bit5->bit2, bit4->bit3, bit3->bit4, ...) > > after calling slow_imageblit(). Is it something expected ? > > Yipes!! Bit reversal. I have never seen that before. Is only the logo > messed up? Slow_imageblit can be called if there is no dword alignment > for the font bitmaps. So the question is do most if not all our fonts > look okay? > No, it's not an only logo issue. Bit reversals happen for all images which are passed to slow_imageblit() including all fonts. Can it be a 'bit_per_pixel = 1' issue ? It seems that this config has not been widely tested. If you look at slow_imageblit() current implementation and for example let's say that at the begining of the function we have: - __LITTLE_ENDIAN is defined - bpp = 1 - fgcolor = 1 - bgcolor = 0 - start_index = 0 The function core can be simplified into: for (i = image->height; i--; ) { shift = val = 0; l = 8; j = image->width; dst = (u32 __iomem *) dst1; s = src; while (j--) { l--; color = (*s & (1 << l)) ? 1 : 0; val |= color << shift; /* Did the bitshift spill bits to the next long? */ if (shift >= null_bits) { FB_WRITEL(val, dst++); val = (shift == null_bits) ? 0 : FB_SHIFT_LOW(color,32 - shift); } shift += 1; shift &= (32 - 1); if (!l) { l = 8; s++; }; } [ ...] Doesn't this bit of code do a bit reversal ? Specially these 2 following lines of code: color = (*s & (1 << l)) ? 1 : 0; val |= color << shift; with 'l' taking values from 7 to 0, and 'shift' taking values from 0 to 31. Thanks Franck