Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-21 Thread Maxime Ripard
Hi, On Sun, Sep 11, 2022 at 06:48:50AM +0200, Mateusz Kwiatkowski wrote: > >> Those extra vbp lines will be treated as a black bar at the top of the > >> frame, > >> and extra vfp lines will be at the bottom of the frame. > >> > >> However if someone specifies e.g. 720x604, there's nothing more y

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-21 Thread Maxime Ripard
Hi, Thanks again for your help On Sun, Sep 11, 2022 at 06:30:39AM +0200, kFYatek wrote: > W dniu 9.09.2022 o 16:00, Maxime Ripard pisze: > > On Wed, Sep 07, 2022 at 11:31:21PM +0200, Mateusz Kwiatkowski wrote: > >> The "canonical" modelines (at least for vc4's VEC, see the notes below): > >> > >>

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-10 Thread Mateusz Kwiatkowski
> Yes, lines 0-23 is the entire blanking area. And the "back porch" in this > context is everything from the start of the sync pulse to the start of active > video. It's not just the equalizing pulses. I meant "from the end of the sync pulse", obviously. Sorry about the slipup.

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-10 Thread Mateusz Kwiatkowski
Hi Maxime, W dniu 9.09.2022 o 15:54, Maxime Ripard pisze: > Hi, > > On Wed, Sep 07, 2022 at 11:31:21PM +0200, Mateusz Kwiatkowski wrote: > [...] >> I think you're confusing the "post-equalizing pulses" with the "vertical back >> porch" a little bit. The "vertical back porch" includes both the >>

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-10 Thread kFYatek
Hi Maxime, W dniu 9.09.2022 o 16:00, Maxime Ripard pisze: > On Wed, Sep 07, 2022 at 11:31:21PM +0200, Mateusz Kwiatkowski wrote: >> The "canonical" modelines (at least for vc4's VEC, see the notes below): >> >> - (vfp==4, vsync==6, vbp==39) for 576i >> - (vfp==7, vsync==6, vbp==32) for 480i >> - (

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-09 Thread Maxime Ripard
On Wed, Sep 07, 2022 at 11:31:21PM +0200, Mateusz Kwiatkowski wrote: > The "canonical" modelines (at least for vc4's VEC, see the notes below): > > - (vfp==4, vsync==6, vbp==39) for 576i > - (vfp==7, vsync==6, vbp==32) for 480i > - (vfp==5, vsync==6, vbp==28) for 486i (full frame NTSC as originall

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-09 Thread Maxime Ripard
Hi, On Wed, Sep 07, 2022 at 11:31:21PM +0200, Mateusz Kwiatkowski wrote: > W dniu 7.09.2022 o 16:34, Maxime Ripard pisze: > > On Mon, Sep 05, 2022 at 06:44:42PM +0200, Mateusz Kwiatkowski wrote: > >> Hi Maxime, > >> > >> W dniu 5.09.2022 o 15:37, Maxime Ripard pisze: > > +    vfp = vfp_min + (

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-08 Thread Maxime Ripard
Hi, On Tue, Aug 30, 2022 at 10:01:11AM -0300, Maíra Canal wrote: > On 8/29/22 10:11, Maxime Ripard wrote: > > Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and > > 625-lines modes in their drivers. > > > > Since those modes are fairly standard, and that we'll need to use them >

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-07 Thread Mateusz Kwiatkowski
Hi Maxime, W dniu 7.09.2022 o 16:34, Maxime Ripard pisze: > On Mon, Sep 05, 2022 at 06:44:42PM +0200, Mateusz Kwiatkowski wrote: >> Hi Maxime, >> >> W dniu 5.09.2022 o 15:37, Maxime Ripard pisze: > +    vfp = vfp_min + (porches_rem / 2); > +    vbp = porches - vfp; Relative posit

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-07 Thread Maxime Ripard
On Mon, Sep 05, 2022 at 06:32:14PM +0200, Mateusz Kwiatkowski wrote: > Hi Maxime, > > W dniu 5.09.2022 o 15:32, Maxime Ripard pisze: > > Hi, > > > > On Wed, Aug 31, 2022 at 10:14:28AM +0200, Geert Uytterhoeven wrote: > +enum drm_mode_analog { > +    DRM_MODE_ANALOG_NTSC, > +    DRM_

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-07 Thread Maxime Ripard
On Mon, Sep 05, 2022 at 06:44:42PM +0200, Mateusz Kwiatkowski wrote: > Hi Maxime, > > W dniu 5.09.2022 o 15:37, Maxime Ripard pisze: > >>> +    vfp = vfp_min + (porches_rem / 2); > >>> +    vbp = porches - vfp; > >> > >> Relative position of the vertical sync within the VBI effectively moves the >

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-05 Thread Mateusz Kwiatkowski
Hi Maxime, W dniu 5.09.2022 o 15:37, Maxime Ripard pisze: >>> +    vfp = vfp_min + (porches_rem / 2); >>> +    vbp = porches - vfp; >> >> Relative position of the vertical sync within the VBI effectively moves the >> image up and down. Adding that (porches_rem / 2) moves the image up off >> cente

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-05 Thread Mateusz Kwiatkowski
Hi Maxime, W dniu 5.09.2022 o 15:32, Maxime Ripard pisze: > Hi, > > On Wed, Aug 31, 2022 at 10:14:28AM +0200, Geert Uytterhoeven wrote: +enum drm_mode_analog { +    DRM_MODE_ANALOG_NTSC, +    DRM_MODE_ANALOG_PAL, +}; >>> >>> Using "NTSC" and "PAL" to describe the 50Hz and 60Hz

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-05 Thread Maxime Ripard
Hi, On Wed, Aug 31, 2022 at 03:44:52AM +0200, Mateusz Kwiatkowski wrote: > > +#define NTSC_HFP_DURATION_TYP_NS    1500 > > +#define NTSC_HFP_DURATION_MIN_NS    1270 > > +#define NTSC_HFP_DURATION_MAX_NS    2220 > > You've defined those min/typ/max ranges, but you're not using the "typ" field > fo

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-05 Thread Maxime Ripard
Hi, On Wed, Aug 31, 2022 at 10:14:28AM +0200, Geert Uytterhoeven wrote: > > > +enum drm_mode_analog { > > > +DRM_MODE_ANALOG_NTSC, > > > +DRM_MODE_ANALOG_PAL, > > > +}; > > > > Using "NTSC" and "PAL" to describe the 50Hz and 60Hz analog TV modes is > > common, > > but strictly speaking a

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-09-01 Thread Noralf Trønnes
Den 29.08.2022 15.11, skrev Maxime Ripard: > Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and > > 625-lines modes in their drivers. > > > > Since those modes are fairly standard, and that we'll need to use them > > in more places in the future, it makes sense to move thei

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-08-31 Thread Geert Uytterhoeven
Hi Mateusz, On Wed, Aug 31, 2022 at 3:44 AM Mateusz Kwiatkowski wrote: > Wow. That's an enormous amount of effort put into this patch. > > But I'm tempted to say that this is actually overengineered quite a bit :D > Considering that there's no way to access all these calculations from user > spac

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-08-30 Thread Mateusz Kwiatkowski
Hi Maxime, Wow. That's an enormous amount of effort put into this patch. But I'm tempted to say that this is actually overengineered quite a bit :D Considering that there's no way to access all these calculations from user space, and I can't imagine anybody using anything else than those standard

Re: [PATCH v2 10/41] drm/modes: Add a function to generate analog display modes

2022-08-30 Thread Maíra Canal
Hi Maxime, On 8/29/22 10:11, Maxime Ripard wrote: > Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and > 625-lines modes in their drivers. > > Since those modes are fairly standard, and that we'll need to use them > in more places in the future, it makes sense to move their defin