b99376d1c96be8f7282ac13bd54299d4d377371c
[openwrt/staging/linusw.git] /
1 From 1a08ae664765eed13ea08d99e045e30cc0687e0b Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 25 Jan 2024 17:27:42 +0000
4 Subject: [PATCH 0857/1085] drm/vc4: Initialise the tv_mode property default
5 from cmdline_mode.
6
7 With the command line parser now providing the information about
8 the tv mode, use that as the preferred choice for initialising the
9 default of the tv_mode property.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 drivers/gpu/drm/vc4/vc4_vec.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16 --- a/drivers/gpu/drm/vc4/vc4_vec.c
17 +++ b/drivers/gpu/drm/vc4/vc4_vec.c
18 @@ -370,7 +370,9 @@ static const struct drm_prop_enum_list l
19 enum drm_connector_tv_mode
20 vc4_vec_get_default_mode(struct drm_connector *connector)
21 {
22 - if (vc4_vec_tv_norm) {
23 + if (connector->cmdline_mode.tv_mode_specified) {
24 + return connector->cmdline_mode.tv_mode;
25 + } else if (vc4_vec_tv_norm) {
26 int ret;
27
28 ret = drm_get_tv_mode_from_name(vc4_vec_tv_norm, strlen(vc4_vec_tv_norm));