From patchwork Wed Jun 19 15:39:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13704107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7099FC27C53 for ; Wed, 19 Jun 2024 15:39:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7361D10ED06; Wed, 19 Jun 2024 15:39:34 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Om0aQqSM"; dkim-atps=neutral Received: from mail-wm1-f99.google.com (mail-wm1-f99.google.com [209.85.128.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E3C210ED08 for ; Wed, 19 Jun 2024 15:39:30 +0000 (UTC) Received: by mail-wm1-f99.google.com with SMTP id 5b1f17b1804b1-421757d217aso69146185e9.3 for ; Wed, 19 Jun 2024 08:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1718811568; x=1719416368; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QkByz0jdfgl7WplPLctMZcoTBeRcA0ZVaM9uKpl5RsY=; b=Om0aQqSMd1WrvvZwWOKDwfda+V8e6IDHrILP4+ononJs46dfm6ndJP9Xq+esOXGz9u c7P+aiCVVp9eyg2EJxvXOYb1cPessHmyAr5ZAie8/vUJks/vechvvqat9Ph9pNm2g2bG LhUG9LRNrEm9VOmQwxxcOQEXty+06bsMSrBbOLatr/h9KDTJb+mROO+79M0dGFROjFRY G0QWd8k+w8YcJEOUNtE5s7QF5V7rJN2xRt/hlHA1+jFBRJXN7N1KoWXBx/ojiY3XFcrU /1JifdoxVSaieTwR/eUAd4TXzxsCYrQjmvt2B76Dc/exFuJBQ3xBLP+7rgHNgLu8TUGZ ZfQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811568; x=1719416368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QkByz0jdfgl7WplPLctMZcoTBeRcA0ZVaM9uKpl5RsY=; b=OUqCX+OutlPuV1fkJ4bJYM+plkHlLxJEPC6VP+XPBsELj4JjGkqPnvnEdNwy9vMkWy DstVZRvXSTLdM1LAF4b++jPUojlXg327TWJ92I+G2xQQNm6PvlFbJSCPLVJEq8Po5N0s L+y0DB9AUld969QCIbAPIHwBc1Ots+uEu4ZhF2iTtjjyk17KMxV28TPsFosJxVQVCwF1 Qwqg4QkWOLvBCy3UYdNaBUlGaCiseOV62XaQNIDdxdpVPP4eQab8WhlNGPlaNN94Ofoa 0BVrFt6VAFywqpwuOwVb+TZZYtSJ7jBYQHpaLvTeHlBaKRwQmW79cSGZhxFdKkZeOnU3 aDfQ== X-Forwarded-Encrypted: i=1; AJvYcCXiz5EvqkfUisLMQcKUeXYEmcmnWZtFTuP4gZGL+dWNEadFzsECD2XHe0+Z61WDdPoMZXVKPzNJXdm4hejM51zOmi+y99DXwjFckkLgdCbj X-Gm-Message-State: AOJu0Yy0H8UmnzCmNMjF4+QNflMrBiaDu8fnS5/YReOYil+jblHYTC6h uAOVP41CiMYBSQK1xqOGwZJ7TFEkDUjqqXvtuBj8oe//oSdwrmcMcOcTMyQ+z1oI+QtDdii7nPB PAu+rp+E7pZrqFKqYjry4d4ZKpRmEPUDI X-Google-Smtp-Source: AGHT+IG79eXOE6uElwN+awZxclHuyl2zdittbri9V3NiSMUw13yo3kC0l/BBmel0o+bLsyvRdB7IqoxzOU3/ X-Received: by 2002:a05:600c:3b12:b0:422:1705:7549 with SMTP id 5b1f17b1804b1-42475296a6emr23017825e9.25.1718811568265; Wed, 19 Jun 2024 08:39:28 -0700 (PDT) Received: from raspberrypi.com ([188.39.149.98]) by smtp-relay.gmail.com with ESMTPS id 5b1f17b1804b1-422874e79ddsm8451525e9.43.2024.06.19.08.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:39:28 -0700 (PDT) X-Relaying-Domain: raspberrypi.com From: Dave Stevenson To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: Dave Stevenson Subject: [PATCH v2 1/3] drm/tests: Add tests for the new Monochrome value of tv_mode Date: Wed, 19 Jun 2024 16:39:11 +0100 Message-Id: <20240619153913.2804051-2-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619153913.2804051-1-dave.stevenson@raspberrypi.com> References: <20240619153913.2804051-1-dave.stevenson@raspberrypi.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- .../gpu/drm/tests/drm_cmdline_parser_test.c | 20 ++++++------ drivers/gpu/drm/tests/drm_connector_test.c | 1 + drivers/gpu/drm/tests/drm_modes_test.c | 31 +++++++++++++++++++ 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_cmdline_parser_test.c b/drivers/gpu/drm/tests/drm_cmdline_parser_test.c index 6f1457bd21d9..95fb379c69eb 100644 --- a/drivers/gpu/drm/tests/drm_cmdline_parser_test.c +++ b/drivers/gpu/drm/tests/drm_cmdline_parser_test.c @@ -976,22 +976,24 @@ static void drm_test_cmdline_tv_options(struct kunit *test) KUNIT_EXPECT_EQ(test, mode.force, DRM_FORCE_UNSPECIFIED); } -#define TV_OPT_TEST(_opt, _cmdline, _mode_fn) \ +#define TV_OPT_TEST(_opt, _cmdline, _mode_fn, _tvmode) \ { \ .name = #_opt, \ .cmdline = _cmdline, \ .mode_fn = _mode_fn, \ - .tv_mode = DRM_MODE_TV_MODE_ ## _opt, \ + .tv_mode = DRM_MODE_TV_MODE_ ## _tvmode, \ } static const struct drm_cmdline_tv_option_test drm_cmdline_tv_option_tests[] = { - TV_OPT_TEST(NTSC, "720x480i,tv_mode=NTSC", drm_mode_analog_ntsc_480i), - TV_OPT_TEST(NTSC_443, "720x480i,tv_mode=NTSC-443", drm_mode_analog_ntsc_480i), - TV_OPT_TEST(NTSC_J, "720x480i,tv_mode=NTSC-J", drm_mode_analog_ntsc_480i), - TV_OPT_TEST(PAL, "720x576i,tv_mode=PAL", drm_mode_analog_pal_576i), - 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), + TV_OPT_TEST(NTSC, "720x480i,tv_mode=NTSC", drm_mode_analog_ntsc_480i, NTSC), + TV_OPT_TEST(NTSC_443, "720x480i,tv_mode=NTSC-443", drm_mode_analog_ntsc_480i, NTSC_443), + TV_OPT_TEST(NTSC_J, "720x480i,tv_mode=NTSC-J", drm_mode_analog_ntsc_480i, NTSC_J), + TV_OPT_TEST(PAL, "720x576i,tv_mode=PAL", drm_mode_analog_pal_576i, PAL), + TV_OPT_TEST(PAL_M, "720x480i,tv_mode=PAL-M", drm_mode_analog_ntsc_480i, PAL_M), + TV_OPT_TEST(PAL_N, "720x576i,tv_mode=PAL-N", drm_mode_analog_pal_576i, PAL_N), + TV_OPT_TEST(SECAM, "720x576i,tv_mode=SECAM", drm_mode_analog_pal_576i, SECAM), + TV_OPT_TEST(MONO_525, "720x480i,tv_mode=Mono", drm_mode_analog_ntsc_480i, MONOCHROME), + TV_OPT_TEST(MONO_625, "720x576i,tv_mode=Mono", drm_mode_analog_pal_576i, MONOCHROME), }; static void drm_cmdline_tv_option_desc(const struct drm_cmdline_tv_option_test *t, diff --git a/drivers/gpu/drm/tests/drm_connector_test.c b/drivers/gpu/drm/tests/drm_connector_test.c index 2812b123a79c..15e36a8db685 100644 --- a/drivers/gpu/drm/tests/drm_connector_test.c +++ b/drivers/gpu/drm/tests/drm_connector_test.c @@ -777,6 +777,7 @@ struct drm_get_tv_mode_from_name_test drm_get_tv_mode_from_name_valid_tests[] = TV_MODE_NAME("PAL-M", DRM_MODE_TV_MODE_PAL_M), TV_MODE_NAME("PAL-N", DRM_MODE_TV_MODE_PAL_N), TV_MODE_NAME("SECAM", DRM_MODE_TV_MODE_SECAM), + TV_MODE_NAME("Mono", DRM_MODE_TV_MODE_MONOCHROME), }; static void diff --git a/drivers/gpu/drm/tests/drm_modes_test.c b/drivers/gpu/drm/tests/drm_modes_test.c index 7029f7a2eb4d..066a08a38ca3 100644 --- a/drivers/gpu/drm/tests/drm_modes_test.c +++ b/drivers/gpu/drm/tests/drm_modes_test.c @@ -130,11 +130,42 @@ static void drm_test_modes_analog_tv_pal_576i_inlined(struct kunit *test) KUNIT_EXPECT_TRUE(test, drm_mode_equal(expected, mode)); } +static void drm_test_modes_analog_tv_mono_576i(struct kunit *test) +{ + struct drm_test_modes_priv *priv = test->priv; + struct drm_display_mode *mode; + + mode = drm_analog_tv_mode(priv->drm, + DRM_MODE_TV_MODE_MONOCHROME, + 13500 * HZ_PER_KHZ, 720, 576, + true); + KUNIT_ASSERT_NOT_NULL(test, mode); + + KUNIT_EXPECT_EQ(test, drm_mode_vrefresh(mode), 50); + KUNIT_EXPECT_EQ(test, mode->hdisplay, 720); + + /* BT.601 defines hsync_start at 732 for 576i */ + KUNIT_EXPECT_EQ(test, mode->hsync_start, 732); + + /* + * The PAL standard expects a line to take 64us. With a pixel + * clock of 13.5 MHz, a pixel takes around 74ns, so we need to + * have 64000ns / 74ns = 864. + * + * This is also mandated by BT.601. + */ + KUNIT_EXPECT_EQ(test, mode->htotal, 864); + + KUNIT_EXPECT_EQ(test, mode->vdisplay, 576); + KUNIT_EXPECT_EQ(test, mode->vtotal, 625); +} + static struct kunit_case drm_modes_analog_tv_tests[] = { KUNIT_CASE(drm_test_modes_analog_tv_ntsc_480i), KUNIT_CASE(drm_test_modes_analog_tv_ntsc_480i_inlined), KUNIT_CASE(drm_test_modes_analog_tv_pal_576i), KUNIT_CASE(drm_test_modes_analog_tv_pal_576i_inlined), + KUNIT_CASE(drm_test_modes_analog_tv_mono_576i), { } }; From patchwork Wed Jun 19 15:39:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13704108 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DCDBC27C53 for ; Wed, 19 Jun 2024 15:39:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6CC3110ED08; Wed, 19 Jun 2024 15:39:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="B/2jcS9n"; dkim-atps=neutral Received: from mail-ej1-f98.google.com (mail-ej1-f98.google.com [209.85.218.98]) by gabe.freedesktop.org (Postfix) with ESMTPS id B86B710ED08 for ; Wed, 19 Jun 2024 15:39:30 +0000 (UTC) Received: by mail-ej1-f98.google.com with SMTP id a640c23a62f3a-a63359aaaa6so1051318366b.2 for ; Wed, 19 Jun 2024 08:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1718811569; x=1719416369; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wq3XbK5u/8uGB1NH5CGoSwu3O5ze71JMH2q0vqPTrIw=; b=B/2jcS9nFbdicY8JsGhy3K02LsRqdhlDzlWjxJEbK9v6WZWn9EkNZMTzQ6O+7rdILa fcfmXHvju5Wwt6gh/u07BUO/OCQo2UIKA2QwpnYkkMsZbloXVLdnA8R13H2qlB/Qq/V7 dQvDk/QjBhabV229UeQbP+TIQT/fMvFtmfosyvCFhDbIL7B/LCnQGB6xHzwMzeieunyw Z6uHPuIZES9RnrzQS6i3bsd0SEv5zfPfqw28YBY4YXDg1R3e//nkl+S5O1oDJlfRZwne pe9ph2qvCkrLJD9HotEjLOzb0TKdfViLlr7j+p0wp+9tJe6twhJIfW3bhtGD0THktX9g m+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811569; x=1719416369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wq3XbK5u/8uGB1NH5CGoSwu3O5ze71JMH2q0vqPTrIw=; b=F9rlnKW5XFm4X8QA65cXZVdzJh544Eonz5+fHeFusmL1BTgPLvwzuhtmQcJq/l7+g1 SFsT9KYOTVQHeYdme25j+BRjXxutNUWRHyUQan6b3wExbVPSHCV7SRTOVYtJItmYFOJL 2NxXP/pB1BRzqaAcW1p6dq6lFxqnNhbdFVGz+vgfuDquymvUMGR+Zj5Jq3kIyUaN2jgF nVepad20fFZmtFOeSl/7vMQo0gUxTPhuduuAwvJvqdeQfU6tVs2a6APBfIBk8b7cHkkj AyvB/oq1z6HS45l8XgpT5v7o3unIdbz6H5PWj2PS8cDFS1/cI8JRKyNGQu2Ta/Kt0ILL 3LrA== X-Forwarded-Encrypted: i=1; AJvYcCUtwzi2GS5inQ8PrltbO6HCIRhtfVrGvO6FdG6piXkb2PZ2uiGTCZYx8e2PLoTggrSAt2J6owON6LJoyua1RNCiUYtWuSweWQBc+f5BqhiR X-Gm-Message-State: AOJu0YwaEkz/eX9YB3q/JWEh0y3+w4P3DrDc4+5p2QDF9HifTg0icf7a ILcsznTPBFC8Cuu651dPn6j1xWIql6dEAL3JccjQfw4EjgXPmjXNb1P9nygNVsE6UpLAy51xbsB j0Oah9/ysXBQQ8qx6v6o5uDXVDtyPOJyo X-Google-Smtp-Source: AGHT+IHYGUFsZyEinxvixOf5q69KaF6hLyJ8jXosA6IMMYJsUjdJBT7wSSvnxBuCiyXaVArkGDFGJ1+UrmLb X-Received: by 2002:a17:907:c5c7:b0:a6f:b5ff:a6eb with SMTP id a640c23a62f3a-a6fb5ffaafemr113625866b.24.1718811568793; Wed, 19 Jun 2024 08:39:28 -0700 (PDT) Received: from raspberrypi.com ([188.39.149.98]) by smtp-relay.gmail.com with ESMTPS id a640c23a62f3a-a6f56d8daa7sm22580566b.77.2024.06.19.08.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:39:28 -0700 (PDT) X-Relaying-Domain: raspberrypi.com From: Dave Stevenson To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: Dave Stevenson Subject: [PATCH v2 2/3] drm/vc4: Add monochrome mode to the VEC. Date: Wed, 19 Jun 2024 16:39:12 +0100 Message-Id: <20240619153913.2804051-3-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619153913.2804051-1-dave.stevenson@raspberrypi.com> References: <20240619153913.2804051-1-dave.stevenson@raspberrypi.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The VEC supports not producing colour bursts for monochrome output. It also has an option for disabling the chroma input to remove chroma from the signal. Now that there is a DRM_MODE_TV_MODE_MONOCHROME defined, plumb this in. Signed-off-by: Dave Stevenson --- drivers/gpu/drm/vc4/vc4_vec.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 268f18b10ee0..5fdde6f28d86 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -234,6 +234,7 @@ enum vc4_vec_tv_mode_id { VC4_VEC_TV_MODE_PAL_60, VC4_VEC_TV_MODE_PAL_N, VC4_VEC_TV_MODE_SECAM, + VC4_VEC_TV_MODE_MONOCHROME, }; struct vc4_vec_tv_mode { @@ -324,6 +325,22 @@ static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] = { .config1 = VEC_CONFIG1_C_CVBS_CVBS, .custom_freq = 0x29c71c72, }, + { + /* 50Hz mono */ + .mode = DRM_MODE_TV_MODE_MONOCHROME, + .expected_htotal = 864, + .config0 = VEC_CONFIG0_PAL_BDGHI_STD | VEC_CONFIG0_BURDIS | + VEC_CONFIG0_CHRDIS, + .config1 = VEC_CONFIG1_C_CVBS_CVBS, + }, + { + /* 60Hz mono */ + .mode = DRM_MODE_TV_MODE_MONOCHROME, + .expected_htotal = 858, + .config0 = VEC_CONFIG0_PAL_M_STD | VEC_CONFIG0_BURDIS | + VEC_CONFIG0_CHRDIS, + .config1 = VEC_CONFIG1_C_CVBS_CVBS, + }, }; static inline const struct vc4_vec_tv_mode * @@ -351,6 +368,7 @@ static const struct drm_prop_enum_list legacy_tv_mode_names[] = { { VC4_VEC_TV_MODE_PAL_M, "PAL-M", }, { VC4_VEC_TV_MODE_PAL_N, "PAL-N", }, { VC4_VEC_TV_MODE_SECAM, "SECAM", }, + { VC4_VEC_TV_MODE_MONOCHROME, "Mono", }, }; static enum drm_connector_status @@ -406,6 +424,10 @@ vc4_vec_connector_set_property(struct drm_connector *connector, state->tv.mode = DRM_MODE_TV_MODE_SECAM; break; + case VC4_VEC_TV_MODE_MONOCHROME: + state->tv.mode = DRM_MODE_TV_MODE_MONOCHROME; + break; + default: return -EINVAL; } @@ -453,6 +475,10 @@ vc4_vec_connector_get_property(struct drm_connector *connector, *val = VC4_VEC_TV_MODE_SECAM; break; + case DRM_MODE_TV_MODE_MONOCHROME: + *val = VC4_VEC_TV_MODE_MONOCHROME; + break; + default: return -EINVAL; } @@ -754,7 +780,8 @@ static int vc4_vec_bind(struct device *dev, struct device *master, void *data) BIT(DRM_MODE_TV_MODE_PAL) | BIT(DRM_MODE_TV_MODE_PAL_M) | BIT(DRM_MODE_TV_MODE_PAL_N) | - BIT(DRM_MODE_TV_MODE_SECAM)); + BIT(DRM_MODE_TV_MODE_SECAM) | + BIT(DRM_MODE_TV_MODE_MONOCHROME)); if (ret) return ret; From patchwork Wed Jun 19 15:39:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13704109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA115C2BA15 for ; Wed, 19 Jun 2024 15:39:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBAFD10ED0A; Wed, 19 Jun 2024 15:39:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="nSF0YXyt"; dkim-atps=neutral Received: from mail-wr1-f99.google.com (mail-wr1-f99.google.com [209.85.221.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1DA4C10ED06 for ; Wed, 19 Jun 2024 15:39:30 +0000 (UTC) Received: by mail-wr1-f99.google.com with SMTP id ffacd0b85a97d-3629c517da9so1755736f8f.2 for ; Wed, 19 Jun 2024 08:39:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1718811569; x=1719416369; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DWkoJki2cXcy7XDkP36Wf4I7iYxzIC9B2wsE/hfXDzE=; b=nSF0YXytpv3NsskpbE7zkWOXZmduAQPkw4pSw0KGarBSGalNqMlqwsQs4AWsWURbaa Jz5q5YQZ88LAiK05oY8QSZnTNmoT7X/byoqAruZfRyuj9L0Mx5gEvif870ikTpOB2oQD +mokQlAvwCUMhE+Hq673tWkOaQtYDY+wnzxPr42hj+Z5QGa7eyqs+V6L0x0iC7PDc7+l FiLgReSFnNySkQL28WRGZDyROj+gJzaPNZ+PhXndAC64A1wres3mSuGdHNFaZgNTmDwE bLDnb4SohDF0BociYluW64pcZT3mrntcqnCVlutkkElBWzJ4cqqS/YatlXH+yyr75Rcs 07jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718811569; x=1719416369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DWkoJki2cXcy7XDkP36Wf4I7iYxzIC9B2wsE/hfXDzE=; b=RbMUoiGsXnoaQfp0Z9qnP12/G0VQneOqySiatUOVDoCaM6gfSeZXY1JLgFHYXuXKi7 NnDTCuOgSSz4gRFkjf+pd1M7lQxHckwHUPfyzRweAMPkRs5oNJFEWcSxuAxNNnI3PcY1 7MZXIvXCQdXvFysYgdC/VhzIBlkFWAu1IZv9R7QPHlANiygOaG64DLEAH8/WFZn/ky0n ecFkrrwtUwkjr/iAZnVbLfehlzNAgbLD1pwBarcQTsb0JbZfUIeA5TlqDS6S4sbFjLe4 MePpyuuZCnwvQeAwsFOpkM+SZ5aJdeg9bdFT0iTJon2UtdqtJltnquklFJqSicAOSIer LZ/g== X-Forwarded-Encrypted: i=1; AJvYcCV+7yQk2yfWoIDAfux1RV8qNF32lLI58vDNsk8Hhi+nlKY1/8DDvRar00idS9H4w03HzbPOMeMJGUJcQvrPBtEXER+7ORYmouq/8dTHMKFW X-Gm-Message-State: AOJu0Yx02re12qwekh3FvBwawRU9ZLjEMBPHishNs3G45hr6L8A934+j AKcGfL3XDzuZnJXAtRRpNogtIbsAAOXOxOLnkTwsr+yEeQDjjWiagfEnZ3yvyOBUutLJbhRMkIe wfAGZypXwJqEET78L6y8eYvuLMQ0stayp X-Google-Smtp-Source: AGHT+IF1tL0aR3u5EdxSXifgZxfguC8wd5gNnahHZoDjEzHGb5C46+Y/WraEjnxJoRORk07xHTcddbhMcVkQ X-Received: by 2002:adf:f144:0:b0:360:8911:a7b2 with SMTP id ffacd0b85a97d-363192d063cmr2512396f8f.55.1718811569289; Wed, 19 Jun 2024 08:39:29 -0700 (PDT) Received: from raspberrypi.com ([188.39.149.98]) by smtp-relay.gmail.com with ESMTPS id ffacd0b85a97d-36075123771sm649155f8f.80.2024.06.19.08.39.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jun 2024 08:39:29 -0700 (PDT) X-Relaying-Domain: raspberrypi.com From: Dave Stevenson To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Cc: Dave Stevenson Subject: [PATCH v2 3/3] drm/vc4: vec: Add the margin properties to the connector Date: Wed, 19 Jun 2024 16:39:13 +0100 Message-Id: <20240619153913.2804051-4-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240619153913.2804051-1-dave.stevenson@raspberrypi.com> References: <20240619153913.2804051-1-dave.stevenson@raspberrypi.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" All the handling for the properties was present, but they were never attached to the connector to allow userspace to change them. Add them to the connector. Signed-off-by: Dave Stevenson Reviewed-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_vec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 5fdde6f28d86..070813b8aff8 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -529,6 +529,8 @@ static int vc4_vec_connector_init(struct drm_device *dev, struct vc4_vec *vec) drm_object_attach_property(&connector->base, prop, VC4_VEC_TV_MODE_NTSC); + drm_connector_attach_tv_margin_properties(connector); + drm_connector_attach_encoder(connector, &vec->encoder.base); return 0;