All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] video: Keep EDID modes and DP lane counts within what is reserved
@ 2026-11-09 17:28 Ana Bobillo
  2026-11-09 17:28 ` [PATCH 01/11] configs: stm32mp23/stm32mp25: Size the frame buffer for the LVDS panel Ana Bobillo
                   ` (11 more replies)
  0 siblings, 12 replies; 26+ messages in thread
From: Ana Bobillo @ 2026-11-09 17:28 UTC (permalink / raw)
  To: u-boot
  Cc: Tom Rini, Anatolij Gustschin, Simon Glass, Kever Yang,
	Quentin Schulz, Andre Przywara, Thierry Reding, Svyatoslav Ryhel,
	Tom Warren, Patrick Delaunay, Patrice Chotard, uboot-stm32,
	Neil Armstrong, Jonas Schwöbel

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2026-11-12  8:47 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 17:28 [PATCH 00/11] video: Keep EDID modes and DP lane counts within what is reserved Ana Bobillo
2026-11-09 17:28 ` [PATCH 01/11] configs: stm32mp23/stm32mp25: Size the frame buffer for the LVDS panel Ana Bobillo
2026-11-12  8:46   ` Patrice CHOTARD
2026-11-09 17:29 ` [PATCH 02/11] video: Check that the mode fits in the reserved frame buffer Ana Bobillo
2026-11-09 17:29 ` [PATCH 03/11] edid: Leave the timing alone when no mode is valid Ana Bobillo
2026-11-09 18:16   ` Tom Rini
2026-11-09 19:28     ` Ana Bobillo
2026-11-09 17:29 ` [PATCH 04/11] video: display: Skip modes which do not fit in the source frame buffer Ana Bobillo
2026-11-10  8:41   ` Svyatoslav Ryhel
2026-11-09 17:29 ` [PATCH 05/11] video: rockchip: vop: Tell the display the frame buffer size Ana Bobillo
2026-11-09 18:30   ` Tom Rini
2026-11-09 19:28     ` Ana Bobillo
2026-11-09 17:29 ` [PATCH 06/11] video: sunxi: de2: " Ana Bobillo
2026-11-09 18:21   ` Tom Rini
2026-11-09 19:28     ` Ana Bobillo
2026-11-09 19:44       ` Tom Rini
2026-11-09 17:29 ` [PATCH 07/11] video: tegra124: " Ana Bobillo
2026-11-09 17:29 ` [PATCH 08/11] sunxi: display: Skip EDID modes larger than the frame buffer Ana Bobillo
2026-11-09 17:29 ` [PATCH 09/11] video: tegra: hdmi: Skip modes larger than the DC " Ana Bobillo
2026-11-10  8:46   ` Svyatoslav Ryhel
2026-11-09 17:30 ` [PATCH 10/11] video: rockchip: edp: Limit the lane count to four Ana Bobillo
2026-11-09 17:30 ` [PATCH 11/11] video: tegra124: dp: " Ana Bobillo
2026-11-10  8:51   ` Svyatoslav Ryhel
2026-11-10 18:01 ` [PATCH 00/11] video: Keep EDID modes and DP lane counts within what is reserved Tom Rini
2026-11-10 18:16   ` Ana Bobillo
2026-11-10 18:24     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.