[PATCH v3] video: sunxi_display: Convert to DM_VIDEO
Andre Przywara
andre.przywara at arm.com
Fri Feb 5 20:31:23 CET 2021
On Fri, 05 Feb 2021 17:27:25 +0100
Jernej Škrabec <jernej.skrabec at siol.net> wrote:
> Dne petek, 05. februar 2021 ob 02:07:48 CET je Andre Przywara napisal(a):
> > From: Jagan Teki <jagan at amarulasolutions.com>
> >
> > DM_VIDEO migration deadline is already expired, but around
> > 80 Allwinner boards are still using video in a legacy way.
> >
> > ===================== WARNING ======================
> > This board does not use CONFIG_DM_VIDEO Please update
> > the board to use CONFIG_DM_VIDEO before the v2019.07 release.
> > Failure to update by the deadline may result in board removal.
> > See doc/driver-model/migration.rst for more info.
> > ====================================================
> >
> > Convert the legacy video driver over to the DM_VIDEO framework. This is
> > a minimal conversion: it doesn't use the DT for finding its resources,
> > nor does it use DM clocks or DM devices for the outputs (LCD, HDMI, CVBS).
> >
> > Tested in Bananapi M1+ Plus 1920x1200 HDMI out. (Jagan)
> >
> > Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> > [Andre: rebase and smaller fixes]
> > Signed-off-by: Andre Przywara <andre.przywara at arm.com>
> > ---
> > Hi,
> >
> > I picked this one up to get rid of the warnings. I dropped the BMP
> > support for now (v2 1/3 and v2 2/3), I need to have a closer look, as
> > I am not convinced this was the right solution.
> >
> > Cheers,
> > Andre
> >
> > Changelog v2 .. v3:
> > - rebase against master, fixing up renamed variables and structs
> > - replace enum with #define
> > - remove BMP from Kconfig
> > - fix memory node size calculation in simplefb setup
> >
> > arch/arm/mach-sunxi/Kconfig | 9 +-
> > drivers/video/sunxi/sunxi_display.c | 262 ++++++++++++++++------------
> > include/configs/sunxi-common.h | 17 --
> > scripts/config_whitelist.txt | 1 -
> > 4 files changed, 157 insertions(+), 132 deletions(-)
> >
> > diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> > index 0135575ca1e..a29d11505aa 100644
> > --- a/arch/arm/mach-sunxi/Kconfig
> > +++ b/arch/arm/mach-sunxi/Kconfig
> > @@ -816,13 +816,14 @@ config VIDEO_SUNXI
> > depends on !MACH_SUN9I
> > depends on !MACH_SUN50I
> > depends on !SUN50I_GEN_H6
> > - select VIDEO
> > + select DM_VIDEO
> > + select DISPLAY
> > imply VIDEO_DT_SIMPLEFB
> > default y
> > ---help---
> > - Say Y here to add support for using a cfb console on the HDMI, LCD
> > - or VGA output found on most sunxi devices. See doc/README.video
> for
> > - info on how to select the video output and mode.
> > + Say Y here to add support for using a graphical console on the
> HDMI,
> > + LCD or VGA output found on older sunxi devices. This will also
> provide
> > + a simple_framebuffer device for Linux.
> >
> > config VIDEO_HDMI
> > bool "HDMI output support"
>
> <snip>
>
> > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> > index 000f3864702..97661329ba4 100644
> > --- a/include/configs/sunxi-common.h
> > +++ b/include/configs/sunxi-common.h
> > @@ -256,23 +256,6 @@ extern int soft_i2c_gpio_scl;
> > #endif
> > #endif /* ifdef CONFIG_REQUIRE_SERIAL_CONSOLE */
> >
> > -#ifdef CONFIG_VIDEO_SUNXI
> > -/*
> > - * The amount of RAM to keep free at the top of RAM when relocating u-boot,
> > - * to use as framebuffer. This must be a multiple of 4096.
> > - */
> > -#define CONFIG_SUNXI_MAX_FB_SIZE (16 << 20)
> > -
> > -#define CONFIG_VIDEO_LOGO
> > -#define CONFIG_VIDEO_STD_TIMINGS
> > -#define CONFIG_I2C_EDID
> > -#define VIDEO_LINE_LEN (pGD->plnSizeX)
> > -
> > -/* allow both serial and cfb console. */
> > -/* stop x86 thinking in cfbconsole from trying to init a pc keyboard */
> > -
> > -#endif /* CONFIG_VIDEO_SUNXI */
> > -
> > /* Ethernet support */
> >
> > #ifdef CONFIG_USB_EHCI_HCD
>
> This file has another ifdef which can be removed (#ifdef CONFIG_VIDEO).
Ah, indeed, thanks for pointing this out.
I think they are even more cleanups lurking in the shadows ;-)
> After that,
> Reviewed-by: Jernej Skrabec <jernej.skrabec at siol.net>
Thanks!
Andre
>
> Best regards,
> Jernej
>
> > diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> > index c6a83124956..ed469f74034 100644
> > --- a/scripts/config_whitelist.txt
> > +++ b/scripts/config_whitelist.txt
> > @@ -1661,7 +1661,6 @@ CONFIG_STV0991
> > CONFIG_STV0991_HZ
> > CONFIG_STV0991_HZ_CLOCK
> > CONFIG_ST_SMI
> > -CONFIG_SUNXI_MAX_FB_SIZE
> > CONFIG_SXNI855T
> > CONFIG_SYSFLAGS_ADDR
> > CONFIG_SYSFS
> > --
> > 2.17.5
> >
> >
>
>
More information about the U-Boot
mailing list