From patchwork Fri Jul 29 16:35:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12932741 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A7B10C00144 for ; Fri, 29 Jul 2022 17:26:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YcwIzkPFNNazMkUvllb1X6hdbkis/FXO1BIzcQ4752w=; b=Am0DMtjlFsow1k aEUNZKujcyqyFdcDUzg0TLSeppNsMEAn92pwlwEcHzkWyqKjrltjNLoj1YjdjpxGZeBrk2dJEDGc6 08myIV9MA0yjOlk9lAiblSEEpKRNSnmyk6D9zRlpkJGMTJYGv2hlTR7Am8XoUw2b/yhDl643xrHLj zBwiTPTKa+woSkv05xWiw6xXU3Bh8HPK4BWO7enfMiGRmAdj8Dk7NpUmmBL8I96fTkjzIPbXXEa+D xGHsWkiGzOnCIuQuqcqOzo6JJa/IuY77QzdBPWXbP86BQzWsE52RhUJEUfbOuwcNJ/eObme9W0PqP aIqt4qgpe5AxuwYuJB3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHTkM-0081uI-L2; Fri, 29 Jul 2022 17:25:58 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oHSzT-006T6C-HP; Fri, 29 Jul 2022 16:37:33 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id C6C995809A0; Fri, 29 Jul 2022 12:37:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 29 Jul 2022 12:37:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1659112650; x= 1659119850; bh=RtBWVyhipgVGKBzgLaFQoPKZOkGMW/GOSPDOm45R7S8=; b=M lcpT7S42vUoBsb1paiUYfzf+gl8RIdDTAEpKVyaxHIdPaKZq4VuxptHLtYuN20b7 6HtvPEapUJaG3l3a1VTxmfPVHl34sJKT5dxR++BFrOwZe8kRKX0hVUUHwkOba/d2 4dyd4mFzL3s56HnvtuO6aZuBBjt50x9lKWuZaCESNb4wgwzXVC8E7hoe8850ZlRE 2flwvgKNk8oSOQLzeGkx6Tcr/ziBjhiJi+qUlNaGzP8LYWMnfGiyKbt3YHBVfcYE XJp6JBSurKmlWtQL4Kr5U24AE1Zad1IuMCpdp6psBRNlyGFR2/13KKaonDWYnAfX QLD253AEgyLKGvPyNwQyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1659112650; x= 1659119850; bh=RtBWVyhipgVGKBzgLaFQoPKZOkGMW/GOSPDOm45R7S8=; b=K DYreJWMnBTy+0cSUz8cAFX2RO4/L9YU7S2uh884CNa0pVwG3vM2ncBEH+XpfD+ry f2meQReko4SsFt7kltRmlPRftOEPfBhkoRaR7KSBWskt8v6o7tW0dXT2sgGOjCCJ MnHEogUADDNCqKMRC+Kz7JVqUz8GHniwh6Pd0LZs+e5Xy/dMgEwLzxoOnANBpks5 Ac61vO9nNi4BwNnqg3kyDKWrg8dNAoC+QezkRV444N0ByEWQ4uzxZQXALWqpS7zt iu83XW3nGVC5IADTlNShyEn8eSpdw/RZlZmQuG70h6C/l8EonvF604OLo2/q05qT EZXgEu+cKmwenWRQChqlQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddujedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtoffgsehtkeertdertdejnecuhfhrohhmpefo rgigihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecugg ftrfgrthhtvghrnhepgfduhffhkeeiteejledtieeuteehkeehieekgedugeffudekjedu geffieethfeinecuffhomhgrihhnpehmrghrghhinhhsrdhtohhpnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhho rdhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 29 Jul 2022 12:37:29 -0400 (EDT) From: Maxime Ripard To: Jernej Skrabec , Martin Blumenstingl , Chen-Yu Tsai , Philipp Zabel , Jerome Brunet , Samuel Holland , Thomas Zimmermann , Daniel Vetter , Emma Anholt , David Airlie , Maarten Lankhorst , =?utf-8?q?Noralf_Tr?= =?utf-8?q?=C3=B8nnes?= , Kevin Hilman , Neil Armstrong , Maxime Ripard Cc: Maxime Ripard , linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Phil Elwell , Mateusz Kwiatkowski , linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Dave Stevenson , linux-amlogic@lists.infradead.org, dri-devel@lists.freedesktop.org, Dom Cobley Subject: [PATCH v1 33/35] drm/connector: Remove TV modes property Date: Fri, 29 Jul 2022 18:35:16 +0200 Message-Id: <20220728-rpi-analog-tv-properties-v1-33-3d53ae722097@cerno.tech> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> MIME-Version: 1.0 X-Mailer: b4 0.10.0-dev-49460 X-Developer-Signature: v=1; a=openpgp-sha256; l=4771; i=maxime@cerno.tech; h=from:subject:message-id; bh=rMRLOOg7VJ8NjH+0TL7KazwOYRQZ1QYUtbNupki7utg=; b=owGbwMvMwCHc4XzqmfnC7acZT6slMSQ94VHyu5D54kRPOG8sY6RYy+Orf9Z3rPoo9JZj/n5lP5s4 kxLTjlIWBmEOBlkxRZbrgm/t+MKi3CJ4PmyGmcPKBDKEgYtTACZy6AjDbzbdxI6r25eqiB37WL91yR UdK92LNw46W6n1SPHsye8XMGJkWP/RJ+B31+75vyw/+lyNfp7GMzFXO7x7Mdv874/EHG5MEAAA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220729_093731_705787_E304D612 X-CRM114-Status: GOOD ( 12.14 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Now that all the other drivers have been converted to the new style TV mode property, let's get rid of the old one. Signed-off-by: Maxime Ripard Reported-by: kernel test robot Reported-by: kernel test robot diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index d7ff6c644c2f..d52e87e8e6aa 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -698,8 +698,6 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, state->tv.margins.top = val; } else if (property == config->tv_bottom_margin_property) { state->tv.margins.bottom = val; - } else if (property == config->tv_mode_property) { - state->tv.mode = val; } else if (property == config->tv_norm_property) { state->tv.norm = val; } else if (property == config->tv_brightness_property) { @@ -810,8 +808,6 @@ drm_atomic_connector_get_property(struct drm_connector *connector, *val = state->tv.margins.top; } else if (property == config->tv_bottom_margin_property) { *val = state->tv.margins.bottom; - } else if (property == config->tv_mode_property) { - *val = state->tv.mode; } else if (property == config->tv_norm_property) { *val = state->tv.norm; } else if (property == config->tv_brightness_property) { diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index d73a68764b6e..5e138159f2de 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1650,9 +1650,7 @@ EXPORT_SYMBOL(drm_mode_create_tv_margin_properties); * 0 on success or a negative error code on failure. */ int drm_mode_create_tv_properties(struct drm_device *dev, - unsigned int supported_tv_norms, - unsigned int num_modes, - const char * const modes[]) + unsigned int supported_tv_norms) { static const struct drm_prop_enum_list tv_norm_values[] = { { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_443) - 1, "NTSC-443" }, @@ -1722,20 +1720,6 @@ int drm_mode_create_tv_properties(struct drm_device *dev, goto nomem; dev->mode_config.tv_norm_property = tv_norm; - if (num_modes) { - unsigned int i; - - dev->mode_config.tv_mode_property = - drm_property_create(dev, DRM_MODE_PROP_ENUM, - "mode", num_modes); - if (!dev->mode_config.tv_mode_property) - goto nomem; - - for (i = 0; i < num_modes; i++) - drm_property_add_enum(dev->mode_config.tv_mode_property, - i, modes[i]); - } - dev->mode_config.tv_brightness_property = drm_property_create_range(dev, 0, "brightness", 0, 100); if (!dev->mode_config.tv_brightness_property) diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index bed52423776e..1d4025663530 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tv.c +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c @@ -526,8 +526,7 @@ static int sun4i_tv_bind(struct device *dev, struct device *master, ret = drm_mode_create_tv_properties(drm, DRM_MODE_TV_NORM_NTSC_M | - DRM_MODE_TV_NORM_PAL_B, - 0, NULL); + DRM_MODE_TV_NORM_PAL_B); if (ret) goto err_cleanup_connector; diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index 91d343238b0f..2e7e964928b3 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -704,8 +704,7 @@ static int vc4_vec_bind(struct device *dev, struct device *master, void *data) DRM_MODE_TV_NORM_PAL_B | DRM_MODE_TV_NORM_PAL_M | DRM_MODE_TV_NORM_PAL_N | - DRM_MODE_TV_NORM_SECAM_B, - 0, NULL); + DRM_MODE_TV_NORM_SECAM_B); if (ret) return ret; diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 78275e68ff66..e535dca6376e 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -712,7 +712,6 @@ struct drm_tv_connector_state { enum drm_mode_subconnector select_subconnector; enum drm_mode_subconnector subconnector; struct drm_connector_tv_margins margins; - unsigned int mode; unsigned int norm; unsigned int brightness; unsigned int contrast; @@ -1806,9 +1805,7 @@ void drm_connector_attach_dp_subconnector_property(struct drm_connector *connect int drm_mode_create_tv_margin_properties(struct drm_device *dev); int drm_mode_create_tv_properties(struct drm_device *dev, - unsigned int supported_tv_norms, - unsigned int num_modes, - const char * const modes[]); + unsigned int supported_tv_norms); void drm_connector_attach_tv_margin_properties(struct drm_connector *conn); int drm_mode_create_scaling_mode_property(struct drm_device *dev); int drm_connector_attach_content_type_property(struct drm_connector *dev);