Maxime Ripard
2022-Sep-26 10:17 UTC
[Nouveau] [PATCH v2 10/33] drm/modes: Add a function to generate analog display modes
Hi, On Fri, Sep 23, 2022 at 11:05:48AM +0200, Thomas Zimmermann wrote:> > + /* 63.556us * 13.5MHz = 858 pixels */ > > I kind of get what the comment wants to tell me, but the units don't add up.I'm not sure how it doesn't add up? We have a frequency in Hz (equivalent to s^-1) and a duration in s, so the result ends up with no dimension, which is to be expected for a number of periods? If you're talking about the comment itself, then NTSC mandates that a line is 63.556us long. If we're using a pixel clock at 13.5 MHz, it means that the period (== pixel) is ~74ns, so we get 63556 / 74 = 858 pixels / line.> I think you want to end up with 858 pixels/line > > 13,5 pixels/second / (60/2I frame/second * 525 lines/frame) > > I: interlaced > > Maybe just remove the short comments and document that in a more meaningful > place.I guess this is where it's meaningful, we really want to hit that target. BT601 also mandates it. Maxime -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 228 bytes Desc: not available URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20220926/7c4b0ac1/attachment.sig>
Geert Uytterhoeven
2022-Sep-26 10:34 UTC
[Nouveau] [PATCH v2 10/33] drm/modes: Add a function to generate analog display modes
Hi Maxime, On Mon, Sep 26, 2022 at 12:17 PM Maxime Ripard <maxime at cerno.tech> wrote:> On Fri, Sep 23, 2022 at 11:05:48AM +0200, Thomas Zimmermann wrote: > > > + /* 63.556us * 13.5MHz = 858 pixels */ > > > > I kind of get what the comment wants to tell me, but the units don't add up. > > I'm not sure how it doesn't add up? > > We have a frequency in Hz (equivalent to s^-1) and a duration in s, so > the result ends up with no dimension, which is to be expected for a > number of periods?To make the units add up, it should be 13.5 Mpixel/s (which is what a pixel clock of 13.5 MHz really means ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at 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