From 5f6e97aee278bb4d13c497da609e07f42871c698 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 25 Jan 2024 17:27:42 +0000 Subject: [PATCH] drm/vc4: Initialise the tv_mode property default from cmdline_mode. With the command line parser now providing the information about the tv mode, use that as the preferred choice for initialising the default of the tv_mode property. Signed-off-by: Dave Stevenson --- drivers/gpu/drm/vc4/vc4_vec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 140c8cd..7d73611 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -370,7 +370,9 @@ static const struct drm_prop_enum_list legacy_tv_mode_names[] = { enum drm_connector_tv_mode vc4_vec_get_default_mode(struct drm_connector *connector) { - if (vc4_vec_tv_norm) { + if (connector->cmdline_mode.tv_mode_specified) { + return connector->cmdline_mode.tv_mode; + } else if (vc4_vec_tv_norm) { int ret; ret = drm_get_tv_mode_from_name(vc4_vec_tv_norm, strlen(vc4_vec_tv_norm)); -- 2.7.4