From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/7] common lcd: simplify lcd_display_bitmap
Date: Fri, 8 Jun 2012 15:38:39 +0200 [thread overview]
Message-ID: <20120608153839.55e5c974@wker> (raw)
In-Reply-To: <1337859764-16086-8-git-send-email-grinberg@compulab.co.il>
Hi,
On Thu, 24 May 2012 14:42:44 +0300
Igor Grinberg <grinberg@compulab.co.il> wrote:
> From: Nikita Kiryanov <nikita@compulab.co.il>
>
> Move highly platform dependant code into its own functions to reduce the
> number of #ifdefs in lcd_display_bitmap
>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> common/lcd.c | 44 +++++++++++++++++++++++++++-----------------
> 1 files changed, 27 insertions(+), 17 deletions(-)
>
> diff --git a/common/lcd.c b/common/lcd.c
> index 199a8c2..a55ee58 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -638,6 +638,29 @@ static void splash_align_axis(int *axis, unsigned long panel_size,
...
> +#if defined(CONFIG_BMP_16BPP)
> +#if defined(CONFIG_ATMEL_LCD_BGR555)
> +static inline void configuration_fb_puts(uchar *fb, uchar *from)
> +{
> + *(fb++) = ((from[0] & 0x1f) << 2) | (from[1] & 0x03);
> + *(fb++) = (from[0] & 0xe0) | ((from[1] & 0x7c) >> 2);
> + from += 2;
> +}
> +#else
> +static inline void configuration_fb_puts(uchar *fb, uchar *from)
> +{
> + *(fb++) = *(from++);
> + *(fb++) = *(from++);
> +}
> +#endif
> +#endif /* CONFIG_BMP_16BPP */
This won't work. The original code increments 'fb' and 'bmap' pointers
in the inner for loop. Using this function in the inner loop won't
increment the pointers as needed, as these will only be incremented in
the function itself (as local variables).
Also please use a different name for the macro, CONFIGURATION_FB_PUTB
isn't a descriptive name. FB_PUT_PIXEL or similar perhaps?
Thanks,
Anatolij
next prev parent reply other threads:[~2012-06-08 13:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 11:42 [U-Boot] [PATCH 0/7] common/lcd cleanup Igor Grinberg
2012-05-24 11:42 ` [U-Boot] [PATCH 1/7] common lcd: minor coding style changes Igor Grinberg
2012-06-08 13:51 ` Anatolij Gustschin
2012-05-24 11:42 ` [U-Boot] [PATCH 2/7] common lcd: simplify #ifdefs Igor Grinberg
2012-06-08 12:52 ` Anatolij Gustschin
2012-06-13 12:55 ` Nikita Kiryanov
2012-05-24 11:42 ` [U-Boot] [PATCH 3/7] common lcd: simplify bitmap_plot Igor Grinberg
2012-06-08 13:09 ` Anatolij Gustschin
2012-05-24 11:42 ` [U-Boot] [PATCH 4/7] common lcd: simplify lcd_logo Igor Grinberg
2012-06-08 15:35 ` Anatolij Gustschin
2012-05-24 11:42 ` [U-Boot] [PATCH 5/7] common lcd: simplify lcd_display Igor Grinberg
2012-05-24 11:42 ` [U-Boot] [PATCH 6/7] common lcd: simplify core functions Igor Grinberg
2012-05-24 11:42 ` [U-Boot] [PATCH 7/7] common lcd: simplify lcd_display_bitmap Igor Grinberg
2012-06-08 13:38 ` Anatolij Gustschin [this message]
2012-06-08 8:00 ` [U-Boot] [PATCH 0/7] common/lcd cleanup Igor Grinberg
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=20120608153839.55e5c974@wker \
--to=agust@denx.de \
--cc=u-boot@lists.denx.de \
/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