drm/probe-helper: Provide a TV get_modes helper
authorNoralf Trønnes <noralf@tronnes.org>
Thu, 17 Nov 2022 09:28:55 +0000 (10:28 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 24 Nov 2022 11:42:40 +0000 (12:42 +0100)
commit1e4a91db109f623d0e3ef7d8bfae3c88b4d2fa87
treec1587ba936356dc5c76bc4f62016825a13d592c0
parent0740ac381b2c674eec72e63c78253b3ad07febd2
drm/probe-helper: Provide a TV get_modes helper

Most of the TV connectors will need a similar get_modes implementation
that will, depending on the drivers' capabilities, register the 480i and
576i modes.

That implementation will also need to set the preferred flag and order
the modes based on the driver and users preferrence.

This is especially important to guarantee that a userspace stack such as
Xorg can start and pick up the preferred mode while maintaining a
working output.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Mateusz Kwiatkowski <kfyatek+publicgit@gmail.com>
Acked-in-principle-or-something-like-that-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-12-256dad125326@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/drm_probe_helper.c
drivers/gpu/drm/tests/Makefile
drivers/gpu/drm/tests/drm_probe_helper_test.c [new file with mode: 0644]
include/drm/drm_probe_helper.h