Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp666845rwb; Sat, 1 Oct 2022 06:29:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UzHv1v0XjkiU3CTCIJYDEOgc1UCUQP7ffhHjuxZSDZs7nEvHB9OcOh7hIRKABFDury85h X-Received: by 2002:a17:907:6089:b0:783:592a:5d3f with SMTP id ht9-20020a170907608900b00783592a5d3fmr10023376ejc.385.1664630975068; Sat, 01 Oct 2022 06:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664630975; cv=none; d=google.com; s=arc-20160816; b=Vaye8GMgoeDke/8QMv6aEiIy52SPt1gqy4rfiNIL0u5DlwRHaXXTgz4cJq0ZMYntLo mC6OBVGWl06FUuP04MR8y7ajsIKb76e+Oy04YY6biWdVHn2iKrXGQGt2UE05pfFgTGBX FioD1mOZ7PzZFwR84nNCxNzODy+9Kf7PeLeERLCFNbHTHbubx20tfpGzblFMvV5BcGA5 hMCCpXLV1zvY/HIgGu/tsenIwfliUYttHaoBYoOdXx3sVvM/M/I+syldsMUUqY1bZ70W kNkMPbSx8eIAUszyzrO4pcoG51PfcXJltiUVZXZ5SpDEoZyRpX89CRsFX9EPWwGrLxsz qfig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=xm3k3rXTAnM3/xBtTJRt1rIfPDOB6Gc4ge2d1vnIVMQ=; b=VAw2Z1ksaGkMV8KPYaOdf/wqmBq34I9VL/W2tl2aXY0VdN09C33CCQ95G9RZO2jfTb NiqOAegMXakozULQ0zkXF7Cqh+R+lHWhMyEEuVSWY3OGO+Y0XrA3R7F2FdPAQQT/Z4DT 0dWjXaRxWzS0syrZpIMQA1hMSGHa6BKkNKJUo5Vgud+BSJg4SEKsRGCXqW85t/E1YK2t edGbCZ7Dtq/vHaSeOgweXQFyhUqLvDZmu0+BS5y5G5Apr3YY3vxn5N+xSdTpOw0AzubZ q2gvFzqhWyLg2kw+QEMifAyKcmsC4dsVN2xbJrcLj/wcDT9a2rH1iqxJl4goKqlVYEHx 4yxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tronnes.org header.s=ds202112 header.b=BI4lHTeK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=tronnes.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a056402511200b00458525f9349si4640271edd.253.2022.10.01.06.29.09; Sat, 01 Oct 2022 06:29: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=fail header.i=@tronnes.org header.s=ds202112 header.b=BI4lHTeK; 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=fail (p=NONE sp=NONE dis=NONE) header.from=tronnes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229464AbiJANMT (ORCPT + 99 others); Sat, 1 Oct 2022 09:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbiJANMS (ORCPT ); Sat, 1 Oct 2022 09:12:18 -0400 Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EFCB43173 for ; Sat, 1 Oct 2022 06:12:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org ; s=ds202112; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=xm3k3rXTAnM3/xBtTJRt1rIfPDOB6Gc4ge2d1vnIVMQ=; b=BI4lHTeKnCtdWww6MSKbeGl4uV VsTh3DKF4fINvj8Zr4SEnGvHBeNPn8XaA+liKHN0D5DDaL2uaWmFB7nMA1wteQP4Um8gqKD3BaspB HJBu3ByVglpIMAGg5gpTAIq5D7UprmsY/KzWo8RRbUEKCjugXwS4xuJSOwWOWWq0LwirIcjRMgp+n uZoFtOq2U2LKJmewAnGrQsC7X8DlLRxS/HHwx7bswRS2D5a3FF885zOom4T/6GkKLiQetg4e2b5xM AuRq8h1wAY0U4hGcBZQ005Nnjg4u7RchLaPQQF5mUZt2mb+sDLlNoqLq4ArIP9xzrgdxjG1Z4DRQ/ aLAf9/GA==; Received: from [2a01:799:961:d200:138:ce02:d9d4:d972] (port=61118) by smtp.domeneshop.no with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oecHr-0005NI-V7; Sat, 01 Oct 2022 15:12:12 +0200 Message-ID: <0db1c833-eeee-cadd-b050-837d79a3d691@tronnes.org> Date: Sat, 1 Oct 2022 15:12:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v4 00/30] drm: Analog TV Improvements To: Maxime Ripard , 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 Cc: linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Geert Uytterhoeven , intel-gfx@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Hans de Goede , nouveau@lists.freedesktop.org, Mateusz Kwiatkowski , Dave Stevenson , linux-kernel@vger.kernel.org, Dom Cobley , Phil Elwell , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= References: <20220728-rpi-analog-tv-properties-v4-0-60d38873f782@cerno.tech> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= In-Reply-To: <20220728-rpi-analog-tv-properties-v4-0-60d38873f782@cerno.tech> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,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 Den 29.09.2022 18.30, skrev Maxime Ripard: > Hi, > > Here's a series aiming at improving the command line named modes support, > and more importantly how we deal with all the analog TV variants. > > The named modes support were initially introduced to allow to specify the > analog TV mode to be used. > > However, this was causing multiple issues: > > * The mode name parsed on the command line was passed directly to the > driver, which had to figure out which mode it was suppose to match; > > * Figuring that out wasn't really easy, since the video= argument or what > the userspace might not even have a name in the first place, but > instead could have passed a mode with the same timings; > > * The fallback to matching on the timings was mostly working as long as > we were supporting one 525 lines (most likely NSTC) and one 625 lines > (PAL), but couldn't differentiate between two modes with the same > timings (NTSC vs PAL-M vs NSTC-J for example); > > * There was also some overlap with the tv mode property registered by > drm_mode_create_tv_properties(), but named modes weren't interacting > with that property at all. > > * Even though that property was generic, its possible values were > specific to each drivers, which made some generic support difficult. > > Thus, I chose to tackle in multiple steps: > > * A new TV mode property was introduced, with generic values, each driver > reporting through a bitmask what standard it supports to the userspace; > > * This option was added to the command line parsing code to be able to > specify it on the kernel command line, and new atomic_check and reset > helpers were created to integrate properly into atomic KMS; > > * The named mode parsing code is now creating a proper display mode for > the given named mode, and the TV standard will thus be part of the > connector state; > > * Two drivers were converted and tested for now (vc4 and sun4i), with > some backward compatibility code to translate the old TV mode to the > new TV mode; > > Unit tests were created along the way. > > One can switch from NTSC to PAL now using (on vc4) > > modetest -M vc4 -s 53:720x480i -w 53:'TV mode':1 # NTSC > modetest -M vc4 -s 53:720x576i -w 53:'TV mode':4 # PAL > > Let me know what you think, > Maxime > I suggest that you apply the patches that are reviewed, have merrit on their own and are not tied to the TV mode property. This will help in keeping this rather big patchset focused and ease the task for reviewers. The following seems to be in that group: drm/tests: Order Kunit tests in Makefile drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity drm/connector: Rename subconnector state variable drm/atomic: Add TV subconnector property to get/set_property drm/modes: Only consider bpp and refresh before options drm/modes: parse_cmdline: Add support for named modes containing dashes drm/vc4: vec: Fix definition of PAL-M mode Noralf.