Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3162949rwe; Mon, 29 Aug 2022 06:57:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR59tjPPXhALiaTlZZ86V66AZn/COPLtKTyNXWgP/4s1HA0EfjpfCdT6isNqyXJ68lRG5eyR X-Received: by 2002:a63:5a61:0:b0:41b:b021:f916 with SMTP id k33-20020a635a61000000b0041bb021f916mr13772263pgm.387.1661781443796; Mon, 29 Aug 2022 06:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661781443; cv=none; d=google.com; s=arc-20160816; b=gzRBbus0FsHs3CrH3/6G0hA0rpeSi9KS7xUp4ddX7RsTB2rgbqRI8NOVd9jT+r9JFp MAB1Koo/kvYBPfOl0ObNH3zXaGrTHP9iYsRzNE86ZbswbT0uD+Ay29dTv2Mf/h+rh8bZ W4Q9/IfWaAiQM/hJGmxQ7OiIIcYs4bgUjNYF3Y0JIy+Aqg4WSjLZ1P1Qd30CSVZvSOdX me3BLaU8V+9qJTZ8rSCbtNtY9kNlG1G0kD7D4xD5K4v6Bmteo8iuxGtmI+l2uVfsMxZr aANcJr4MyBLkMrKx80YHAaZRYFGrUelaa+YDPlDfwJk3Ntl0DCfgOXVf62DVxZ7uMyua hH3g== 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=ReY7J5eErJiBY0rbxwL7vnhNBn09T/DT66uuFDXXy5o=; b=rfsbH5qCcMaE5hrWTT31MnuHn1vVZ7psLrvPNMaXASio66RKR7Tf/er1u4YSN8sIf0 wkQh+WWAjmgMLOTauoc2TYLOR2ZM9ddfCZOFAWgoIeDDM7/WNT2kr8vaEHTnRZJqhdef VhmGGrOv8rhFd+0t16JvIw7bXC5j4PyRDibaoWmJwMvU6fxsDEob+otXp04MtDhodnJm uNWz306NGZbHKrqWbK6h01lGEESIieFcpM+gNnfVdrZPgQq5wdAAeAvWXBDqMwIA4Bqh ASdd2Om1bnVsUEwRvBSPEcIx9jwyM6onbbNYyyoH+3ATZoz/TxvYqOw6reMMFWPObzqv JeFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=N4aBI9wN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="oVKmlz4/"; 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 a10-20020a63e40a000000b00429e6ef0e86si9143241pgi.603.2022.08.29.06.57.12; Mon, 29 Aug 2022 06:57:23 -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=fm3 header.b=N4aBI9wN; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="oVKmlz4/"; 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 S230018AbiH2NSM (ORCPT + 99 others); Mon, 29 Aug 2022 09:18:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbiH2NRJ (ORCPT ); Mon, 29 Aug 2022 09:17:09 -0400 Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9398F2C115 for ; Mon, 29 Aug 2022 06:16:34 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 707D12B06076; Mon, 29 Aug 2022 09:15:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 29 Aug 2022 09:15:03 -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=fm3; t=1661778899; x= 1661786099; bh=ReY7J5eErJiBY0rbxwL7vnhNBn09T/DT66uuFDXXy5o=; b=N 4aBI9wNpgH0ceAnmBkyvIF5Lu77njTisbo1TIyV+MRUDKNuwulNc4YbhWRKmMWKJ dMmbHy4NlVARJ71cduUN5bndKcGqo8JAA1V3MMlbU7gj2RVigr/12iQMd4qrtjTR 068iX8T9PUlEal4YDwm5TNEO/mByZnEOIfRoYuFPdfrfUMlRXdE9c3P19gsyqyXj ULyMUUW3+3BbIZxip3q0FnvBh2WgJ9dnK6bwrIPhSQ8jwWS0oUTKpTHV0Zx0Hc1l W2FKnIl25AbHCAn3CMWARmuupC2rggRMAEZFdpGGnE0LNPXQeoWvqeSqAa+Rme1h I6rVpG7lLlXdnj2mlt6yg== 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=fm1; t=1661778899; x= 1661786099; bh=ReY7J5eErJiBY0rbxwL7vnhNBn09T/DT66uuFDXXy5o=; b=o VKmlz4/W/h4tuO2rKshy4dLtdEoUzgZu3epYaNMaNiZt0AisN2tANX1ZniOGV8o/ Zr8hHGEYyaqvt/kyIHZfgQKZRLOuNEL08Q6NPh72AbG8zqv0YKyvo0/QUc/ahNXx OHORusfP8StHLkZSbT302o7kyPAQgMWNH+Uxb7NfWkPV2Fm5FVbqXv1TwxUlc9Pj lDb4SXb/cJMZ2vBJ2tRKZZAiRAcZNN1CulovQA4L/67dQL24Ss62DpW3Vl4ScGeP gCJSF6wBmQpFVDqSNKaPOr/nue5Uubipn1xysS4U07LHhACEjHMCEpdjKgLlGVRk 00smxhdUqCJ13zgW5eqdg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekuddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfogfesthhqredtredtjeenucfhrhhomhepofgr gihimhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtf frrghtthgvrhhnpeefiedvfefggffgffehveejieffuddtgffhjefggeetieduvdeileet lefgveegtdenucevlhhushhtvghrufhiiigvpeegnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Aug 2022 09:14:58 -0400 (EDT) From: Maxime Ripard To: Maxime Ripard , Ben Skeggs , David Airlie , Chen-Yu Tsai , Thomas Zimmermann , Jani Nikula , Lyude Paul , Philipp Zabel , Maarten Lankhorst , Rodrigo Vivi , Tvrtko Ursulin , Jernej Skrabec , Samuel Holland , Karol Herbst , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Emma Anholt , Daniel Vetter , Joonas Lahtinen Cc: Maxime Ripard , Hans de Goede , linux-arm-kernel@lists.infradead.org, Phil Elwell , intel-gfx@lists.freedesktop.org, Dave Stevenson , dri-devel@lists.freedesktop.org, Dom Cobley , linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Mateusz Kwiatkowski , Geert Uytterhoeven Subject: [PATCH v2 27/41] drm/vc4: vec: Remove redundant atomic_mode_set Date: Mon, 29 Aug 2022 15:11:41 +0200 Message-Id: <20220728-rpi-analog-tv-properties-v2-27-459522d653a7@cerno.tech> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.10.0-dev-65ba7 X-Developer-Signature: v=1; a=openpgp-sha256; l=3082; i=maxime@cerno.tech; h=from:subject:message-id; bh=QXOlllk5ml+SVmFRbPCWgY/56C60l8/t88mB+T2Hd8I=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMk8uxRarzw76nXbROFT8FTJfZ3vCgOyZc3+Rc1vzw7+F6jR czK6o5SFQYyLQVZMkSVG2HxJ3KlZrzvZ+ObBzGFlAhnCwMUpABOp7GD4xTxX5aN6ObuKyquJYl93cv MypLxZ/fer0zGFZZyfLztEXGZkeBN54K165Hf/Iv1072wP+68Xg+pWPT0srdHbuOGba9J3XgA= X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D Content-Transfer-Encoding: quoted-printable 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,T_SCC_BODY_TEXT_LINE 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 From: Mateusz Kwiatkowski =0D =0D Let's remove the superfluous tv_mode field, which was redundant with the=0D mode field in struct drm_tv_connector_state.=0D =0D Signed-off-by: Mateusz Kwiatkowski =0D Signed-off-by: Maxime Ripard =0D =0D diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c= =0D index 9a37c3fcc295..4d7bc7c20704 100644=0D --- a/drivers/gpu/drm/vc4/vc4_vec.c=0D +++ b/drivers/gpu/drm/vc4/vc4_vec.c=0D @@ -171,8 +171,6 @@ struct vc4_vec {=0D =0D struct clk *clock;=0D =0D - const struct vc4_vec_tv_mode *tv_mode;=0D -=0D struct debugfs_regset32 regset;=0D };=0D =0D @@ -316,7 +314,6 @@ static int vc4_vec_connector_init(struct drm_device *de= v, struct vc4_vec *vec)=0D drm_object_attach_property(&connector->base,=0D dev->mode_config.legacy_tv_mode_property,=0D VC4_VEC_TV_MODE_NTSC);=0D - vec->tv_mode =3D &vc4_vec_tv_modes[VC4_VEC_TV_MODE_NTSC];=0D =0D drm_connector_attach_encoder(connector, &vec->encoder.base);=0D =0D @@ -360,6 +357,11 @@ static void vc4_vec_encoder_enable(struct drm_encoder = *encoder,=0D {=0D struct drm_device *drm =3D encoder->dev;=0D struct vc4_vec *vec =3D encoder_to_vc4_vec(encoder);=0D + struct drm_connector *connector =3D &vec->connector;=0D + struct drm_connector_state *conn_state =3D=0D + drm_atomic_get_new_connector_state(state, connector);=0D + const struct vc4_vec_tv_mode *tv_mode =3D=0D + &vc4_vec_tv_modes[conn_state->tv.mode];=0D int idx, ret;=0D =0D if (!drm_dev_enter(drm, &idx))=0D @@ -418,15 +420,14 @@ static void vc4_vec_encoder_enable(struct drm_encoder= *encoder,=0D /* Mask all interrupts. */=0D VEC_WRITE(VEC_MASK0, 0);=0D =0D - VEC_WRITE(VEC_CONFIG0, vec->tv_mode->config0);=0D - VEC_WRITE(VEC_CONFIG1, vec->tv_mode->config1);=0D + VEC_WRITE(VEC_CONFIG0, tv_mode->config0);=0D + VEC_WRITE(VEC_CONFIG1, tv_mode->config1);=0D =0D - if (vec->tv_mode->custom_freq !=3D 0) {=0D + if (tv_mode->custom_freq !=3D 0) {=0D VEC_WRITE(VEC_FREQ3_2,=0D - (vec->tv_mode->custom_freq >> 16) &=0D - 0xffff);=0D + (tv_mode->custom_freq >> 16) & 0xffff);=0D VEC_WRITE(VEC_FREQ1_0,=0D - vec->tv_mode->custom_freq & 0xffff);=0D + tv_mode->custom_freq & 0xffff);=0D }=0D =0D VEC_WRITE(VEC_DAC_MISC,=0D @@ -442,15 +443,6 @@ static void vc4_vec_encoder_enable(struct drm_encoder = *encoder,=0D drm_dev_exit(idx);=0D }=0D =0D -static void vc4_vec_encoder_atomic_mode_set(struct drm_encoder *encoder,=0D - struct drm_crtc_state *crtc_state,=0D - struct drm_connector_state *conn_state)=0D -{=0D - struct vc4_vec *vec =3D encoder_to_vc4_vec(encoder);=0D -=0D - vec->tv_mode =3D &vc4_vec_tv_modes[conn_state->tv.mode];=0D -}=0D -=0D static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder,=0D struct drm_crtc_state *crtc_state,=0D struct drm_connector_state *conn_state)=0D @@ -470,7 +462,6 @@ static const struct drm_encoder_helper_funcs vc4_vec_en= coder_helper_funcs =3D {=0D .atomic_check =3D vc4_vec_encoder_atomic_check,=0D .atomic_disable =3D vc4_vec_encoder_disable,=0D .atomic_enable =3D vc4_vec_encoder_enable,=0D - .atomic_mode_set =3D vc4_vec_encoder_atomic_mode_set,=0D };=0D =0D static int vc4_vec_late_register(struct drm_encoder *encoder)=0D =0D -- =0D b4 0.10.0-dev-65ba7=0D