drm/tests: Add tests for the new Monochrome value of tv_mode

Adds test for the cmdline parser, connector property, and
drm_analog_tv_mode to ensure the behaviour of the new value is
correct.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240620110947.3615207-1-dave.stevenson@raspberrypi.com
This commit is contained in:
Dave Stevenson
2024-06-20 12:09:47 +01:00
committed by Maxime Ripard
parent 0c94f58cef
commit e315384899
3 changed files with 43 additions and 0 deletions

View File

@@ -992,6 +992,17 @@ static const struct drm_cmdline_tv_option_test drm_cmdline_tv_option_tests[] = {
TV_OPT_TEST(PAL_M, "720x480i,tv_mode=PAL-M", drm_mode_analog_ntsc_480i),
TV_OPT_TEST(PAL_N, "720x576i,tv_mode=PAL-N", drm_mode_analog_pal_576i),
TV_OPT_TEST(SECAM, "720x576i,tv_mode=SECAM", drm_mode_analog_pal_576i),
{
.name = "MONO_525",
.cmdline = "720x480i,tv_mode=Mono",
.mode_fn = drm_mode_analog_ntsc_480i,
.tv_mode = DRM_MODE_TV_MODE_MONOCHROME,
}, {
.name = "MONO_625",
.cmdline = "720x576i,tv_mode=Mono",
.mode_fn = drm_mode_analog_pal_576i,
.tv_mode = DRM_MODE_TV_MODE_MONOCHROME,
},
};
static void drm_cmdline_tv_option_desc(const struct drm_cmdline_tv_option_test *t,