video: sunxi_display: Convert to DM_VIDEO
PATCH v4 1/1 video: sunxi_display: Convert to DM_VIDEO
From: Jagan Teki <[email protected]>
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)
---
Hi,
some very small fixes, to address Jernej's and Simon's comments. As we figured, there is more improvement potential, but this should be a good first step.
Cheers,
Andre
Changelog v3 .. v4:
- remove no longer needed definitions in sunxi-common.h
- rename struct sunxi_display to struct sunxi_display_priv
- use VNBYTES to calculate bit depth
- use ALIGN instead of open coding it
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 | 268 ++++++++++++++++------------ include/configs/sunxi-common.h | 23 +-- scripts/config_whitelist.txt | 1 - 4 files changed, 159 insertions(+), 142 deletions(-)
arch/arm/mach-sunxi/Kconfig +5 -4
@@ -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"
drivers/video/sunxi/sunxi_display.c +153 -115
577 lines not on this page · raw message
include/configs/sunxi-common.h +1 -22
@@ -223,23 +223,6 @@ extern int soft_i2c_gpio_scl;#define CONFIG_VIDEO_LCD_I2C_BUS -1/* NA, but necessary to compile */ #endif -#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
@@ -401,11 +384,7 @@ extern int soft_i2c_gpio_scl; "stdin=serial\0"#endif -#ifdef CONFIG_VIDEO -#define CONSOLE_STDOUT_SETTINGS \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" -#elif CONFIG_DM_VIDEO +#ifdef CONFIG_DM_VIDEO #define CONSOLE_STDOUT_SETTINGS \ "stdout=serial,vidconsole\0" \ "stderr=serial,vidconsole\0"
scripts/config_whitelist.txt +0 -1
@@ -1636,7 +1636,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
Signature · 1 line
2.17.5