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 57DCEC2BB41 for ; Tue, 16 Aug 2022 14:44:23 +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=qxqNM24y9DmsDpHa7WoMcdp26zarGOaBE8o2FLzuf/o=; b=jrGSbOm+vkQq/P cvsSTVtVH8dRlGvJKOz5FoCLgALba0noKHkrFN28Apfv2NY/oqfp2+t6GV1k76RAKmnLsl+ZN5VE8 swU1Wh3snebGovzrnFki/vpDDWbkWSNNB/GMGzSqdk6J6lmVcWm7E6CZYtIioqejsI+tud9jGwrHW ezvRlZr1J66G4DcyLVqo+rRYC2+rGhU06Z8UjGV1FQbcoc/Ks0ARfSajQOh0W0a04R+3Hw9812+2Y 0SWYLulQVgbkVaheq1WDBReD/Ju1eCf9Cd7XrAPKLd1FhxfO2ENKOfQ4r++wgqmsKOhfSdrWgjtIr RY8JysX/FkIodC8Vl0KA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNxng-003Yit-E9; Tue, 16 Aug 2022 14:44:12 +0000 Received: from mail-qt1-f182.google.com ([209.85.160.182]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oNxnU-003YcO-Da; Tue, 16 Aug 2022 14:44:02 +0000 Received: by mail-qt1-f182.google.com with SMTP id c20so8248873qtw.8; Tue, 16 Aug 2022 07:43:58 -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=Glu8BOq83InxmgivOsliME3h0KPUgqBt+ApKY1f8Hz8=; b=l1Mr5hDoddHEDW6Sszzmtkz2rurU2orjX5Ko1suMQZEKf2MP6XoPnovmjRJwWJzea0 mXF2Y5IVq5rkUch7eLDDiNiPn+NyGh6aLQH+KCmvPEB8y7T9Lxr6USRuVbiFZUxlAy1/ QadzbFwufsM8W08A3lLQoGjJQfQJANw9HmThnrkZTnupbduzNf4CdJP2Tpi/AeNfDZ6K jynbxTyYcnqUDpNBsuEa4UHpGoDbOpewJmndFXIoR0fzVRh3kXAz9guU8weYDdsKwbTb DEDlH6GqYON6ACo0EW6Rl5TsFAmrc8G8sUV9wkLTWtGO8MYajqS3BZsKz3bkgJULjGaM UWbQ== X-Gm-Message-State: ACgBeo1n1vESuO+Lotc2ifjbBVhMTUXHnXOlFiRBv/+Tut83oVraIZbh WgVHhs+RWeAT8dHQGTQa79ly2M1CUIS0lg== X-Google-Smtp-Source: AA6agR6QfgeGWsKgBASJWoOMSgkmhNH8MB0nGwDT3CxDsNfueZASDpKapP0CUjzi5KlDkWuBTDHCow== X-Received: by 2002:a05:622a:1015:b0:343:67ae:993a with SMTP id d21-20020a05622a101500b0034367ae993amr19113641qte.180.1660661037720; Tue, 16 Aug 2022 07:43:57 -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 y12-20020a05620a25cc00b006a793bde241sm11480682qko.63.2022.08.16.07.43.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Aug 2022 07:43:57 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-32fd97c199fso131915207b3.6; Tue, 16 Aug 2022 07:43:57 -0700 (PDT) X-Received: by 2002:a81:658:0:b0:334:a23e:6caa with SMTP id 85-20020a810658000000b00334a23e6caamr31311ywg.283.1660661036761; Tue, 16 Aug 2022 07:43:56 -0700 (PDT) MIME-Version: 1.0 References: <20220728-rpi-analog-tv-properties-v1-0-3d53ae722097@cerno.tech> <20220728-rpi-analog-tv-properties-v1-5-3d53ae722097@cerno.tech> <20220816132040.uwirtjm5yr6rdd3q@houat> <20220816141116.5nuszmilqv2exdb3@houat> In-Reply-To: <20220816141116.5nuszmilqv2exdb3@houat> From: Geert Uytterhoeven Date: Tue, 16 Aug 2022 16:43:44 +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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220816_074400_482648_3109FB99 X-CRM114-Status: GOOD ( 47.57 ) X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Hi Maxime, On Tue, Aug 16, 2022 at 4:11 PM Maxime Ripard wrote: > On Tue, Aug 16, 2022 at 03:29:07PM +0200, Geert Uytterhoeven wrote: > > On Tue, Aug 16, 2022 at 3:20 PM Maxime Ripard wrote: > > > On Fri, Aug 12, 2022 at 03:25:18PM +0200, Geert Uytterhoeven wrote: > > > > > --- a/drivers/gpu/drm/drm_connector.c > > > > > +++ b/drivers/gpu/drm/drm_connector.c > > > > > @@ -1649,11 +1650,40 @@ EXPORT_SYMBOL(drm_mode_create_tv_margin_properties); > > > > > * 0 on success or a negative error code on failure. > > > > > */ > > > > > int drm_mode_create_tv_properties(struct drm_device *dev, > > > > > + unsigned int supported_tv_norms, > > > > > unsigned int num_modes, > > > > > const char * const modes[]) > > > > > { > > > > > + static const struct drm_prop_enum_list tv_norm_values[] = { > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_443) - 1, "NTSC-443" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_J) - 1, "NTSC-J" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_NTSC_M) - 1, "NTSC-M" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_60) - 1, "PAL-60" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_B) - 1, "PAL-B" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_D) - 1, "PAL-D" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_G) - 1, "PAL-G" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_H) - 1, "PAL-H" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_I) - 1, "PAL-I" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_M) - 1, "PAL-M" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_N) - 1, "PAL-N" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_PAL_NC) - 1, "PAL-Nc" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_60) - 1, "SECAM-60" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_B) - 1, "SECAM-B" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_D) - 1, "SECAM-D" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_G) - 1, "SECAM-G" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_K) - 1, "SECAM-K" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_K1) - 1, "SECAM-K1" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_SECAM_L) - 1, "SECAM-L" }, > > > > > > > > The above are analog standards, with a variable horizontal resolution. > > > > > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD480I) - 1, "hd480i" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD480P) - 1, "hd480p" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD576I) - 1, "hd576i" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD576P) - 1, "hd576p" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD720P) - 1, "hd720p" }, > > > > > + { __builtin_ffs(DRM_MODE_TV_NORM_HD1080I) - 1, "hd1080i" }, > > > > > > > > The above are digital standards, with a fixed resolution. > > > > > > Are they? > > > > > > It's not clear to me from looking at nouveau, but I was under the > > > impression that they were modes for a component output, so CEA 770.3. I > > > don't have the spec though, so I can't check. > > > > Oh right, I forgot about analog HD over component, where you can use > > other pixel clocks than in the digital standard. > > > > > > You seem to have missed "hd1080p"? > > > > > > Nobody is using it. If we ever have a driver that uses it I think we can > > > add it. > > > > The PS3 supports 1080p over component > > https://manuals.playstation.net/document/en/ps3/current/settings/videooutput.html > > Yeah, and iirc the Xbox360 did too, but what I meant by nobody is using > it is that there's no driver using it currently. OK, it can be added later. > > > > In addition, "hd720p", "hd080i", and "hd1080p" are available in both 50 > > > > and 60 (actually 59.94) Hz, while "hd1080p" can also use 24 or 25 Hz. > > > > > > It looks like nouveau only exposes modes for 480p at 59.94Hz, 576p at > > > 50Hz, 720p at 60Hz, 1080i at 30Hz. > > > > PS3 supports both 50 and 60 Hz (same link above). > > I'm probably wary on this, but I'd rather stay at feature parity for > this series. There's already plenty of occasion to screw up something > that I'd rather not introduce new stuff I haven't been able to test :) > > Provided we can easily extend it to support these additional features of > course :) > > > > > 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"? 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-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic