grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] efi/gop: require shadow if PixelBltOnly


From: Daniel Kiper
Subject: Re: [PATCH 1/1] efi/gop: require shadow if PixelBltOnly
Date: Wed, 30 Aug 2023 15:39:33 +0200

On Tue, Aug 29, 2023 at 01:25:59PM -0500, Glenn Washburn wrote:
> On Mon, 28 Aug 2023 23:50:09 +0200
> Heinrich Schuchardt <heinrich.schuchardt@canonical.com> wrote:
>
> > If the EFI graphics pixel format is PixelBltOnly, we cannot write directly
> > to the frame buffer. We need the shadow frame buffer which we copy via
> > the BitBlt operation to the hardware.
> >
> > If the pixel format is PixelBltOnly and allocation of the shadow frame
> > buffer fails, we must raise an error to signal that the EFI GOP protocol is
> > not usable.
> >
> > Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> > ---
> >  grub-core/video/efi_gop.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c
> > index 7247aeea7..09ee71b45 100644
> > --- a/grub-core/video/efi_gop.c
> > +++ b/grub-core/video/efi_gop.c
> > @@ -480,6 +480,10 @@ grub_video_gop_setup (unsigned int width, unsigned int 
> > height,
> >    if (!buffer)
> >      {
> >        grub_dprintf ("video", "GOP: couldn't allocate shadow\n");
> > +      if (info->pixel_format == GRUB_EFI_GOT_BLT_ONLY)
> > +        {
> > +          return grub_error (GRUB_ERR_OUT_OF_MEMORY, N_("out of memory"));
> > +        }
>
> Trivial nit. Shouldn't these unnecessary braces be removed?

Good point! I will drop them before push...

Thanks,

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]