public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: Dave Young <dyoung@redhat.com>
Cc: matt.fleming@intel.com, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com, x86@kernel.org, linux-efi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] efi earlyprintk fix
Date: Mon, 4 Nov 2013 10:37:39 +0000	[thread overview]
Message-ID: <20131104103739.GD21688@console-pimps.org> (raw)
In-Reply-To: <20131103121647.GA4770@dhcp-16-126.nay.redhat.com>

On Sun, 03 Nov, at 08:16:47PM, Dave Young wrote:
> 
> there's below one line shift problem:
> 
>                      ACPI=0xdabfe000  ACPI 2.0=0xdabfe014  SMBIOS=0xdaa9e000
> [    0.000000] efi:  
> 
> In fact check efi_y and the lfb_height should be compared at the begin of the
> loop of early_efi_write
 
Hmm... this is interesting. I can't produce this on any of my machines.
Where did you see this? What hardware?

> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
>  arch/x86/platform/efi/early_printk.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-2.6.orig/arch/x86/platform/efi/early_printk.c
> +++ linux-2.6/arch/x86/platform/efi/early_printk.c
> @@ -106,6 +106,15 @@ early_efi_write(struct console *con, con
>  		if (count > linemax)
>  			count = linemax;
>  
> +		if (efi_y + font->height >= si->lfb_height) {
> +			u32 i;
> +
> +			efi_y -= font->height;
> +			early_efi_scroll_up();
> +
> +			for (i = 0; i < font->height; i++)
> +				early_efi_clear_scanline(efi_y + i);
> +		}
>  		for (h = 0; h < font->height; h++) {
>  			unsigned int n, x;
>  
> @@ -142,15 +151,6 @@ early_efi_write(struct console *con, con
>  			efi_y += font->height;
>  		}
>  
> -		if (efi_y + font->height >= si->lfb_height) {
> -			u32 i;
> -
> -			efi_y -= font->height;
> -			early_efi_scroll_up();
> -
> -			for (i = 0; i < font->height; i++)
> -				early_efi_clear_scanline(efi_y + i);
> -		}
>  	}
>  }

Notice how we figure out the initial value of efi_y...

static __init int early_efi_setup(struct console *con, char *options)
{
	struct screen_info *si;
	u16 xres, yres;
	u32 i;

	si = &boot_params.screen_info;
	xres = si->lfb_width;
	yres = si->lfb_height;

	....

	efi_y = rounddown(yres, font->height) - font->height;

Every time we enter early_efi_write(), we should have enough space to
write one line, so I'm not at all sure what's going wrong with your
display.

-- 
Matt Fleming, Intel Open Source Technology Center

  reply	other threads:[~2013-11-04 10:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-03 12:16 [PATCH] efi earlyprintk fix Dave Young
2013-11-04 10:37 ` Matt Fleming [this message]
2013-11-04 12:58   ` Dave Young
2013-11-06  8:49     ` Matt Fleming
2013-11-07 12:00       ` Dave Young
2013-11-06  9:23     ` Dave Young
2013-11-06  9:38       ` Matt Fleming
2013-11-07 12:09         ` Dave Young
2013-11-08 10:36           ` Matt Fleming
2013-11-09  3:44             ` Dave Young
2013-11-11 16:13               ` Matt Fleming
2013-11-12  2:22                 ` Dave Young
2013-12-18  9:52     ` Dave Young
2013-12-18 10:31       ` Matt Fleming

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=20131104103739.GD21688@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=dyoung@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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