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: 12994365 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 22376C433FE for ; Thu, 29 Sep 2022 16:31:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0584010EACC; Thu, 29 Sep 2022 16:31:26 +0000 (UTC) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by gabe.freedesktop.org (Postfix) with ESMTPS id CEE0310EAC3; Thu, 29 Sep 2022 16:31:21 +0000 (UTC) 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 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 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 Subject: [Intel-gfx] [PATCH v4 05/30] drm/connector: Rename subconnector state variable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?unknown-8bit?q?Dom_Cobley_=3Cdom=40raspberrypi=2Ecom=3E=2C_Dave_Steven?= =?unknown-8bit?q?son_=3Cdave=2Estevenson=40raspberrypi=2Ecom=3E=2C_Phil_Elw?= =?unknown-8bit?q?ell_=3Cphil=40raspberrypi=2Ecom=3E=2C_nouveau=40lists=2Efr?= =?unknown-8bit?q?eedesktop=2Eorg=2C_intel-gfx=40lists=2Efreedesktop=2Eorg?= =?unknown-8bit?q?=2C_linux-kernel=40vger=2Ekernel=2Eorg=2C_dri-devel=40list?= =?unknown-8bit?q?s=2Efreedesktop=2Eorg=2C_Mateusz_Kwiatkowski_=3Ckfyatek+pu?= =?unknown-8bit?q?blicgit=40gmail=2Ecom=3E=2C_Hans_de_Goede_=3Chdegoede=40re?= =?unknown-8bit?q?dhat=2Ecom=3E=2C_Noralf_Tr=C3=B8nnes_=3Cnoralf=40tronnes?= =?unknown-8bit?q?=2Eorg=3E=2C_Geert_Uytterhoeven_=3Cgeert=40linux-m68k=2Eor?= =?unknown-8bit?q?g=3E=2C_Maxime_Ripard_=3Cmaxime=40cerno=2Etech=3E=2C_linux?= =?unknown-8bit?q?-sunxi=40lists=2Elinux=2Edev=2C_linux-arm-kernel=40lists?= =?unknown-8bit?q?=2Einfradead=2Eorg?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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;