video: Keep EDID modes and DP lane counts within what is reserved
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | configs: stm32mp23/stm32mp25: Size the frame buffer for the LVDS panelconfigs/ configs/ | +4 | 1 reply | |
| 2/11 | video: Check that the mode fits in the reserved frame bufferdrivers/ test/ | +41 | 0 replies | |
| 3/11 | edid: Leave the timing alone when no mode is validcommon/ include/ test/ +1 more | +97 | 2 replies | |
| 4/11 | video: display: Skip modes which do not fit in the source frame bufferdrivers/ include/ | +16 | 1 reply | |
| 5/11 | video: rockchip: vop: Tell the display the frame buffer sizedrivers/ | +19 | 2 replies | |
| 6/11 | video: sunxi: de2: Tell the display the frame buffer sizedrivers/ | +3 | 3 replies | |
| 7/11 | video: tegra124: Tell the display the frame buffer sizedrivers/ | +3 | 0 replies | |
| 8/11 | sunxi: display: Skip EDID modes larger than the frame bufferdrivers/ | +3 | 0 replies | |
| 9/11 | video: tegra: hdmi: Skip modes larger than the DC frame bufferdrivers/ drivers/ drivers/ | +11 | 1 reply | |
| 10/11 | video: rockchip: edp: Limit the lane count to fourdrivers/ | +4 | 0 replies | |
| 11/11 | video: tegra124: dp: Limit the lane count to fourdrivers/ | +3 | 1 reply |
Reviews trailers per patch
4 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Svyatoslav Ryhel | Patrice Chotard |
|---|---|---|
| 1/11 | R-b | |
| 2/11 | ||
| 3/11 | ||
| 4/11 | A-b | |
| 5/11 | ||
| 6/11 | ||
| 7/11 | ||
| 8/11 | ||
| 9/11 | R-b | |
| 10/11 | ||
| 11/11 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/11] video: Keep EDID modes and DP lane counts within what is reserved
Much of what U-Boot's video drivers set up comes from the display: the mode from its EDID and, on DisplayPort, the lane count from its DPCD. Several drivers take these as they come, while the memory they use is sized in advance: the frame buffer is reserved for a maximum resolution when the device is bound, and the DP link training code keeps its per-lane state in four-entry arrays. A monitor or panel announcing a larger mode, or more than four lanes, makes U-Boot write past them.
Patch 2 makes video_post_probe() refuse a frame buffer larger than the memory reserved for it, for every video driver. Patch 1 first fixes the two STM32MP2 defconfigs whose panel is larger than the maximum they ask for, which only work thanks to the 2MB alignment of the reservation.
Patches 3 to 9 have the drivers which take the mode from the EDID skip the modes which do not fit, so that a smaller one is used rather than no display: edid_get_timing_validate() no longer hands back a timing it rejected (patch 3), the display uclass learns the size of the source's frame buffer (patch 4), which rk_vop, sunxi DE2 and Tegra124 pass to it (patches 5 to 7), and the sunxi DE1 and Tegra HDMI drivers, which read the EDID themselves, check their own limits (patches 8 and 9).
Patches 10 and 11 limit the DPCD lane count to four in the Rockchip eDP and Tegra124 DP drivers.
Tested on sandbox: the two new tests, dm_test_video_fb_size and edid_test_timing_validate, fail without the fixes (the first one crashes sandbox) and pass with them, and ut dm and ut common otherwise give the same results as on main. Built for chromebook_jerry, nyan-big, transformer_t30, Cubietruck and orangepi_pc with no new warnings.
CI: the series passes all 91 jobs of U-Boot's Azure pipeline, in build 13732 of my CI-only pull request, on main d1d45c926a5.
PR: https://github.com/u-boot/u-boot/pull/1064 Build: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=13732
Ana Bobillo (11):
configs: stm32mp23/stm32mp25: Size the frame buffer for the LVDS panel
video: Check that the mode fits in the reserved frame buffer
edid: Leave the timing alone when no mode is valid
video: display: Skip modes which do not fit in the source frame buffer
video: rockchip: vop: Tell the display the frame buffer size
video: sunxi: de2: Tell the display the frame buffer size
video: tegra124: Tell the display the frame buffer size
sunxi: display: Skip EDID modes larger than the frame buffer
video: tegra: hdmi: Skip modes larger than the DC frame buffer
video: rockchip: edp: Limit the lane count to four
video: tegra124: dp: Limit the lane count to four
common/edid.c | 10 ++- configs/stm32mp23_defconfig | 2 + configs/stm32mp25_defconfig | 2 + drivers/video/display-uclass.c | 10 +++ drivers/video/rockchip/rk_edp.c | 4 ++ drivers/video/rockchip/rk_vop.c | 35 ++++++----- drivers/video/sunxi/sunxi_de2.c | 3 + drivers/video/sunxi/sunxi_display.c | 5 +- drivers/video/tegra/dc.c | 4 +- drivers/video/tegra/dc.h | 4 ++ drivers/video/tegra/hdmi.c | 5 ++ drivers/video/tegra/tegra124/display.c | 3 + drivers/video/tegra/tegra124/dp.c | 3 + drivers/video/video-uclass.c | 12 ++++ include/display.h | 6 ++ include/edid.h | 3 +- test/common/Makefile | 1 + test/common/edid.c | 87 ++++++++++++++++++++++++++ test/dm/video.c | 29 +++++++++ 19 files changed, 204 insertions(+), 24 deletions(-) create mode 100644 test/common/edid.c
base-commit: d1d45c926a571fb6c1e6d7105c280833646915ea