From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V5 REPOST 3/7] lcd: calculate line_length after lcd_ctrl_init()
Date: Wed, 20 Mar 2013 16:46:48 +0100 [thread overview]
Message-ID: <20130320164648.31999cdb@lilith> (raw)
In-Reply-To: <1358303219-17503-3-git-send-email-swarren@wwwdotorg.org>
Hi Stephen,
On Tue, 15 Jan 2013 19:26:55 -0700, Stephen Warren
<swarren@wwwdotorg.org> wrote:
> When an LCD driver is actually driving a regular external display, e.g.
> an HDMI monitor, the display resolution might not be known until the
> display controller has initialized, i.e. during lcd_ctrl_init(). However,
> lcd.c calculates lcd_line_length before calling this function, thus
> relying on a hard-coded resolution in struct panel_info.
>
> Instead, defer this calculation until after lcd_ctrl_init() has had the
> chance to dynamically determine the resolution. This needs to happen
> before lcd_clear(), since the value is used there.
>
> grep indicates that no code outside lcd.c uses this lcd_line_length; in
> particular, no lcd_ctrl_init() implementations read it.
>
> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
> Acked-by: Anatolij Gustschin <agust@denx.de>
> --
> v5: No change; merged patch series.
> v4: Adjusted to addition of lcd_get_size() function. Rebased.
> v3: No change.
> ---
> common/lcd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/common/lcd.c b/common/lcd.c
> index 66d4f94..9fa4e5c 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -384,8 +384,6 @@ int drv_lcd_init (void)
>
> lcd_base = (void *)(gd->fb_base);
>
> - lcd_get_size(&lcd_line_length);
> -
> lcd_init(lcd_base); /* LCD initialization */
>
> /* Device initialization */
> @@ -468,6 +466,8 @@ static int lcd_init(void *lcdbase)
> debug("[LCD] Initializing LCD frambuffer at %p\n", lcdbase);
>
> lcd_ctrl_init(lcdbase);
> + lcd_get_size(&lcd_line_length);
> + lcd_line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;
> lcd_is_enabled = 1;
> lcd_clear();
> lcd_enable ();
Applied to u-boot-arm/master, thanks!
Amicalement,
--
Albert.
next prev parent reply other threads:[~2013-03-20 15:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 2:26 [U-Boot] [PATCH V5 REPOST 1/7] ARM: bcm2835: add mailbox driver Stephen Warren
2013-01-16 2:26 ` [U-Boot] [PATCH V5 REPOST 2/7] ARM: rpi_b: use bcm2835 mbox driver to get memory size Stephen Warren
2013-03-20 15:31 ` Albert ARIBAUD
2013-01-16 2:26 ` [U-Boot] [PATCH V5 REPOST 3/7] lcd: calculate line_length after lcd_ctrl_init() Stephen Warren
2013-03-20 15:46 ` Albert ARIBAUD [this message]
2013-01-16 2:26 ` [U-Boot] [PATCH V5 REPOST 4/7] ARM: rpi_b: disable rpi_b dcache explicitly Stephen Warren
2013-03-20 15:31 ` Albert ARIBAUD
2013-01-16 2:26 ` [U-Boot] [PATCH V5 REPOST 5/7] video: add a driver for the bcm2835 Stephen Warren
2013-03-20 15:31 ` Albert ARIBAUD
2013-01-16 2:26 ` [U-Boot] [PATCH V5 REPOST 6/7] mmc: add bcm2835 driver Stephen Warren
2013-02-03 11:27 ` Albert ARIBAUD
2013-02-15 3:05 ` Stephen Warren
2013-03-10 6:34 ` Stephen Warren
2013-03-11 6:35 ` Albert ARIBAUD
2013-03-15 22:51 ` Stephen Warren
2013-03-16 8:09 ` Albert ARIBAUD
2013-03-20 14:33 ` Albert ARIBAUD
2013-03-20 15:31 ` Albert ARIBAUD
2013-01-16 2:26 ` [U-Boot] [PATCH V5 REPOST 7/7] ARM: rpi_b: enable SD controller, add related env/cmds Stephen Warren
2013-03-20 15:31 ` Albert ARIBAUD
2013-03-20 15:30 ` [U-Boot] [PATCH V5 REPOST 1/7] ARM: bcm2835: add mailbox driver Albert ARIBAUD
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=20130320164648.31999cdb@lilith \
--to=albert.u.boot@aribaud.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.