From patchwork Thu Sep 29 16:30:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12994377 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 866BEC433F5 for ; Thu, 29 Sep 2022 16:35:47 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c9QV61XnY5vbfCGwE5/LLEHCVvd5Rhqgkr3B4P8wdxc=; b=f1qApG8zdJ8cmR Xf51S6fEJ5hP+m5uKyu4KF2y7l1OzrbbnaU7Sf2c9M65AxT90IIYdx+OEsL6pgucFaQe8Ev+O42VM nkuIfLdfQ7pNlTWvu38xOYBnuBsk4SLlJtcck70P4NMFyMIT1ReDyG9iBJkOJ81T9KO9agl99mKB1 tee4ZB32rc0ZwVHUlP72oXgXyty8U3vehau4isD5etMxtgbFakwLqz2jLHrukCSW12MoW4nTvBb53 EEEip8ZLARGYwWV3lFGXKUMo1Ybk99BM5Fq8Pf+Y+KWH2zKACUU35nWXANmbdBiNUWJ6CZVW5L2gQ EzVtpz/LbLsSheCZFmlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odwUg-004Ddi-Sj; Thu, 29 Sep 2022 16:34:39 +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 1odwRV-004Bq6-Ub for linux-arm-kernel@lists.infradead.org; Thu, 29 Sep 2022 16:31:23 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 3CF36580800; Thu, 29 Sep 2022 12:31:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 29 Sep 2022 12:31:21 -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=1664469081; x= 1664476281; bh=hzWTfTrh+GGKS67lMWxl9cNzRKq+JVkXa71CKRCrLuE=; b=O bWdoR/5p6T/eo2KGDNB3Mf4DHA5Ll7wP8zPEZT8sE9dLmirD9BgT57chYaOgn7hy CYHSCYCXtYteTD6fAUT1Mr6SwhduEpVH5mGd3rL6XxE0s4BeT/CDUGZJAYeT6grF e4HSoVmjYA0piSP/mvPbuTaGG7NVMGVHHbc7V0AIW39SnCa+zenEkcQEKibz+/bu 4UsCQbOR7RmN7uQG+bujC2lXIL6pcq3D5Be2McsOF22jj0IzAQiMOvxLarS3StgL cAokGlw67cf8olxpzo+BNioK5k28EcbeY0Y61S1xMGGPD514IyQlAcjRH+2p4CF2 dKku82rQa9H+93M8OBeMg== 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=fm2; t=1664469081; x= 1664476281; bh=hzWTfTrh+GGKS67lMWxl9cNzRKq+JVkXa71CKRCrLuE=; b=h MajYTGiNX9HwquNZ5ewGkZIyaznNNfDiXwTNsyy1OpWDDMzIlbWmOIarkgfwF7O8 PVsJESGGBCSf8X62edjKN3Ih5U207Ku3moaKNBveQGif+M3JHShuWt6i0P4kL1xF 0XOFkfoKQKgDlzV7UECi+vUgIR3QYZfXCkx+rmiZTqzX29ma3AtA+gfqlsHRWtqL J1enmDULcbKFUMq+3Q1ZfGef4wwsjzTmqgiu5DgyxAwZdKd/Xr7VnT8nkthDQGZh TEmg1L6w4B5AeJ4ZHdLSk9EQcfzUnv69xGhx8RVfKPMbHhak27R7Jyc7+EkcIkvs JZ1J2+Hgz7H0eNnooR8Zw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeehtddguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhfffuggfgtgfkfhgjvfevofesthekredtredtjeenucfhrhhomhepofgr gihimhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtf frrghtthgvrhhnpedvgfevjefhtdetveevhfelieeuueetgfdvgeevkeegudejffegfffg tedtleelhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Sep 2022 12:31:19 -0400 (EDT) From: Maxime Ripard Date: Thu, 29 Sep 2022 18:30:59 +0200 Subject: [PATCH v4 05/30] drm/connector: Rename subconnector state variable MIME-Version: 1.0 Message-Id: <20220728-rpi-analog-tv-properties-v4-5-60d38873f782@cerno.tech> References: <20220728-rpi-analog-tv-properties-v4-0-60d38873f782@cerno.tech> In-Reply-To: <20220728-rpi-analog-tv-properties-v4-0-60d38873f782@cerno.tech> To: Jernej Skrabec , Chen-Yu Tsai , Karol Herbst , Samuel Holland , Lyude Paul , Jani Nikula , Daniel Vetter , Thomas Zimmermann , Emma Anholt , Joonas Lahtinen , Ben Skeggs , David Airlie , Rodrigo Vivi , Tvrtko Ursulin , Maarten Lankhorst , Maxime Ripard Cc: =?unknown-8bit?q?linux-arm-kernel=40lists=2Einfradead=2Eorg=2C_Maxime_Ri?= =?unknown-8bit?q?pard_=3Cmaxime=40cerno=2Etech=3E=2C_dri-devel=40lists=2Efr?= =?unknown-8bit?q?eedesktop=2Eorg=2C?= =?unknown-8bit?q?_Geert_Uytterhoeven_=3Cgeert=40linux-m68k=2Eorg=3E=2C_intel?= =?unknown-8bit?q?-gfx=40lists=2Efreedesktop=2Eorg=2C_linux-sunxi=40lists=2E?= =?unknown-8bit?q?linux=2Edev=2C?= =?unknown-8bit?q?_Hans_de_Goede_=3Chdegoede=40redhat=2Ecom=3E=2C_nouveau=40l?= =?unknown-8bit?q?ists=2Efreedesktop=2Eorg=2C_Noralf_Tr=C3=B8nnes_=3Cnoralf?= =?unknown-8bit?q?=40tronnes=2Eorg=3E=2C?= =?unknown-8bit?q?_Mateusz_Kwiatkowski_=3Ckfyatek+publicgit=40gmail=2Ecom=3E?= =?unknown-8bit?q?=2C_Dave_Stevenson_=3Cdave=2Estevenson=40raspberrypi=2Ecom?= =?unknown-8bit?q?=3E=2C?= =?unknown-8bit?q?_linux-kernel=40vger=2Ekernel=2Eorg=2C_Dom_Cobley_=3Cdom=40?= =?unknown-8bit?q?raspberrypi=2Ecom=3E=2C_Phil_Elwell_=3Cphil=40raspberrypi?= =?unknown-8bit?q?=2Ecom=3E?= X-Mailer: b4 0.11.0-dev-7da52 X-Developer-Signature: v=1; a=openpgp-sha256; l=2809; i=maxime@cerno.tech; h=from:subject:message-id; bh=YG61J82B1ciNFhc+9pD3wkIVvjz06eRoxytMiv8eoao=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMmmJ9wCsvYcE1L0+JNz0zHMXXxH3qw7y9eU//0V2pt4WW/W o4aIjlIWBjEuBlkxRZYYYfMlcadmve5k45sHM4eVCWQIAxenAEwk8RHDf8/u/EqBHXEBfxielZTFT+ JQYmn5vqfBm+1oz7p3Yst+WDIy3Dmas1Zh9424iZzzpgXEGU9/o7ewUrvjjEhz8/rswsA4XgA= 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-20220929_093122_107360_A0E8F414 X-CRM114-Status: GOOD ( 12.64 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is two TV subconnector related properties registered by drm_mode_create_tv_properties(): subconnector and select subconnector. While the select subconnector property is stored in the kernel by the drm_tv_connector_state structure, the subconnector property isn't stored anywhere. Worse, the select subconnector property is stored in a field called subconnector, creating some ambiguity about which property content we're accessing. Let's rename that field to one called select_subconnector to make it move obvious what it's about. Acked-by: Thomas Zimmermann Reviewed-by: Noralf Trønnes Signed-off-by: Maxime Ripard --- Changes in v4: - Added the documentation name update --- drivers/gpu/drm/drm_atomic_uapi.c | 4 ++-- include/drm/drm_connector.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 79730fa1dd8e..c74c78a28171 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -687,7 +687,7 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, */ return -EINVAL; } else if (property == config->tv_select_subconnector_property) { - state->tv.subconnector = val; + state->tv.select_subconnector = val; } else if (property == config->tv_left_margin_property) { state->tv.margins.left = val; } else if (property == config->tv_right_margin_property) { @@ -795,7 +795,7 @@ drm_atomic_connector_get_property(struct drm_connector *connector, else *val = connector->dpms; } else if (property == config->tv_select_subconnector_property) { - *val = state->tv.subconnector; + *val = state->tv.select_subconnector; } else if (property == config->tv_left_margin_property) { *val = state->tv.margins.left; } else if (property == config->tv_right_margin_property) { diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 248206bbd975..60b5662dec7c 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -692,7 +692,7 @@ struct drm_connector_tv_margins { /** * struct drm_tv_connector_state - TV connector related states - * @subconnector: selected subconnector + * @select_subconnector: selected subconnector * @margins: TV margins * @mode: TV mode * @brightness: brightness in percent @@ -703,7 +703,7 @@ struct drm_connector_tv_margins { * @hue: hue in percent */ struct drm_tv_connector_state { - enum drm_mode_subconnector subconnector; + enum drm_mode_subconnector select_subconnector; struct drm_connector_tv_margins margins; unsigned int mode; unsigned int brightness;