Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3156502rwe; Mon, 29 Aug 2022 06:50:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7BGbl7Sq4Z78616Bmt81ET6m+P/rcLG6o6ULcTuagOBq3Jy2291YzFsyoCjyUPYrAsgBQ5 X-Received: by 2002:a17:90b:1e08:b0:1f5:3874:492e with SMTP id pg8-20020a17090b1e0800b001f53874492emr18648783pjb.82.1661781035402; Mon, 29 Aug 2022 06:50:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661781035; cv=none; d=google.com; s=arc-20160816; b=X6NpeVx6Rsq32KHVxywGthiNKmFCI+QZ4jdxi4IQCmhNrOae4BCXYtxs3X7/+SGeJt TPgFT9aJjpGc8G3N9XDHH+rXnR/6C95ALE9SSCXFyNZrZ9D1/t3DawQjmepn3JZ/MlpI TUyNcCZFpj8rqfZSBtV1plyqKedI5cpMpb6OZWrlUbMNSWEo1kaK1efaErLjzx8GZZmd JEY+3ijITdB6LPVGxw5aBfQ5ReUQtQZzkfj077VNGe2s7jnuCekJiG7kegjgVpc0xSw4 wVtWcTV7OeUVylttif7LsidJpo3N/EVV/vkyFI2lmkkbRWiFA9wFq7ldpwWh6QaSKwkR MEGA== 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=Cy32MWV8KYEmUS1RyGwWX/yQEjQBWMj/hXAbB2FpSbs=; b=OG1fLq4MRQ/kUSFvj1zl6MtNT4JDt1H/AqY+MPMeOQKkxghKW7vSaooGzA8rAHnMm1 FqE3iEEdt5UZ6IjNw9JHuGvuF6fInbdK6v2AxFqPvoWrL/CzaaHL8tdjr31JS/3toq9b ui4Oiwe/0lIlSnxejxA2zEGjW9Ag1xkO8DTX4wTMKgvSoPgfvvjzJJ87Ftlx8uF+1i9p ip888ZWLt8l9jp8/Ker61Leg5vG1wd596nDOUCmzGEbzNHySUPCiVGWChMaf19N0prYt 4nTiwkdOqbb9Yw27xToulw9DupfjnKBeNuKj2g+wkCu9hIX/J5vx/yQjkkc8KhR2dr2M ohZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=Vs4RNIpS; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=1SbjYncY; 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 t8-20020a17090340c800b00174d5f0b346si2173932pld.91.2022.08.29.06.50.23; Mon, 29 Aug 2022 06:50:35 -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=Vs4RNIpS; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=1SbjYncY; 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 S229588AbiH2N1g (ORCPT + 99 others); Mon, 29 Aug 2022 09:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiH2N1F (ORCPT ); Mon, 29 Aug 2022 09:27:05 -0400 Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19957832DF for ; Mon, 29 Aug 2022 06:25:48 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 3C1002B06079; Mon, 29 Aug 2022 09:15:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 29 Aug 2022 09:15:16 -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=1661778912; x= 1661786112; bh=Cy32MWV8KYEmUS1RyGwWX/yQEjQBWMj/hXAbB2FpSbs=; b=V s4RNIpSxGeLQo1UWIoyjlMUQe2kKesyCj00VfmTnmA9s9809cRUTc1FY6i9RyLIS o6oM8OQNSa+LoOX3ilxktbPyOqhY28lk4l95SvMzowQnC9i7p5nNgJ+rurtgqQyR aeKWX5TaqBTFDj86loR8aBpYmX7U5HYNwGwjezJukbNFdSVgPkdFtkecMyb2Lk+Y BnrNI8xva/TuVhnCFcRtSZawg0rT2jeMmFkJ2z/5yT9L202/xHzYGwr99BwEWN63 I4yy9eVWAtJNKlexbdCQaoYoXFei+8wrwoRNAdgdnLwDkxVPXxomadxKHK2vv7GG nI6r74d/X93ysd/fCssdA== 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=1661778912; x= 1661786112; bh=Cy32MWV8KYEmUS1RyGwWX/yQEjQBWMj/hXAbB2FpSbs=; b=1 SbjYncYrBzBlWAhPZio1zMuS1gF3Tuw/UJSvnjsxHB4IMZNtXjgSRIyC9PJzxZbY dZ0wibnoYzomzbiK8gCH2DqK5gu/uSlLRgnIhbGDbVNrgt79CGRwS5oUbG0UXwHe OES/fBSbLfjGtD65t7dVE8ckm8biUqW6CW1N9Oo0bS51SYvj/nZ0cAcK/0SvXnu+ /Ma6rIq0xRHU98/CSilD292MvmY81AkEeMY4RrQMI9oXLbK6YHxHL/CHX5c+TVN3 gqxrYZK/M0qmCBe3ZeoaJdishLgqIg+cWaIWH3zukyx17ec/M8EWR4E15cqPfAkZ N7O0RSVVjvdch78d1oTJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekuddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfogfesthhqredtredtjeenucfhrhhomhepofgr gihimhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtf frrghtthgvrhhnpeefiedvfefggffgffehveejieffuddtgffhjefggeetieduvdeileet lefgveegtdenucevlhhushhtvghrufhiiigvpeefnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Aug 2022 09:15:11 -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 29/41] drm/vc4: vec: Switch for common modes Date: Mon, 29 Aug 2022 15:11:43 +0200 Message-Id: <20220728-rpi-analog-tv-properties-v2-29-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=1771; i=maxime@cerno.tech; h=from:subject:message-id; bh=ul/McL233i67f1nEv4GMQq5Y+Mz3yULy3JKyqht7K6U=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMk8uxScppTyPA6c1CT3/72hZHRYkmxbl0+oeE+68H7NMBaG KYc7SlkYxLgYZMUUWWKEzZfEnZr1upONbx7MHFYmkCEMXJwCMBGp1YwMUyYynfdOaz62c20d82dHjm enCsvPav52uCj7gfsoe0FJFyPD2u7zHxnX1Zy8rrFL0sB8sodJRpxW3O6ym1V+q6tV0zx5AA== 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 Now that the core has a definition for the 525 and 625 lines analog TV=0D modes, let's switch to it for vc4.=0D =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 d1d40b69279e..63e4e617e321 100644=0D --- a/drivers/gpu/drm/vc4/vc4_vec.c=0D +++ b/drivers/gpu/drm/vc4/vc4_vec.c=0D @@ -224,38 +224,24 @@ static const struct debugfs_reg32 vec_regs[] =3D {=0D VC4_REG32(VEC_DAC_MISC),=0D };=0D =0D -static const struct drm_display_mode ntsc_mode =3D {=0D - DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 13500,=0D - 720, 720 + 14, 720 + 14 + 64, 720 + 14 + 64 + 60, 0,=0D - 480, 480 + 7, 480 + 7 + 6, 525, 0,=0D - DRM_MODE_FLAG_INTERLACE)=0D -};=0D -=0D -static const struct drm_display_mode pal_mode =3D {=0D - DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 13500,=0D - 720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0,=0D - 576, 576 + 4, 576 + 4 + 6, 625, 0,=0D - DRM_MODE_FLAG_INTERLACE)=0D -};=0D -=0D static const struct vc4_vec_tv_mode vc4_vec_tv_modes[] =3D {=0D [VC4_VEC_TV_MODE_NTSC] =3D {=0D - .mode =3D &ntsc_mode,=0D + .mode =3D &drm_mode_480i,=0D .config0 =3D VEC_CONFIG0_NTSC_STD | VEC_CONFIG0_PDEN,=0D .config1 =3D VEC_CONFIG1_C_CVBS_CVBS,=0D },=0D [VC4_VEC_TV_MODE_NTSC_J] =3D {=0D - .mode =3D &ntsc_mode,=0D + .mode =3D &drm_mode_480i,=0D .config0 =3D VEC_CONFIG0_NTSC_STD,=0D .config1 =3D VEC_CONFIG1_C_CVBS_CVBS,=0D },=0D [VC4_VEC_TV_MODE_PAL] =3D {=0D - .mode =3D &pal_mode,=0D + .mode =3D &drm_mode_576i,=0D .config0 =3D VEC_CONFIG0_PAL_BDGHI_STD,=0D .config1 =3D VEC_CONFIG1_C_CVBS_CVBS,=0D },=0D [VC4_VEC_TV_MODE_PAL_M] =3D {=0D - .mode =3D &pal_mode,=0D + .mode =3D &drm_mode_576i,=0D .config0 =3D VEC_CONFIG0_PAL_BDGHI_STD,=0D .config1 =3D VEC_CONFIG1_C_CVBS_CVBS | VEC_CONFIG1_CUSTOM_FREQ,=0D .custom_freq =3D 0x223b61d1,=0D =0D -- =0D b4 0.10.0-dev-65ba7=0D