From patchwork Fri Jul 29 16:35:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12932679 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 BCD84C3F6B0 for ; Fri, 29 Jul 2022 16:48:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C1AD9113994; Fri, 29 Jul 2022 16:48:16 +0000 (UTC) Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD52F10EE19 for ; Fri, 29 Jul 2022 16:45:49 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 35C1C580958; Fri, 29 Jul 2022 12:36:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 29 Jul 2022 12:36:37 -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=1659112597; x= 1659119797; bh=QyYw7OCb4iELB70lA7+S6FjFkfGV+YHQwCHgKMsUsIQ=; b=o TEzK8SIfcfoiY5x/7vrn2J0SLTvfDUe9zeNnud6vRk/aGuw7w9k/1AOHMhymZlju 6FReCAdJHFM1W7mPtq4l8lXDIvSdXz9YDZb0YLGGPglTQeLdYbATPYJ0FGiTgHL2 v41xpJ2nE5fdoF1GWEMPSjhoT2Bk1nJg8QkWwiSx88QMUPqrcUzKndCRybY38PZL p1R7oYDxvscuq5GCmkFNf6amk/+qfLmiSe81wcAmrmqfX46TsumvO9iGFzbymuMP BY7M6uB1//aLX5SC7/oP7OIeBQdi9/ezLc3yQeWeSC3ESu4a54Wd7636+MmiXCC6 6XwDkrVA/9raiViYSGoOw== 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=1659112597; x= 1659119797; bh=QyYw7OCb4iELB70lA7+S6FjFkfGV+YHQwCHgKMsUsIQ=; b=B 85luZFUzlSjbjkxCLpZK/eRh/Npt9arGV9rg54cWMrcEqgBmYxgrrS3+D9GyaAgL 9TH+imU16EKfhHyjCy9i2A2hfE18C6PbJSJQU8wdijRD19OsOTbOHbWmuiFqzDuV XeJ+EOCKEl5p6e74K66ksxkpKDX0mxUakqMGMA1+xruxsOr94Y9i7WFadgk8lZco 2lr+7jc6RgVGj3uz9lBF7PaqIUqW69l49hu2gNdfCzow8l/kBu5cKYjktCm8V/ro h1TTZdqFZZCprsWXvo5rXb8A8Xh2eRR8Rhgh3P23lyHSCzbLA57QUzxvrAuwo09Z Hscz9lDwm6SHuET/KWW9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvddujedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkffojghfgggtoffgsehtkeertdertdejnecuhfhrohhmpefo rgigihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecugg ftrfgrthhtvghrnhepgfffgfetffduudelhfevieffffduleevgfegkeeutefgffejheel leekjeefhfejnecuvehluhhsthgvrhfuihiivgepheenucfrrghrrghmpehmrghilhhfrh homhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 29 Jul 2022 12:36:36 -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_Tr?= =?utf-8?q?=C3=B8nnes?= , Kevin Hilman , Neil Armstrong , Maxime Ripard Subject: [PATCH v1 19/35] drm/vc4: vec: Fix timings for VEC modes Date: Fri, 29 Jul 2022 18:35:02 +0200 Message-Id: <20220728-rpi-analog-tv-properties-v1-19-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 X-Mailer: b4 0.10.0-dev-49460 X-Developer-Signature: v=1; a=openpgp-sha256; l=1308; i=maxime@cerno.tech; h=from:subject:message-id; bh=BF/F1zqV7xnXUIXuBsatYgDnOOiGXWuOYvkpiq7EQDQ=; b=owGbwMvMwCHc4XzqmfnC7acZT6slMSQ94VHKrS+pOu3CznUuw6v3rlZC6799G+dzztqgdELnqP/7 ezc/dZSyMAhzMMiKKbJcF3xrxxcW5RbB82EzzBxWJpAhDFycAjCRov8Mv5he1r+Z+X+GXb3U25Nf2X U+xT6+xc/NdkbTcGlN4g9PTUNGhg2xvFYHnJ00ygv3NfL/1S+oySjXvPw5POj7I8vT12f9FAcA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Dave Stevenson , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Mateusz Kwiatkowski , Geert Uytterhoeven , Maxime Ripard , linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Mateusz Kwiatkowski This commit fixes vertical timings of the VEC (composite output) modes to accurately represent the 525-line ("NTSC") and 625-line ("PAL") ITU-R standards. Previous timings were actually defined as 502 and 601 lines, resulting in non-standard 62.69 Hz and 52 Hz signals being generated, respectively. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard diff --git a/drivers/gpu/drm/vc4/vc4_vec.c b/drivers/gpu/drm/vc4/vc4_vec.c index a9fefd92f0f1..8f30a530b2d5 100644 --- a/drivers/gpu/drm/vc4/vc4_vec.c +++ b/drivers/gpu/drm/vc4/vc4_vec.c @@ -227,14 +227,14 @@ static const struct debugfs_reg32 vec_regs[] = { static const struct drm_display_mode ntsc_mode = { DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 13500, 720, 720 + 14, 720 + 14 + 64, 720 + 14 + 64 + 60, 0, - 480, 480 + 3, 480 + 3 + 3, 480 + 3 + 3 + 16, 0, + 480, 480 + 7, 480 + 7 + 6, 525, 0, DRM_MODE_FLAG_INTERLACE) }; static const struct drm_display_mode pal_mode = { DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 13500, 720, 720 + 20, 720 + 20 + 64, 720 + 20 + 64 + 60, 0, - 576, 576 + 2, 576 + 2 + 3, 576 + 2 + 3 + 20, 0, + 576, 576 + 4, 576 + 4 + 6, 625, 0, DRM_MODE_FLAG_INTERLACE) };