dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Emma Anholt" <emma@anholt.net>,
	"Neil Armstrong" <narmstrong@baylibre.com>,
	"David Airlie" <airlied@linux.ie>,
	"DRI Development" <dri-devel@lists.freedesktop.org>,
	"Phil Elwell" <phil@raspberrypi.com>,
	"Jerome Brunet" <jbrunet@baylibre.com>,
	"Samuel Holland" <samuel@sholland.org>,
	"Kevin Hilman" <khilman@baylibre.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Chen-Yu Tsai" <wens@csie.org>,
	linux-sunxi@lists.linux.dev,
	"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
	"open list:ARM/Amlogic Meson..."
	<linux-amlogic@lists.infradead.org>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Dom Cobley" <dom@raspberrypi.com>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Mateusz Kwiatkowski" <kfyatek+publicgit@gmail.com>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>
Subject: Re: [PATCH v1 05/35] drm/connector: Add TV standard property
Date: Tue, 16 Aug 2022 16:11:16 +0200	[thread overview]
Message-ID: <20220816141116.5nuszmilqv2exdb3@houat> (raw)
In-Reply-To: <CAMuHMdWevP=3af=NneAJEDfOR+sz1thrQEhAQPNGrgitBtLjGA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5411 bytes --]

On Tue, Aug 16, 2022 at 03:29:07PM +0200, Geert Uytterhoeven wrote:
> Hi Maxime,
> 
> On Tue, Aug 16, 2022 at 3:20 PM Maxime Ripard <maxime@cerno.tech> 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.

> > > 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 "@<refresh>".  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

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2022-08-16 14:11 UTC|newest]

