From patchwork Fri Feb 16 18:48:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13560480 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 4CB66C48BC4 for ; Fri, 16 Feb 2024 18:49:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C52B10E082; Fri, 16 Feb 2024 18:49:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="TJRY9CNm"; dkim-atps=neutral Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 627EE10E082 for ; Fri, 16 Feb 2024 18:49:30 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-51197ca63f5so1485763e87.1 for ; Fri, 16 Feb 2024 10:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1708109368; x=1708714168; 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=8UiwuDn6wK4mPDjZ7FcH6ttJwRecMiCcgmgCfq3GA8o=; b=TJRY9CNmMiW5XqkWomAOZd0yJEVaQF5MZCC8xt76MkNrgxgIXZe2BKFh/SS/HUlv2a upnzmXAkrt5QwMLZSCP4Fa+Sl8ZTAmERj42aSV2uyaWvkkA9gKJ57xEnxhjNjfMh0xUV 6d5EOXOjupoDMwLJ2OB4b0MSj3RnHbzprPOTadQPSsd5lfIvOUZnRkx2DxnDitDwPmJW 6k7ZaRukkpu9ZDGYjbJGnLJyUlWWSMN5Z+y9Jn39e+2ukWeUBCY/tO4+VBdN5qCWESvB 2Z9D1uJF2vmdLVOx/8ZWJYsb6Wx4cDc2YeFycypUt4kKKg1KF9omfOvXKQJuH+RwR+CO 4DUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708109368; x=1708714168; 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=8UiwuDn6wK4mPDjZ7FcH6ttJwRecMiCcgmgCfq3GA8o=; b=ve2rUWFP28RpucRn1jHUPkzuvDwa9uYi5lxH5aUWozHC7EeCZDqXsVJSSShXr038pJ EZoj7vie2vw3MSiBXtDgspbSvC4PkCKXbfrYcv2TLGhBZ+i4aydFb8brdp3C67akGqbJ 9oYvK5ms6SpEjSOwHaA82rhySqHFe6mD20brDe4PJEyiNzEk+6jniX9qam7PBfcwCw47 IOsfLlBY4mktg9j6wFMhR6TW3R6lNZfLpPtRp3Y/oQPRIkaCrSpXvXArMMq/1KcbzAht AGdmdjXxCvSUtXXObSsRCEw1MRCKdE89tUof7gvp9Rq6di67mZaGWb31QsVOrpq3HeTY zzJQ== X-Gm-Message-State: AOJu0Yx5P3tc9s6k6lKshA0hDHLtKt9P7tmtPYmLU0zc89Aj/sCvORhr QCEUXjHBLZvcNqQRwzfUS31An5DitoNtWVQ3JQhHslChgWHIt05uBPm2J6MSbjlC3uV5PraBzED v X-Google-Smtp-Source: AGHT+IF/Ndr2i8UoMAV09KY7KS1b+ZBv9aFNhatIIAclddTyZvfiY4cbLKw6qRwEtT+c44PGLUm+CA== X-Received: by 2002:a19:650e:0:b0:511:79ee:5f98 with SMTP id z14-20020a19650e000000b0051179ee5f98mr4190742lfb.18.1708109367977; Fri, 16 Feb 2024 10:49:27 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([188.39.149.98]) by smtp.googlemail.com with ESMTPSA id tj1-20020a170907c24100b00a3d1b3c5f1esm235108ejc.77.2024.02.16.10.49.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:49:27 -0800 (PST) From: Dave Stevenson To: dri-devel@lists.freedesktop.org, Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann Cc: Nick Hollinghurst , Dave Stevenson Subject: [PATCH 1/3] drm: Add DRM_MODE_TV_MODE_MONOCHROME Date: Fri, 16 Feb 2024 18:48:55 +0000 Message-Id: <20240216184857.245372-2-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216184857.245372-1-dave.stevenson@raspberrypi.com> References: <20240216184857.245372-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" From: Nick Hollinghurst Add this as a value for enum_drm_connector_tv_mode, represented by the string "Mono", to generate video with no colour encoding or bursts. Define it to have no pedestal (since only NTSC-M calls for a pedestal). Change default mode creation to acommodate the new tv_mode value which comprises both 525-line and 625-line formats. Signed-off-by: Nick Hollinghurst Signed-off-by: Dave Stevenson --- drivers/gpu/drm/drm_connector.c | 7 +++++++ drivers/gpu/drm/drm_modes.c | 5 ++++- drivers/gpu/drm/drm_probe_helper.c | 5 +++-- include/drm/drm_connector.h | 7 +++++++ 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index b0516505f7ae..fe05d27f3404 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1005,6 +1005,7 @@ static const struct drm_prop_enum_list drm_tv_mode_enum_list[] = { { DRM_MODE_TV_MODE_PAL_M, "PAL-M" }, { DRM_MODE_TV_MODE_PAL_N, "PAL-N" }, { DRM_MODE_TV_MODE_SECAM, "SECAM" }, + { DRM_MODE_TV_MODE_MONOCHROME, "Mono" }, }; DRM_ENUM_NAME_FN(drm_get_tv_mode_name, drm_tv_mode_enum_list) @@ -1697,6 +1698,12 @@ EXPORT_SYMBOL(drm_connector_attach_dp_subconnector_property); * TV Mode is CCIR System B (aka 625-lines) together with * the SECAM Color Encoding. * + * Mono: + * + * Use timings appropriate to the DRM mode, including + * equalizing pulses for a 525-line or 625-line mode, + * with no pedestal or color encoding. + * * Drivers can set up this property by calling * drm_mode_create_tv_properties(). */ diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index c4f88c3a93b7..d274e7b00b79 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -530,7 +530,8 @@ static int fill_analog_mode(struct drm_device *dev, * @interlace: whether to compute an interlaced mode * * This function creates a struct drm_display_mode instance suited for - * an analog TV output, for one of the usual analog TV mode. + * an analog TV output, for one of the usual analog TV modes. Where + * this is DRM_MODE_TV_MODE_MONOCHROME, a 625-line mode will be created. * * Note that @hdisplay is larger than the usual constraints for the PAL * and NTSC timings, and we'll choose to ignore most timings constraints @@ -568,6 +569,8 @@ struct drm_display_mode *drm_analog_tv_mode(struct drm_device *dev, case DRM_MODE_TV_MODE_PAL_N: fallthrough; case DRM_MODE_TV_MODE_SECAM: + fallthrough; + case DRM_MODE_TV_MODE_MONOCHROME: analog = DRM_MODE_ANALOG_PAL; break; diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index d1e1ade66f81..9254dc2af873 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -1211,8 +1211,9 @@ int drm_connector_helper_tv_get_modes(struct drm_connector *connector) for (i = 0; i < tv_mode_property->num_values; i++) supported_tv_modes |= BIT(tv_mode_property->values[i]); - if ((supported_tv_modes & ntsc_modes) && - (supported_tv_modes & pal_modes)) { + if (((supported_tv_modes & ntsc_modes) && + (supported_tv_modes & pal_modes)) || + (supported_tv_modes & BIT(DRM_MODE_TV_MODE_MONOCHROME))) { uint64_t default_mode; if (drm_object_property_get_default_value(&connector->base, diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index fe88d7fc6b8f..90fd0ea0ca09 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -200,6 +200,13 @@ enum drm_connector_tv_mode { */ DRM_MODE_TV_MODE_SECAM, + /** + * @DRM_MODE_TV_MODE_MONOCHROME: Use timings appropriate to + * the DRM mode, including equalizing pulses for a 525-line + * or 625-line mode, with no pedestal or color encoding. + */ + DRM_MODE_TV_MODE_MONOCHROME, + /** * @DRM_MODE_TV_MODE_MAX: Number of analog TV output modes. * From patchwork Fri Feb 16 18:48:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13560481 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 0075DC48BC4 for ; Fri, 16 Feb 2024 18:49:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 72F1310E224; Fri, 16 Feb 2024 18:49:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="q51jhPeX"; dkim-atps=neutral Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FC5510E224 for ; Fri, 16 Feb 2024 18:49:38 +0000 (UTC) Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-563ed3d221aso1433983a12.0 for ; Fri, 16 Feb 2024 10:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1708109376; x=1708714176; 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=ROS/ncwbFNhmuPIcgtXb8XELHDQFjlWT/ShIrY6H6sM=; b=q51jhPeXDMF1VOY12JN+unWEp6qGBJofji8tguaRGXteahevVYJK6Lh00mieQPYhQ4 PlYweNakSIkD30kzAO9RKRoU3tNRjO5T3OHD7G87H9QGifNVc2W5qeIuIpuRignuVTmV i7XXyqy9gj+FluSEVk4gMY86kxxGId56KBawPXTn8iepr6W7iSX7/hfAkgEfwX9rzXiw fP/1w8apGORD7IEuRUxJBRgLY8AhdUGdT3ARN9evmT33y+2V68FFip1y8KGAPdT6HZaa +Gj4pWx7AbR+J4VZnue7lKwaTMS2Z+7fUXnV7dNu0a469bjA8EdIB0y3tUkgkL4np+yS iHSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708109376; x=1708714176; 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=ROS/ncwbFNhmuPIcgtXb8XELHDQFjlWT/ShIrY6H6sM=; b=cii+forYxqlbCZQB8LM5dvmtdRnTAhl29TCb0jV55y8m4ssg0tI05jHYJfe/vwlgIN vl/v3tg7EK6I7ZhAN1IuZwQnItSAWC86jm0/X9bvMX/nqYYUzcyS3POwW8hcu+1oLOL2 K2ebOV+47AzXmj/XbdqtpyISmqcHsSxiQ3D6PVQNl3sdPkVAPThZDbQVSKjs5GxTpJlf u0XsZZ2dTCbcwUmRd+lqM20x0UGKvdQjdqtElCS1H7jcmaaESF6n9XQ3lblfrMwkmhEO iJ9xd+QqS9lX2W5hvlDxVOaf+Gf+U/mfWhmhAFDZ2CC4yZsg3FVQg3VmiSnVsWVW69S7 EpnA== X-Gm-Message-State: AOJu0YwrLV2vMeVbwYTdAbL59eiOtSBNM92Dof9OHHgedDqByzNgF1hf y4T0l19ehL/rxtoTb65esvPMnesPzjubGxXkXmFEeQwOfBFCg+ZOjVeAdP7qgD0lSIyfNg6dPj3 7 X-Google-Smtp-Source: AGHT+IHphqnhr4tq9wks+tWwDvmDa4IfYo/SR42KjOUs9sKCni6cA60cOZKOwSbtwAa1fQVu2G450Q== X-Received: by 2002:a17:906:c2d4:b0:a3c:8784:2731 with SMTP id ch20-20020a170906c2d400b00a3c87842731mr4916199ejb.31.1708109376689; Fri, 16 Feb 2024 10:49:36 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([188.39.149.98]) by smtp.googlemail.com with ESMTPSA id tj1-20020a170907c24100b00a3d1b3c5f1esm235108ejc.77.2024.02.16.10.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:49:36 -0800 (PST) From: Dave Stevenson To: dri-devel@lists.freedesktop.org, Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann Cc: Dave Stevenson Subject: [PATCH 2/3] drm/vc4: Add monochrome mode to the VEC. Date: Fri, 16 Feb 2024 18:48:56 +0000 Message-Id: <20240216184857.245372-3-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216184857.245372-1-dave.stevenson@raspberrypi.com> References: <20240216184857.245372-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 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 268f18b10ee0..f9e134dd1e3b 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,9 @@ vc4_vec_connector_get_property(struct drm_connector *connector, *val = VC4_VEC_TV_MODE_SECAM; break; + case DRM_MODE_TV_MODE_MONOCHROME: + return VC4_VEC_TV_MODE_MONOCHROME; + default: return -EINVAL; } @@ -754,7 +779,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 Fri Feb 16 18:48:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13560482 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 B5A3DC48BC4 for ; Fri, 16 Feb 2024 18:49:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0510E10E71F; Fri, 16 Feb 2024 18:49:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="CQLY1Eo0"; dkim-atps=neutral Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72D1210E71F for ; Fri, 16 Feb 2024 18:49:42 +0000 (UTC) Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so301337666b.0 for ; Fri, 16 Feb 2024 10:49:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1708109381; x=1708714181; 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=YZ9BgofFaDjLNq6PW24Ubio+a5DmWv/J0PkAc+IsXJ4=; b=CQLY1Eo0OEo0syJOpXETVRRQ4w89Lypdd3A0PX0Vb8txq+2PMmzs1X7gdHb5Y894Wx bRMiqzJWPRdU6zjej89//d4iITilUJrnU1x8nJdDjQN4LFyLGAXMCmSqM/CosPPp8CoO bpu/mbCIyztO1YhhU/20dzd1YZ9noqt3AEfPrGjuVq3iA5maOuixTndTU2ZjR5P6E6La k5N0qjDyEzqKhgbY9tkyyjjaOPcN2n2gtokEUIBUTRyffmC/xWoUev33jdSYRsBI5JBX 9rSXkg+Oucwg0MZBsgPMdv2Tj0ZMqWZsQoMI7J0+NLnov8wRXRrctcfi4M8/B5UT+/l5 P5tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708109381; x=1708714181; 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=YZ9BgofFaDjLNq6PW24Ubio+a5DmWv/J0PkAc+IsXJ4=; b=LaAaVvU7pbObFNdlvtfh+LBOSuMAzfyBaIWFWKsPQUn2sNSpA1QBmGICGlPeS9qROq V1u0Eki8raXl5l6wjrGaHyRMUhNOwccWHQSopyABkIFW28x+VElfwKZ0hfK7LTwkZPLW YDvK26/SinHLlPHkhy85PlXkqs7f86XbyZqaR1TGl13AzJwI6pv6Yppx/UfgWqI290RQ /qAPHIrW7qzYqMPpygRIPP4Zz0zeWcY8C2VA81G0c47I/KuG3M8DkiSw/dIKM7w2/MPL ufdRMLSPlavwrBUG5kKaCYqB3tu559KJw41y7DpJLW+NALIuoTCIoNenM5gj6hPENpI+ 9pBg== X-Gm-Message-State: AOJu0YwF6YgRvegbB7KrGmluDQYMe13GvntrKwji2A+0VfjZUN+ZAQAL cZqW490lxcupUQHofyHvxzptbT+TKjn5jMCJTPR3coXFmCUMbBu3FUisD+Up5sVP7PgH3KjvLuE t X-Google-Smtp-Source: AGHT+IFtFvVaIxgjHHMWBVccGLVvoEaW99z3OxpFSGHjhwEOTNJxcI+ZECx1kzT1SzLDKpBmCf41tA== X-Received: by 2002:a17:906:6951:b0:a3e:1224:f562 with SMTP id c17-20020a170906695100b00a3e1224f562mr90490ejs.75.1708109380672; Fri, 16 Feb 2024 10:49:40 -0800 (PST) Received: from dave-Ubuntu2204.pitowers.org ([188.39.149.98]) by smtp.googlemail.com with ESMTPSA id tj1-20020a170907c24100b00a3d1b3c5f1esm235108ejc.77.2024.02.16.10.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 10:49:40 -0800 (PST) From: Dave Stevenson To: dri-devel@lists.freedesktop.org, Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann Cc: Dave Stevenson Subject: [PATCH 3/3] drm/vc4: vec: Add the margin properties to the connector Date: Fri, 16 Feb 2024 18:48:57 +0000 Message-Id: <20240216184857.245372-4-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240216184857.245372-1-dave.stevenson@raspberrypi.com> References: <20240216184857.245372-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 f9e134dd1e3b..0aed18920d18 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -528,6 +528,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;