mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Franck Bui-Huu" <vagabon.xyz@gmail.com>
To: "James Simmons" <jsimmons@infradead.org>
Cc: "Andrew Morton" <akpm@osdl.org>,
	"Linux Fbdev development list" 
	<linux-fbdev-devel@lists.sourceforge.net>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [Linux-fbdev-devel] fbmem: is bootup logo broken for monochrome LCD ?
Date: Thu, 23 Nov 2006 15:53:16 +0100	[thread overview]
Message-ID: <cda58cb80611230653x2951d9d8x41b193f0101f9fdf@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0611222101220.14604@pentafluge.infradead.org>

On 11/22/06, James Simmons <jsimmons@infradead.org> wrote:
> Replace the below line in my patch I sent
>
> > >                     val |= color << shift;
>
> with
>                         val <<= shift;
>                         val |= color;

I think it can't work since shift is 0 to 31, you'll end up with 'val
<<= 31' which I don't think is what you want.

doing
                         val <<= 1;

make it works but it's still very fragile. Code which deals with
trailing bit seems bogus since new value of 'val' is simply discarded
here.

                /* write trailing bits */
                if (shift) {
                        u32 end_mask = (~(u32)0 << shift);

                        val = FB_READL(dst1);
                        val &= end_mask;
                        FB_WRITEL(val, dst1);
                }

Another thing is that I don't see how very small images (for example
when image->width = 4) will be handled.

> > >                    /* Did the bitshift spill bits to the next long? */
> > >                        if (shift >= 31) {
> > >                                FB_WRITEL(val, dst++);
> > >                                val = (shift == 31) ? 0 :(color >> (32 - shift));
> > >                        }
> > >                        shift += 1;
> > >                        shift &= (32 - 1);
> > >                }
> > >
> > >                [ ...]
>
> Let me know if that works.

I'm wondering if working with 32 bits words really worth... I mean the
code is quite hard to follow because it needs to deal with endianess,
heading bits, trailings bits whereas working with 8 bits would be so
much easier, wouldn't it ? Are writings in video RAM very long ?

-- 
               Franck

  reply	other threads:[~2006-11-23 14:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 16:49 Franck Bui-Huu
2006-11-12 22:04 ` [Linux-fbdev-devel] " James Simmons
2006-11-13  9:53   ` Franck Bui-Huu
2006-11-13 14:17     ` James Simmons
2006-11-13 14:31       ` Franck Bui-Huu
2006-11-13 18:55         ` James Simmons
2006-11-13 18:27       ` Franck Bui-Huu
2006-11-13 18:51         ` James Simmons
2006-11-14  9:44           ` Franck Bui-Huu
2006-11-17 18:40             ` James Simmons
2006-11-17 20:42               ` Franck Bui-Huu
2006-11-20 16:42                 ` James Simmons
2006-11-21  9:45                   ` Franck Bui-Huu
2006-11-21 18:02                     ` James Simmons
2006-11-22  8:48                       ` Franck Bui-Huu
2006-11-22 19:43                         ` James Simmons
2006-11-22 21:04                         ` James Simmons
2006-11-23 14:53                           ` Franck Bui-Huu [this message]
2006-11-27 16:01                             ` 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=cda58cb80611230653x2951d9d8x41b193f0101f9fdf@mail.gmail.com \
    --to=vagabon.xyz@gmail.com \
    --cc=akpm@osdl.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®