[PATCH 06/11] efi: Support copy framebuffer

Simon Glass sjg at chromium.org
Tue Feb 14 20:48:58 CET 2023


Hi Heinrich,

On Fri, 10 Feb 2023 at 05:11, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
> On 2/5/23 20:46, Simon Glass wrote:
> > Add support for this to EFI in case it becomes useful. At present it just
> > slows things down. Enable CONFIG_VIDEO_COPY to turn it on.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> >   arch/x86/dts/efi-x86_app.dts |  1 +
> >   drivers/video/efi.c          | 11 +++++++++++
> >   2 files changed, 12 insertions(+)
> >
> > diff --git a/arch/x86/dts/efi-x86_app.dts b/arch/x86/dts/efi-x86_app.dts
> > index a5316e2a1a7..7afa3d72d57 100644
> > --- a/arch/x86/dts/efi-x86_app.dts
> > +++ b/arch/x86/dts/efi-x86_app.dts
> > @@ -27,6 +27,7 @@
> >       };
> >       efi-fb {
> >               compatible = "efi-fb";
> > +             u-boot,dm-pre-reloc;
> >       };
> >
> >   };
> > diff --git a/drivers/video/efi.c b/drivers/video/efi.c
> > index 169637c2882..9135a8e8187 100644
> > --- a/drivers/video/efi.c
> > +++ b/drivers/video/efi.c
> > @@ -207,6 +207,16 @@ err:
> >       return ret;
> >   }
> >
> > +static int efi_video_bind(struct udevice *dev)
> > +{
> > +     struct video_uc_plat *plat = dev_get_uclass_plat(dev);
> > +
> > +     /* Use a 16MB frame buffer in case VIDEO_COPY is enabled */
> > +     plat->copy_size = 16 << 20;
>
> This does not work with today's display sizes:
>
> 3840 * 2160 * 4 = 33177600
> 7680 * 4320 * 4 = 132710400
>
> You have to determine the buffer size from the mode information.

I am trying to do this when the device is bound, i.e. before we know
the mode information. How about I just increase it?

BTW I notice that the EFI display is very slow on x86, e.g. with
scrolling. Are the mtrrs supposed to be set up?

Regards,
Simon


More information about the U-Boot mailing list