From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DD9C4C54EE9 for ; Fri, 2 Sep 2022 07:36:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SR1JI2uw7pMS2oA7gT0aBqaMTWIVeJWKrTlP6kpTNRY=; b=ekb+5fKhKk/cTZ /B5U/EY61xWM4Lrpu6JGaYq8VxdFyn0DPdK2bNV63IoZTB2mOeeNK9Qmyf3QiSF/OVvRSlDFY5rW3 e/F0Sz84+xrGQnhSzSSDLhHcoEgOhIqg8ZPHCjbjSVNNoByfxu0AwdE+Lu1WmTtwcPLDPIVmvm3Ia dk7ETrDZzvtW232FvZNWAX6/ekgDZQ3V5EihyXhvtmHlPLDvSwxb11txLAnLPNWDnrheDMVuhxSDZ PUdUM/vT/8xKTACZ4MYigN0yIJT9RxEwzH+QIIn6xC6lejdty9dlwaZ+oIfsVLO1y6q3s91Ah0ynZ cx3Q4OvPmE0nVwFqAEcQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1DG-001LbG-HO; Fri, 02 Sep 2022 07:35:38 +0000 Received: from mail-qv1-f41.google.com ([209.85.219.41]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1DE-001LXh-58 for linux-arm-kernel@lists.infradead.org; Fri, 02 Sep 2022 07:35:37 +0000 Received: by mail-qv1-f41.google.com with SMTP id kh8so862993qvb.1 for ; Fri, 02 Sep 2022 00:35:34 -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:subject:date; bh=I0BzN+oySEF5bQ4YY03gLnpAlLeJEFGcm1NmTucRGdY=; b=EaLlEkeM17X/4M9tyrr18lL3hTxzG/3hOdwwD5sWlBY6aWj0hK2UcFtoYmxnzYI2a7 ZWEPl3hJOe4sKnuuU716rYH56nIwVEqCfTUE98OhWpxnvXxPnKfOXMypQ5jXpM+wK/Oy dJk4vU1FiCPss+gzJkp7/r4D4K9TSahS5xEP5FrlvWUs8n4TFEmnF7Hu9qFL0z8CNPkz UNQOH0AlewIYJ4OjuptcWylZrbcQWjZK0s0tm5xwMSEyxbyMTfYZe1bJoz6dN/g5r612 xxBSv131pj1fJMqxDq/n2b3VdptBvIib1X4oggG/afwYKd4/q1Sy5KP++3yxCXXcV9Lf 5wKA== X-Gm-Message-State: ACgBeo2Z/uPiqw3Ke474LbrvZnXi6XiwNuVP2L6X6blrmhyN6+Q5psIY P6YzjxH2ULpji1LQA87lEBd1Jo033MXRUA== X-Google-Smtp-Source: AA6agR5PZS5exIRvjYBiznu1Rd5uONZEVm/KdhmwU6/J6Bq3AE8WJV3wc9u9NNrlL/v8NjLCrpwF0Q== X-Received: by 2002:a05:6214:5001:b0:499:2291:4eab with SMTP id jo1-20020a056214500100b0049922914eabmr9016188qvb.57.1662104133179; Fri, 02 Sep 2022 00:35:33 -0700 (PDT) Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com. [209.85.128.181]) by smtp.gmail.com with ESMTPSA id w22-20020a05620a445600b006bb83c2be40sm924833qkp.59.2022.09.02.00.35.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Sep 2022 00:35:32 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-3376851fe13so8784977b3.6 for ; Fri, 02 Sep 2022 00:35:31 -0700 (PDT) X-Received: by 2002:a81:750b:0:b0:341:10ef:2c37 with SMTP id q11-20020a81750b000000b0034110ef2c37mr20502429ywc.316.1662104131692; Fri, 02 Sep 2022 00:35:31 -0700 (PDT) MIME-Version: 1.0 References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-9-459522d653a7@cerno.tech> <30a9d7cd-d9ff-3177-ac6c-e7c1f966d89a@gmail.com> In-Reply-To: <30a9d7cd-d9ff-3177-ac6c-e7c1f966d89a@gmail.com> From: Geert Uytterhoeven Date: Fri, 2 Sep 2022 09:35:20 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 09/41] drm/connector: Add TV standard property To: Mateusz Kwiatkowski Cc: Maxime Ripard , 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_Tr=C3=B8nnes?= , Emma Anholt , Daniel Vetter , Joonas Lahtinen , Hans de Goede , Linux ARM , Phil Elwell , Intel Graphics Development , Dave Stevenson , DRI Development , Dom Cobley , Linux Kernel Mailing List , Nouveau Dev , linux-sunxi@lists.linux.dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220902_003536_211402_B14ADE8C X-CRM114-Status: GOOD ( 37.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mateusz, On Fri, Sep 2, 2022 at 12:00 AM Mateusz Kwiatkowski wrote: > W dniu 29.08.2022 o 15:11, Maxime Ripard pisze: > > The TV mode property has been around for a while now to select and get the > > current TV mode output on an analog TV connector. > > > > Despite that property name being generic, its content isn't and has been > > driver-specific which makes it hard to build any generic behaviour on top > > of it, both in kernel and user-space. > > > > Let's create a new bitmask tv norm property, that can contain any of the > > analog TV standards currently supported by kernel drivers. Each driver can > > then pass in a bitmask of the modes it supports. > > This is not a bitmask property anymore, you've just changed it to an enum. > The commit message is now misleading. > > > +static const struct drm_prop_enum_list drm_tv_mode_enum_list[] = { > > + { DRM_MODE_TV_MODE_NTSC_443, "NTSC-443" }, > > + { DRM_MODE_TV_MODE_NTSC_J, "NTSC-J" }, > > + { DRM_MODE_TV_MODE_NTSC_M, "NTSC-M" }, > > + { DRM_MODE_TV_MODE_PAL_60, "PAL-60" }, > > + { DRM_MODE_TV_MODE_PAL_B, "PAL-B" }, > > + { DRM_MODE_TV_MODE_PAL_D, "PAL-D" }, > > + { DRM_MODE_TV_MODE_PAL_G, "PAL-G" }, > > + { DRM_MODE_TV_MODE_PAL_H, "PAL-H" }, > > + { DRM_MODE_TV_MODE_PAL_I, "PAL-I" }, > > + { DRM_MODE_TV_MODE_PAL_M, "PAL-M" }, > > + { DRM_MODE_TV_MODE_PAL_N, "PAL-N" }, > > + { DRM_MODE_TV_MODE_PAL_NC, "PAL-Nc" }, > > + { DRM_MODE_TV_MODE_SECAM_60, "SECAM-60" }, > > + { DRM_MODE_TV_MODE_SECAM_B, "SECAM-B" }, > > + { DRM_MODE_TV_MODE_SECAM_D, "SECAM-D" }, > > + { DRM_MODE_TV_MODE_SECAM_G, "SECAM-G" }, > > + { DRM_MODE_TV_MODE_SECAM_K, "SECAM-K" }, > > + { DRM_MODE_TV_MODE_SECAM_K1, "SECAM-K1" }, > > + { DRM_MODE_TV_MODE_SECAM_L, "SECAM-L" }, > > +}; > > I did not comment on it the last time, but this list looks a little bit random. > > Compared to the standards defined by V4L2, you also define SECAM-60 (a good > thing to define, because why not), but don't define PAL-B1, PAL-D1, PAL-K, > SECAM-H, SECAM-LC (whatever that is - probably just another name for SECAM-L, > see my comment about PAL-Nc below), or NTSC-M-KR (a Korean variant of NTSC). > > Like I mentioned previously, I'm personally not a fan of including all those > CCIR/ITU system variants, as they don't mean any difference to the output unless > there is an RF modulator involved. But I get it that they have already been used > and regressing probably wouldn't be a very good idea. But in that case keeping > it consistent with the set of values used by V4L2 would be wise, I think. Exactly. Anything outputting RGB (e.g. through a SCART or VGA connector) doesn't care about the color subcarrier or modulator parts. Likewise, anything outputting CVBS doesn't care about the modulator part. Perhaps "generic" variants of NSTC and PAL/SECAM should be added, which would really just mean 525/60 resp. 625/50. Alternatively, the tv_mode field could be split in two parts (either two separate fields, or bitwise), to maintain a clear separation between lines/fields versus color encoding and RF modulation (with zero for the latter meaning a generic version)? That would also keep the door open for TV_MODE_405_50, TV_MODE_819_50, TV_MODE_750_50, TV_MODE_750_60, ... 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel