public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ivan Gorinov <ivan.gorinov@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] efi_loader: Allow width smaller than buffer stride in efi_gop Blt()
Date: Wed, 14 Mar 2018 11:29:48 -0700	[thread overview]
Message-ID: <1521052188.38672.57.camel@intel.com> (raw)
In-Reply-To: <246c6d31-2b29-85e7-0324-ad9bb799af3a@gmx.de>

On Wed, 2018-03-14 at 18:21 +0100, Heinrich Schuchardt wrote:

@@ -87,7 +93,7 @@ efi_status_t EFIAPI gop_blt(struct efi_gop *this, void
> > *buffer,
> >  		for (i = 0; i < height; i++) {
> >  			u32 *dest = fb + ((i + dy)  * line_len32) +
> >  					 (dx * sizeof(u32));
> > -			u32 *src = buffer + ((i + sy)  * line_len32) +
> > +			u32 *src = buffer + ((i + sy) * buffer_stride) +
> >  					 (sx * sizeof(u32));
> >  
> >  			/* Same color format, just memcpy */
> > @@ -102,7 +108,7 @@ efi_status_t EFIAPI gop_blt(struct efi_gop *this, void
> > *buffer,
> >  		for (i = 0; i < height; i++) {
> >  			u16 *dest = fb + ((i + dy)  * line_len16) +
> >  					 (dx * sizeof(u16));
> > -			u32 *src = buffer + ((i + sy)  * line_len32) +
> > +			u32 *src = buffer + ((i + sy) * buffer_stride) +
> If delta cannot be divided by 4 a misaligned access error will occur on
> arm64.

This is unlikely because EFI spec allows only 32-bit pixel data in BLT buffer,
regardless of actual video frame buffer pixel format.

      reply	other threads:[~2018-03-14 18:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14  3:31 [U-Boot] [PATCH] efi_loader: Allow width smaller than buffer stride in efi_gop Blt() Ivan Gorinov
2018-03-14 15:45 ` [U-Boot] " Heinrich Schuchardt
2018-03-14 17:21 ` Heinrich Schuchardt
2018-03-14 18:29   ` Ivan Gorinov [this message]

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=1521052188.38672.57.camel@intel.com \
    --to=ivan.gorinov@intel.com \
    --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