Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp388157imn; Fri, 29 Jul 2022 09:54:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s50a/1dHrcR7R39qqxzrwRm0i5uYS6ytKfcFQa5WYDCVRvzu5QklH8OcQ+D4Fd22FaL4I+ X-Received: by 2002:a63:4644:0:b0:41b:6476:1f0f with SMTP id v4-20020a634644000000b0041b64761f0fmr3506720pgk.489.1659113653818; Fri, 29 Jul 2022 09:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659113653; cv=none; d=google.com; s=arc-20160816; b=WS8qaW1M3ZnRjo2chswF4R/codsenqm1LsmUPkUa/liZlAbL5X855iksJqXyOR7ik3 MzDz2+tquCVYF+6sJfJYqQtCqH/jKdq46lAkfMf2TUto2lxDifehNo3ZZriGpnimSrbm SXB4s1itmYKDJ6BkUDiF+Y5ssNdSCqcIhVnukKl8W7yFTfYHSkOKPvCdR2xW9njMiRCT msNpMhEzg91glT+VE5yqXGsXbtO0ewRC8BRm2tsP1AaQRqnE27UN3q0kgWOPJ/Yv7yx1 mUhzXBMLwBVH5Vhnm7FxPYfcQj/cR2jiXxmbdo2f4KlFfx23tgt1/TL+6QWIvgFGt+Vu n4kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=j2oN+GXdkaZKd3o9mBAYJ/85uienfqE6K5CTaBOuI8I=; b=EnWtyPBEYnxHYlYYzMymQb9ttOzoSm0BXFwYzCzDxY6UzJNo7fSdpKszm/7OloeXy1 zsfbTF9Q5bVXWtWQmrD1RFuGkpoOZy7sAxr5CEnBPU6Al4CdvY39mgUJA+rPIOAMSCbi NsGTtz2ZghjiJrmPX8FlxLuAPo7L6YthVBMrxnSGtfQjG3o0L91b4mfLR7Ytwcg10Npw tAKEbDfskXkVne77H2XqXOXqNwY2QJADWc41+srv0s9ol+1fkLKMak5o9ghewzsodgFy XhVX/oZDVwNBitz1lpmdp9m/VW0ynRTXVk1uLpqcenCLyQxaRSUX7X43yhGu7UHIzqbm NoDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=YuDdcpoN; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=f98hODY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a170902e74d00b0016be8c2951esi5466736plf.459.2022.07.29.09.53.59; Fri, 29 Jul 2022 09:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=YuDdcpoN; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=f98hODY+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238233AbiG2Qqh (ORCPT + 99 others); Fri, 29 Jul 2022 12:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238170AbiG2Qpv (ORCPT ); Fri, 29 Jul 2022 12:45:51 -0400 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 082A788F3A for ; Fri, 29 Jul 2022 09:45:49 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id A5FB658091F; Fri, 29 Jul 2022 12:35:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 29 Jul 2022 12:35:40 -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=1659112540; x= 1659119740; bh=j2oN+GXdkaZKd3o9mBAYJ/85uienfqE6K5CTaBOuI8I=; b=Y uDdcpoN+NNm9rJzGhUlQ9htEo/iUG/MUqPD+9iq3d8rV6jbvyokS/bUVuZzy+JUu aKpJzgSVu6NkxHWg02eiP6cl+zOi4FCzY4XdRlUeeK2qKadxH8qJvfY6YhSxhzhB VkwbCSHWHDwMIuNKXjwcEsKS6uapvqFbyfpXqgWNT8tSvoFmKxDFJqf+annp9H/E tTbdVQTJAKobakJw2XfhcEiCuTc0OYUeOHU8aZQeWyzJ6nPRYzObYrkwpNhUMcs1 Ne+cj3JAo72TkN+fTBIaC+64XRzdxJfiUiILg/+S9mFzAb5zRDziHHpv60Lypvi/ Hvcfz7a8Q9J73bOVvdyNQ== 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=1659112540; x= 1659119740; bh=j2oN+GXdkaZKd3o9mBAYJ/85uienfqE6K5CTaBOuI8I=; b=f 98hODY+HQOdrhBVwOYfVPf24oCS0yGNRjoXi7m0lW/nYX3tR7aPTcZ4KrTaQRgg+ 7eX36GCEJTedVkzXNfu93SrCeOqmezMQkxQYGbBw6HMCceg46MPb2KrHDuSV3ef6 fnPayt3TQha4+x2LCgMqI9fVnfz7yz8a3tWCGA2486pmEiJkrZ03t6on7UFPLvwE EAjz6OKu4VX7Plpi81ShrDGwgpcDFUi5lyxgTPS0qRqFx2QTHO6NtGVH3oSCXOmN eQZ4ETCmq7wJrsfssSPfHb3zPmQAnDtJUveF5bzdndsGS6xZ2vZ3LpIEuLOF5pwb WWcE1CFZLHJ/3MMn2iDTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddujedguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtoffgsehtkeertdertdejnecuhfhrohhmpefo rgigihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecugg ftrfgrthhtvghrnhepgfffgfetffduudelhfevieffffduleevgfegkeeutefgffejheel leekjeefhfejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 29 Jul 2022 12:35:39 -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=20Tr=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 03/35] drm/atomic: Add TV subconnector property to get/set_property Date: Fri, 29 Jul 2022 18:34:46 +0200 Message-Id: <20220728-rpi-analog-tv-properties-v1-3-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 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.10.0-dev-49460 X-Developer-Signature: v=1; a=openpgp-sha256; l=2269; i=maxime@cerno.tech; h=from:subject:message-id; bh=506g4JCkQGu737Vb71VZVRDOM3FvouVx6ntNTaK1n9A=; b=owGbwMvMwCHc4XzqmfnC7acZT6slMSQ94VEqVtjOy2b+/MCVffevbd5Z+PDswS/Seqe6+77YzX8s 5mv5paOUhUGYg0FWTJHluuBbO76wKLcIng+bYeawMoEMYeDiFICJvNzH8E9/hWF7eAGLsNc3+Q0tmt 2/7KWdzD2WVKU8NSxtC3185hcjw/Qpx5/6tf04Ky/2mP8Kn+/71w9P6Lnujnj+ZEfO9OtJd7wA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The subconnector property was created by drm_mode_create_tv_properties(), but wasn't exposed to the userspace through the generic atomic_get/set_property implementation, and wasn't stored in any generic state structure. Let's solve this. Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index c74c78a28171..c06d0639d552 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -688,6 +688,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, return -EINVAL; } else if (property == config->tv_select_subconnector_property) { state->tv.select_subconnector = val; + } else if (property == config->tv_subconnector_property) { + state->tv.subconnector = val; } else if (property == config->tv_left_margin_property) { state->tv.margins.left = val; } else if (property == config->tv_right_margin_property) { @@ -796,6 +798,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector, *val = connector->dpms; } else if (property == config->tv_select_subconnector_property) { *val = state->tv.select_subconnector; + } else if (property == config->tv_subconnector_property) { + *val = state->tv.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 f8091edf9a33..1e9996b33cc8 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -672,6 +672,7 @@ struct drm_connector_tv_margins { /** * struct drm_tv_connector_state - TV connector related states * @select_subconnector: selected subconnector + * @subconnector: detected subconnector * @margins: TV margins * @mode: TV mode * @brightness: brightness in percent @@ -683,6 +684,7 @@ struct drm_connector_tv_margins { */ 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 brightness; -- b4 0.10.0-dev-49460