Thread overview: 151+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 16:34 [PATCH v1 00/35] drm: Analog TV Improvements Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 01/35] drm/atomic-helper: Rename drm_atomic_helper_connector_tv_reset to avoid ambiguity Maxime Ripard
2022-08-08 12:25   ` Noralf Trønnes
2022-07-29 16:34 ` [PATCH v1 02/35] drm/connector: Rename subconnector state variable Maxime Ripard
2022-08-08 12:26   ` Noralf Trønnes
2022-07-29 16:34 ` [PATCH v1 03/35] drm/atomic: Add TV subconnector property to get/set_property Maxime Ripard
2022-08-08 12:30   ` Noralf Trønnes
2022-08-15  7:35     ` Maxime Ripard
2022-08-15 10:48       ` Noralf Trønnes
2022-07-29 16:34 ` [PATCH v1 04/35] drm/modes: Introduce 480i and 576i modes Maxime Ripard
2022-08-02 13:58   ` Jani Nikula
2022-08-02 14:16     ` Thomas Zimmermann
2022-08-16 11:58       ` Maxime Ripard
2022-08-12 13:18   ` Geert Uytterhoeven
2022-08-16 13:26     ` Maxime Ripard
2022-08-16 15:00       ` Geert Uytterhoeven
2022-08-17  7:53         ` Maxime Ripard
2022-08-17  8:51           ` Geert Uytterhoeven
2022-08-17 13:14             ` Maxime Ripard
2022-08-17 14:01               ` Geert Uytterhoeven
2022-08-18 12:39                 ` Maxime Ripard
2022-08-18 12:57                   ` Geert Uytterhoeven
2022-08-18 13:42                     ` Maxime Ripard
2022-08-18 15:34                       ` Geert Uytterhoeven
2022-08-18 15:46                         ` Maxime Ripard
2022-08-18 15:56                           ` Geert Uytterhoeven
2022-08-24 16:42                             ` Mateusz Kwiatkowski
2022-08-29 13:29                               ` Maxime Ripard
2022-08-29 14:14                                 ` Geert Uytterhoeven
2022-08-29 14:33                                   ` Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 05/35] drm/connector: Add TV standard property Maxime Ripard
2022-08-08 12:44   ` Noralf Trønnes
2022-08-16  8:26     ` Maxime Ripard
2022-08-16  9:42       ` Noralf Trønnes
2022-08-16  9:49         ` Maxime Ripard
2022-08-16 19:35           ` Noralf Trønnes
2022-08-17 11:46             ` Maxime Ripard
2022-08-17 13:11               ` Noralf Trønnes
2022-08-17 23:23                 ` Noralf Trønnes
2022-08-18 15:01                   ` Noralf Trønnes
2022-08-18 15:31                     ` Maxime Ripard
2022-08-21 11:43                       ` Noralf Trønnes
2022-08-26  8:21                         ` Maxime Ripard
2022-08-18 15:27                 ` Maxime Ripard
2022-08-12 13:25   ` Geert Uytterhoeven
2022-08-16 13:20     ` Maxime Ripard
2022-08-16 13:29       ` Geert Uytterhoeven
2022-08-16 14:11         ` Maxime Ripard [this message]
2022-08-16 14:43           ` Geert Uytterhoeven
2022-08-16 15:49             ` Maxime Ripard
2022-08-17  7:31               ` Geert Uytterhoeven
2022-08-17  7:32                 ` Geert Uytterhoeven
2022-08-17  7:47                 ` Maxime Ripard
2022-08-17  8:35                   ` Geert Uytterhoeven
2022-08-17 11:14                     ` Maxime Ripard
2022-08-17 13:05                       ` Geert Uytterhoeven
2022-08-17 13:18                         ` Maxime Ripard
2022-08-17 14:04                           ` Geert Uytterhoeven
2022-08-18 14:54                             ` Maxime Ripard
2022-08-18 15:20                               ` Geert Uytterhoeven
2022-08-18 15:34                                 ` Maxime Ripard
2022-08-19  9:35                                   ` Geert Uytterhoeven
2022-08-25 13:39                                     ` Maxime Ripard
2022-08-20 20:12   ` Noralf Trønnes
2022-08-25 13:44     ` Maxime Ripard
2022-08-25 15:13       ` Noralf Trønnes
2022-08-29  8:28         ` Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 06/35] drm/connector: Only register TV mode property if present Maxime Ripard
2022-08-08 12:49   ` Noralf Trønnes
2022-08-15 10:40     ` Maxime Ripard
2022-08-15 10:49       ` Noralf Trønnes
2022-07-29 16:34 ` [PATCH v1 07/35] drm/modes: Only consider bpp and refresh before options Maxime Ripard
2022-08-12 13:25   ` Geert Uytterhoeven
2022-08-16 12:20     ` Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 08/35] drm/client: Add some tests for drm_connector_pick_cmdline_mode() Maxime Ripard
2022-08-02 10:14   ` Thomas Zimmermann
2022-08-15  8:42     ` Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 09/35] drm/modes: Move named modes parsing to a separate function Maxime Ripard
2022-08-12 13:27   ` Geert Uytterhoeven
2022-08-16 13:46     ` Maxime Ripard
2022-08-16 14:44       ` Geert Uytterhoeven
2022-07-29 16:34 ` [PATCH v1 10/35] drm/modes: Switch to named mode descriptors Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 11/35] drm/modes: Fill drm_cmdline mode from named modes Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 12/35] drmi/modes: Properly generate a drm_display_mode from a named mode Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 13/35] drm/atomic-helper: Add a TV properties reset helper Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 14/35] drm/atomic-helper: Add an analog TV atomic_check implementation Maxime Ripard
2022-07-29 17:16   ` Mateusz Kwiatkowski
2022-08-15  8:30     ` Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 15/35] drm/vc4: vec: Remove empty mode_fixup Maxime Ripard
2022-07-29 16:34 ` [PATCH v1 16/35] drm/vc4: vec: Convert to atomic helpers Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 17/35] drm/vc4: vec: Refactor VEC TV mode setting Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 18/35] drm/vc4: vec: Remove redundant atomic_mode_set Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 19/35] drm/vc4: vec: Fix timings for VEC modes Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 20/35] drm/vc4: vec: Switch for common modes Maxime Ripard
2022-07-29 18:12   ` Mateusz Kwiatkowski
2022-08-16 11:57     ` Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 21/35] drm/vc4: vec: Fix definition of PAL-M mode Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 22/35] drm/vc4: vec: Use TV Reset implementation Maxime Ripard
2022-07-30  3:03   ` kernel test robot
2022-07-29 16:35 ` [PATCH v1 23/35] drm/vc4: vec: Convert to the new TV mode property Maxime Ripard
2022-08-20 17:22   ` Noralf Trønnes
2022-08-24 15:26     ` Maxime Ripard
2022-08-25 13:14       ` Noralf Trønnes
2022-08-29 12:13         ` Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 24/35] drm/vc4: vec: Add support for more analog TV standards Maxime Ripard
2022-07-29 17:55   ` Mateusz Kwiatkowski
2022-08-15  8:37     ` Maxime Ripard
2022-08-24 16:59       ` Mateusz Kwiatkowski
2022-07-29 16:35 ` [PATCH v1 25/35] drm/sun4i: tv: Remove unused mode_valid Maxime Ripard
2022-07-30  9:13   ` Jernej Škrabec
2022-07-29 16:35 ` [PATCH v1 26/35] drm/sun4i: tv: Convert to atomic hooks Maxime Ripard
2022-07-30  9:12   ` Jernej Škrabec
2022-07-29 16:35 ` [PATCH v1 27/35] drm/sun4i: tv: Merge mode_set into atomic_enable Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 28/35] drm/sun4i: tv: Remove useless function Maxime Ripard
2022-07-29 16:35 ` [PATCH v1 29/35] drm/sun4i: tv: Remove useless destroy function Maxime Ripard
2022-07-30  9:14   ` Jernej Škrabec
2022-07-29 16:35 ` [PATCH v1 30/35] drm/sun4i: tv: Rename error label Maxime Ripard
2022-07-30  9:15   ` Jernej Škrabec
2022-07-29 16:35 ` [PATCH v1 31/35] drm/sun4i: tv: Add missing reset assertion Maxime Ripard
2022-07-30  9:16   ` Jernej Škrabec
2022-07-29 16:35 ` [PATCH v1 32/35] drm/sun4i: tv: Convert to the new TV mode property Maxime Ripard
2022-08-28 17:12   ` Noralf Trønnes
2022-07-29 16:35 ` [PATCH v1 33/35] drm/connector: Remove TV modes property Maxime Ripard
2022-07-29 20:06   ` kernel test robot
2022-07-29 20:16   ` kernel test robot
2022-07-29 16:35 ` [PATCH v1 34/35] drm/modes: Introduce the tv_mode property as a command-line option Maxime Ripard
2022-08-12 13:31   ` Geert Uytterhoeven
2022-08-16 13:51     ` Maxime Ripard
2022-08-20 20:18   ` Noralf Trønnes
2022-08-24 15:45     ` Maxime Ripard
2022-08-24 17:08       ` Mateusz Kwiatkowski
2022-08-25 12:41       ` Noralf Trønnes
2022-08-26  6:46         ` Maxime Ripard
2022-08-28 17:06           ` Noralf Trønnes
2022-07-29 16:35 ` [PATCH v1 35/35] drm/modes: Introduce more named modes Maxime Ripard
2022-08-21 16:16   ` Noralf Trønnes
2022-08-25 14:22     ` Maxime Ripard
2022-08-08 13:03 ` [PATCH v1 00/35] drm: Analog TV Improvements Noralf Trønnes
2022-08-21 16:33 ` Noralf Trønnes
2022-08-22  7:48   ` Maxime Ripard
2022-08-22  8:57     ` Mateusz Kwiatkowski
2022-08-25 15:55       ` Maxime Ripard
2022-08-25 16:17         ` Mateusz Kwiatkowski
2022-08-26  4:07           ` Mateusz Kwiatkowski
2022-08-26  8:39             ` Maxime Ripard
2022-08-26 14:56             ` Dom Cobley
2022-08-27 16:11               ` Noralf Trønnes
2022-08-30 21:31               ` kFYatek
2022-08-22 13:21     ` Noralf Trønnes
2022-08-25 16:21       ` Maxime Ripard
2022-08-25 19:36         ` Noralf Trønnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220816141116.5nuszmilqv2exdb3@houat \
    --to=maxime@cerno.tech \
    --cc=airlied@linux.ie \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dom@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=geert@linux-m68k.org \
    --cc=jbrunet@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kfyatek+publicgit@gmail.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    --cc=noralf@tronnes.org \
    --cc=phil@raspberrypi.com \
    --cc=samuel@sholland.org \
    --cc=tzimmermann@suse.de \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).