Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1404435rwb; Fri, 19 Aug 2022 03:09:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR7F/dz+m/CIBzbAS+hgUHjEExV9jeT73pS/FH8qX5XfV3tHdHsStucyhsWFzHMLgt51A4Tn X-Received: by 2002:a17:906:216:b0:711:f623:8bb0 with SMTP id 22-20020a170906021600b00711f6238bb0mr4655097ejd.174.1660903766701; Fri, 19 Aug 2022 03:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660903766; cv=none; d=google.com; s=arc-20160816; b=rx4iX6v2p1azgQ/TlwIDc390/UKfU0WywCSRVVhdu3K8AHVDronSnqBMqaz++rV4Qr H5L8yeV7VfNachFHBql49XBC7EhksLf8na+So9LIi1jhNFYXm1QEyuH5XgugPLi1Xzdy xTxtTmzwah0X46Ue6J3bBpwoJ/8ONAHKLibhpxsIKqnBh2m4ImRC5VQHi+IQIL0JLGXZ 7z5CbRHvkpLIKWH212LRu8rzII/FDz6ZYJ8C8MSO9x/aJ35XW40hDn5vx/bBkW7WmMJs 6TOpR3YZBwE0WcnNcgma6xhqqvihbxWWFXqkuHPSddireaaZGVUItJ0ITUPq51GEm9Nz 6FMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=oXk24pt8yzz//H9K/Ms8QIvLemhYFXzzYPTlQRFRJUQ=; b=clJUhKRdSFlYoE8vLAJbvwTNHJ1CIBzN3tT7XT7D9d653Jv+IqIP4ZRt/LehK66bGg i0GB6W9xVvNoy44JVEgStjazhMU9LJMXSnnmr3R80gOfSz273cV70WqdG7ZGyXZ2Iqx7 GRD3qBuk/IhytCdF3W/wd9JvC/6f10JF+3xmoKHLOXoUqh1OOJ9KzhFJJ+f4Fzsg0WbB dkMcuEOJmaz1oE5YfVhdikHNCO5qyCe9DhXDb31zvs8YFFEZM2day5HtM08A3MJ2Almr CGXvrX9BOvSxWrijGo3Zp2+xH+3u9nepIrKWwgoTLQX6wVlSyMzOaDuNLRiEYaZulXS5 cZDg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb9-20020a1709077e8900b00706fe017e89si2908023ejc.880.2022.08.19.03.09.01; Fri, 19 Aug 2022 03:09:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346630AbiHSJf7 (ORCPT + 99 others); Fri, 19 Aug 2022 05:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229955AbiHSJf5 (ORCPT ); Fri, 19 Aug 2022 05:35:57 -0400 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B131D21CA for ; Fri, 19 Aug 2022 02:35:55 -0700 (PDT) Received: by mail-qv1-f53.google.com with SMTP id b2so2976156qvp.1 for ; Fri, 19 Aug 2022 02:35:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=oXk24pt8yzz//H9K/Ms8QIvLemhYFXzzYPTlQRFRJUQ=; b=d+DsZwN5LfRCFd+Pw64FVQK5thqlkAc9dJKIWMGmDWEEAv/AUIPRZHm9QS0spuVc4n u7qDSAGNgnEHyNHerAJ57mQDxf7YmXs+mJU7llkCnOCnZbphrbfv/tMQRlZ77dh0aUpu Npd8PbIN6MkZHjunvE1CMXpHlsoxS22HM+vLg2BnUYQLPk1AM+ZjCPGe0KtTtkVN7Fw8 1nmtSh9U/0EE7y/V0+xVtpHyJERkkO+gZmK87vf/NcpvMa8O4lA4Wk5CU/JgYw3q1McP jxujSfNJZ+HqyHQ+QWGxh5W9W/nDFmkKJHN8o1j7Ci6dGMyG6XjskSUj8lHiWPjjK7fu hjAg== X-Gm-Message-State: ACgBeo1fbeVgCVSkUY4p41V4LOW1HzkHqLPzHxZP/iqcKeznZGO1BHzT ItnSK4+6RlSzSrVLPk5bZvlxhTHt1kxT5w== X-Received: by 2002:a0c:90a2:0:b0:47b:6b36:f94a with SMTP id p31-20020a0c90a2000000b0047b6b36f94amr5580495qvp.26.1660901754134; Fri, 19 Aug 2022 02:35:54 -0700 (PDT) Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com. [209.85.128.174]) by smtp.gmail.com with ESMTPSA id d22-20020ac847d6000000b0034367ec57ecsm2753902qtr.9.2022.08.19.02.35.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Aug 2022 02:35:53 -0700 (PDT) Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-33365a01f29so107295897b3.2 for ; Fri, 19 Aug 2022 02:35:53 -0700 (PDT) X-Received: by 2002:a81:b812:0:b0:328:68e4:c886 with SMTP id v18-20020a81b812000000b0032868e4c886mr6398447ywe.502.1660901753206; Fri, 19 Aug 2022 02:35:53 -0700 (PDT) MIME-Version: 1.0 References: <20220816154956.pkdpxmmw27mia5ix@houat> <20220817074710.w4c4xwj7edly2b5p@houat> <20220817111454.pn2iltvyo2drebq7@houat> <20220817131854.jwmhqvhfhp77bbr3@houat> <20220818145436.vqojnhmvhjxdzooe@houat> <20220818153442.u4knumkfbe7j6zj3@houat> In-Reply-To: <20220818153442.u4knumkfbe7j6zj3@houat> From: Geert Uytterhoeven Date: Fri, 19 Aug 2022 11:35:42 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 05/35] drm/connector: Add TV standard property To: Maxime Ripard Cc: 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=C3=B8nnes?= , Kevin Hilman , Neil Armstrong , linux-sunxi@lists.linux.dev, Linux Kernel Mailing List , Phil Elwell , Mateusz Kwiatkowski , Linux ARM , Dave Stevenson , "open list:ARM/Amlogic Meson..." , DRI Development , Dom Cobley Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Maxime, On Thu, Aug 18, 2022 at 5:34 PM Maxime Ripard wrote: > On Thu, Aug 18, 2022 at 05:20:42PM +0200, Geert Uytterhoeven wrote: > > On Thu, Aug 18, 2022 at 4:54 PM Maxime Ripard wrote: > > > On Wed, Aug 17, 2022 at 04:04:24PM +0200, Geert Uytterhoeven wrote: > > > > On Wed, Aug 17, 2022 at 3:19 PM Maxime Ripard wrote: > > > > > On Wed, Aug 17, 2022 at 03:05:52PM +0200, Geert Uytterhoeven wrote: > > > > > > On Wed, Aug 17, 2022 at 1:15 PM Maxime Ripard wrote: > > > > > > > On Wed, Aug 17, 2022 at 10:35:07AM +0200, Geert Uytterhoeven wrote: > > > > > > > > On Wed, Aug 17, 2022 at 9:47 AM Maxime Ripard wrote: > > > > > > > > > On Wed, Aug 17, 2022 at 09:31:18AM +0200, Geert Uytterhoeven wrote: > > > > > > > > > > On Tue, Aug 16, 2022 at 5:50 PM Maxime Ripard wrote: > > > > > > > > > > > On Tue, Aug 16, 2022 at 04:43:44PM +0200, Geert Uytterhoeven wrote: > > > > > > > > > > > > > > > > Either you have to add them here (e.g. "hd720p50" and "hd720p60"), or > > > > > > > > > > > > > > > > handle them through "@". The latter would impact "[PATCH v1 > > > > > > > > > > > > > > > > 09/35] drm/modes: Move named modes parsing to a separate function", as > > > > > > > > > > > > > > > > currently a named mode and a refresh rate can't be specified both. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I think the former would make more sense. It simplifies a bit the > > > > > > > > > > > > > > > parser, and we're going to use a named mode anyway. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > As "[PATCH v1 34/35] drm/modes: Introduce the tv_mode property as a > > > > > > > > > > > > > > > > command-line option" uses a separate "tv_mode" option, and not the main > > > > > > > > > > > > > > > > mode name, I think you want to add them here. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > It's a separate story I think, we could have a named mode hd720p50, > > > > > > > > > > > > > > > which would be equivalent to 1280x720,tv_mode=hd720p > > > > > > > > > > > > > > > > > > > > > > > > > > > > So where's the field rate in "1280x720,tv_mode=hd720p"? > > > > > > > > > > > > > > > > > > > > > > > > > > Yeah, sorry I meant 1280x720@50,tv_mode=hd720p > > > > > > > > > > > > > > > > > > > > > > > > Above you said "I think the former would make more sense", so that > > > > > > > > > > > > should be "1280x720,tv_mode=hd720p50"? > > > > > > > > > > > > > > > > > > > > > > No, 720p at 50Hz would be either hd720p50 or 1280x720@50,tv_mode=hd720p > > > > > > > > > > > and 60Hz would be hd720p60 or 1280x720@60,tv_mode=hd720p > > > > > > > > > > > > > > > > > > > > I disagree: hd720p50 and hd720p60 are different TV modes. > > > > > > > > > > > > > > > > > > I agree, and I don't see how that command-line doesn't express that? > > > > > > > > > > > > > > > > Oh, I see what you mean: yes, it expresses that. > > > > > > > > But it is inconsistent with the NTSC/PAL/SECAM/hd{480,576}[ip] modes, > > > > > > > > where the TV mode specifies both number of lines and frame rate. > > > > > > > > > > > > > > Only if we're using a named mode, and naming is hard :) > > > > > > > > > > > > That's not true: "640x480,tv_mode=PAL-N" would give me a mode with > > > > > > 625 lines and 25 frames/s, "640x480,tv_mode=PAL-M" would give me a > > > > > > mode with 525 lines and 30 frames/s. > > > > > > > > > > In that series, "640x480,tv_mode=PAL-N" would be rejected as invalid: > > > > > > > > > > https://lore.kernel.org/dri-devel/20220728-rpi-analog-tv-properties-v1-14-3d53ae722097@cerno.tech/ > > > > > > > > It would become supported once the ideas from thread "[PATCH v1 04/35] > > > > drm/modes: Introduce 480i and 576i modes" are implemented... > > > > > > Indeed, but I'm still not sure what your concern is here. > > > "640x480,tv_mode=PAL-N" and "640x480,tv_mode=PAL-M" are both fairly > > > obvious. > > > > > > You were initially saying that you had concern over the inconsistency of > > > NTSC/PAL/SECAM where the TV mode would specify a number of lines and > > > frame rate, but hd720p50 also specifies a number of line and frame rate? > > > > My concern is that you want to call the TV mode "hd720p", which > > does not dictate the frame rate. > > I would like to have both "720p50" and "720p60", as they do dictate > > the frame rate, like all the non-hd modes. > > But they don't? > > The refresh rate is part of the drm_display_mode, whereas that property > is metadata and entirely separate from the display mode. > > You can even change it without changing the mode at all Yes, the refresh rate is part of drm_display_mode. Vdisplay also is, but that doesn't mean you can set it to e.g. 700 when using "tv_mode=PAL-B". Some (combination of) parameters in drm_display_mode are dictated by the tv_mode. Perhaps the meaning of "tv_mode" should be clarified? What does it really mean, and what parameters does it (not) constrain? For e.g. "PAL-B", I know it's a mode with 625 lines and 30 frames/s (60 fields/s). For "hd720p" I know it is an analog mode with 750 lines, but it's still ambiguous, as I don't know if it is the variant with 60 or 50 frames/s. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds