* [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode @ 2020-11-01 10:29 Geert Uytterhoeven 2020-11-01 11:29 ` Sam Ravnborg 0 siblings, 1 reply; 11+ messages in thread From: Geert Uytterhoeven @ 2020-11-01 10:29 UTC (permalink / raw) To: Michael Schmitz; +Cc: linux-fbdev, linux-m68k, dri-devel, Geert Uytterhoeven The horizontal resolution (640) for the TT High video mode (1280x960) is definitely bogus. While fixing that, correct the timings to match the TTM195 service manual. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- Untested on actual hardware, hence the RFC. v2: - Use correct base. --- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index f253daa05d9d3872..5ecf3ec9f94cb720 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP }, { - /* 1280x960, 29 kHz, 60 Hz (TT high) */ - "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30, + /* 1280x960, 72 kHz, 72 Hz (TT high) */ + "tt-high", 57, 1280, 960, 7761, 260, 60, 36, 4, 192, 4, 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP }, -- 2.25.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-01 10:29 [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode Geert Uytterhoeven @ 2020-11-01 11:29 ` Sam Ravnborg 2020-11-01 12:46 ` Andreas Schwab 0 siblings, 1 reply; 11+ messages in thread From: Sam Ravnborg @ 2020-11-01 11:29 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Michael Schmitz, linux-fbdev, linux-m68k, dri-devel Hi Geert. On Sun, Nov 01, 2020 at 11:29:41AM +0100, Geert Uytterhoeven wrote: > The horizontal resolution (640) for the TT High video mode (1280x960) is > definitely bogus. While fixing that, correct the timings to match the > TTM195 service manual. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > Untested on actual hardware, hence the RFC. > > v2: > - Use correct base. > --- > drivers/video/fbdev/atafb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c > index f253daa05d9d3872..5ecf3ec9f94cb720 100644 > --- a/drivers/video/fbdev/atafb.c > +++ b/drivers/video/fbdev/atafb.c > @@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { > "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, > 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP > }, { > - /* 1280x960, 29 kHz, 60 Hz (TT high) */ > - "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30, > + /* 1280x960, 72 kHz, 72 Hz (TT high) */ > + "tt-high", 57, 1280, 960, 7761, 260, 60, 36, 4, 192, 4, > 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP Well-spotted. The change of 640 => 1280 is surely right. I have a harder time understanding why the change of pixclock from 31041 to 7761 is correct. All other modes have a pixclock close to or equal to 32000 - so it looks strange this one is off. You know a tons more about all this than I do so it is properly right but I was left wondering so please enlighten me. Sam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-01 11:29 ` Sam Ravnborg @ 2020-11-01 12:46 ` Andreas Schwab 2020-11-02 8:39 ` Geert Uytterhoeven 2020-11-09 8:38 ` Geert Uytterhoeven 0 siblings, 2 replies; 11+ messages in thread From: Andreas Schwab @ 2020-11-01 12:46 UTC (permalink / raw) To: Sam Ravnborg Cc: Geert Uytterhoeven, Michael Schmitz, linux-fbdev, linux-m68k, dri-devel On Nov 01 2020, Sam Ravnborg wrote: > Hi Geert. > > On Sun, Nov 01, 2020 at 11:29:41AM +0100, Geert Uytterhoeven wrote: >> The horizontal resolution (640) for the TT High video mode (1280x960) is >> definitely bogus. While fixing that, correct the timings to match the >> TTM195 service manual. >> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> >> --- >> Untested on actual hardware, hence the RFC. >> >> v2: >> - Use correct base. >> --- >> drivers/video/fbdev/atafb.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c >> index f253daa05d9d3872..5ecf3ec9f94cb720 100644 >> --- a/drivers/video/fbdev/atafb.c >> +++ b/drivers/video/fbdev/atafb.c >> @@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { >> "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, >> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP >> }, { >> - /* 1280x960, 29 kHz, 60 Hz (TT high) */ >> - "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30, >> + /* 1280x960, 72 kHz, 72 Hz (TT high) */ >> + "tt-high", 57, 1280, 960, 7761, 260, 60, 36, 4, 192, 4, >> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP > > Well-spotted. The change of 640 => 1280 is surely right. > I have a harder time understanding why the change of pixclock from 31041 > to 7761 is correct. All other modes have a pixclock close to or equal > to 32000 - so it looks strange this one is off. According to the Profibuch the pixclock should be about 95000. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-01 12:46 ` Andreas Schwab @ 2020-11-02 8:39 ` Geert Uytterhoeven 2020-11-02 9:38 ` Andreas Schwab ` (2 more replies) 2020-11-09 8:38 ` Geert Uytterhoeven 1 sibling, 3 replies; 11+ messages in thread From: Geert Uytterhoeven @ 2020-11-02 8:39 UTC (permalink / raw) To: Andreas Schwab Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development Hi Andreas, On Sun, Nov 1, 2020 at 1:47 PM Andreas Schwab <schwab@linux-m68k.org> wrote: > On Nov 01 2020, Sam Ravnborg wrote: > > On Sun, Nov 01, 2020 at 11:29:41AM +0100, Geert Uytterhoeven wrote: > >> The horizontal resolution (640) for the TT High video mode (1280x960) is > >> definitely bogus. While fixing that, correct the timings to match the > >> TTM195 service manual. > >> > >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > >> --- > >> Untested on actual hardware, hence the RFC. > >> > >> v2: > >> - Use correct base. > >> --- > >> drivers/video/fbdev/atafb.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c > >> index f253daa05d9d3872..5ecf3ec9f94cb720 100644 > >> --- a/drivers/video/fbdev/atafb.c > >> +++ b/drivers/video/fbdev/atafb.c > >> @@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { > >> "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, > >> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP > >> }, { > >> - /* 1280x960, 29 kHz, 60 Hz (TT high) */ > >> - "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30, > >> + /* 1280x960, 72 kHz, 72 Hz (TT high) */ > >> + "tt-high", 57, 1280, 960, 7761, 260, 60, 36, 4, 192, 4, > >> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP > > > > Well-spotted. The change of 640 => 1280 is surely right. TBH, I spotted that 7 years ago, but never got to looking up and calculating the other values... > > I have a harder time understanding why the change of pixclock from 31041 > > to 7761 is correct. All other modes have a pixclock close to or equal > > to 32000 - so it looks strange this one is off. 32000 ps is 31.25 MHz. Looks like these are bogus, too, and only the VGA and Falcon video modes are correct? > According to the Profibuch the pixclock should be about 95000. 95 ns? That's a 10.5 MHz pixel clock? Definitely too low. The TTM195 manual says 128.85 MHz. 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-02 8:39 ` Geert Uytterhoeven @ 2020-11-02 9:38 ` Andreas Schwab 2020-11-02 10:11 ` Geert Uytterhoeven 2020-11-02 9:40 ` Andreas Schwab 2020-11-02 18:52 ` Michael Schmitz 2 siblings, 1 reply; 11+ messages in thread From: Andreas Schwab @ 2020-11-02 9:38 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development On Nov 02 2020, Geert Uytterhoeven wrote: > 95 ns? No, 95 MHz. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-02 9:38 ` Andreas Schwab @ 2020-11-02 10:11 ` Geert Uytterhoeven 2020-11-02 10:29 ` Andreas Schwab 0 siblings, 1 reply; 11+ messages in thread From: Geert Uytterhoeven @ 2020-11-02 10:11 UTC (permalink / raw) To: Andreas Schwab Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development Hi Andreas, On Mon, Nov 2, 2020 at 10:38 AM Andreas Schwab <schwab@linux-m68k.org> wrote: > On Nov 02 2020, Geert Uytterhoeven wrote: > > > 95 ns? > > No, 95 MHz. http://alive.atari.org/alive6/tt3.php agrees with you But 95 MHz sounds too low to me, and doesn't match the monitor docs. Given the TT runs at 32 MHz, 32 * 4 = 128 MHz sounds reasonable. Michael? 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-02 10:11 ` Geert Uytterhoeven @ 2020-11-02 10:29 ` Andreas Schwab 2020-11-02 12:07 ` Geert Uytterhoeven 0 siblings, 1 reply; 11+ messages in thread From: Andreas Schwab @ 2020-11-02 10:29 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development On Nov 02 2020, Geert Uytterhoeven wrote: > But 95 MHz sounds too low to me, and doesn't match the monitor docs. > Given the TT runs at 32 MHz, 32 * 4 = 128 MHz sounds reasonable. Since it is not programmable, the actual value doesn't matter anyway. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-02 10:29 ` Andreas Schwab @ 2020-11-02 12:07 ` Geert Uytterhoeven 0 siblings, 0 replies; 11+ messages in thread From: Geert Uytterhoeven @ 2020-11-02 12:07 UTC (permalink / raw) To: Andreas Schwab Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development Hi Andreas, On Mon, Nov 2, 2020 at 11:29 AM Andreas Schwab <schwab@linux-m68k.org> wrote: > On Nov 02 2020, Geert Uytterhoeven wrote: > > But 95 MHz sounds too low to me, and doesn't match the monitor docs. > > Given the TT runs at 32 MHz, 32 * 4 = 128 MHz sounds reasonable. > > Since it is not programmable, the actual value doesn't matter anyway. It does, to implement fbdev mode rounding rules. 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-02 8:39 ` Geert Uytterhoeven 2020-11-02 9:38 ` Andreas Schwab @ 2020-11-02 9:40 ` Andreas Schwab 2020-11-02 18:52 ` Michael Schmitz 2 siblings, 0 replies; 11+ messages in thread From: Andreas Schwab @ 2020-11-02 9:40 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development On Nov 02 2020, Geert Uytterhoeven wrote: > only the VGA and Falcon video modes are correct? The TT shifter is not programmable, so the values don't really matter. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-02 8:39 ` Geert Uytterhoeven 2020-11-02 9:38 ` Andreas Schwab 2020-11-02 9:40 ` Andreas Schwab @ 2020-11-02 18:52 ` Michael Schmitz 2 siblings, 0 replies; 11+ messages in thread From: Michael Schmitz @ 2020-11-02 18:52 UTC (permalink / raw) To: Geert Uytterhoeven, Andreas Schwab Cc: Sam Ravnborg, Linux Fbdev development list, Linux/m68k, DRI Development Hi Geert, On 2/11/20 9:39 PM, Geert Uytterhoeven wrote: > Hi Andreas, > > On Sun, Nov 1, 2020 at 1:47 PM Andreas Schwab <schwab@linux-m68k.org> wrote: >> On Nov 01 2020, Sam Ravnborg wrote: >>> On Sun, Nov 01, 2020 at 11:29:41AM +0100, Geert Uytterhoeven wrote: >>>> The horizontal resolution (640) for the TT High video mode (1280x960) is >>>> definitely bogus. While fixing that, correct the timings to match the >>>> TTM195 service manual. >>>> >>>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> >>>> --- >>>> Untested on actual hardware, hence the RFC. >>>> >>>> v2: >>>> - Use correct base. >>>> --- >>>> drivers/video/fbdev/atafb.c | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c >>>> index f253daa05d9d3872..5ecf3ec9f94cb720 100644 >>>> --- a/drivers/video/fbdev/atafb.c >>>> +++ b/drivers/video/fbdev/atafb.c >>>> @@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { >>>> "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, >>>> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP >>>> }, { >>>> - /* 1280x960, 29 kHz, 60 Hz (TT high) */ >>>> - "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30, >>>> + /* 1280x960, 72 kHz, 72 Hz (TT high) */ >>>> + "tt-high", 57, 1280, 960, 7761, 260, 60, 36, 4, 192, 4, >>>> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP >>> Well-spotted. The change of 640 => 1280 is surely right. > TBH, I spotted that 7 years ago, but never got to looking up and calculating > the other values... Looks like one of my copy&paste errors that went undetected for too long... I seem to have copied the tt-mid values above in that case. Need to go back to the old driver to see what had been used there. A quick diff didn't show anything useful. >>> I have a harder time understanding why the change of pixclock from 31041 >>> to 7761 is correct. All other modes have a pixclock close to or equal >>> to 32000 - so it looks strange this one is off. > 32000 ps is 31.25 MHz. Looks like these are bogus, too, and only > the VGA and Falcon video modes are correct? These were the only ones I could test (haven't seen a TT in 20 years). At the time I worked on the Atari FB driver, I didn't have access to the Profibuch either. As Andreas mentioned, the Falcon (or external) hardware is the only one that can be programmed freely, so we need to work from the 95 MHz pixclock Andreas found. That's 10.5 ns approx. 10.5 ns * 1280 * 960 (omitting HBL and VBL timing) gives 77 Hz refresh so I don't think 95 MHz for 72 Hz refresh are unreasonable. Need to look up what all the other numbers in the mode entry mean now ... Cheers, Michael > >> According to the Profibuch the pixclock should be about 95000. > 95 ns? That's a 10.5 MHz pixel clock? Definitely too low. > The TTM195 manual says 128.85 MHz. > > Gr{oetje,eeting}s, > > Geert > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode 2020-11-01 12:46 ` Andreas Schwab 2020-11-02 8:39 ` Geert Uytterhoeven @ 2020-11-09 8:38 ` Geert Uytterhoeven 1 sibling, 0 replies; 11+ messages in thread From: Geert Uytterhoeven @ 2020-11-09 8:38 UTC (permalink / raw) To: Andreas Schwab Cc: Sam Ravnborg, Michael Schmitz, Linux Fbdev development list, Linux/m68k, DRI Development Hi Andreas, On Sun, Nov 1, 2020 at 1:47 PM Andreas Schwab <schwab@linux-m68k.org> wrote: > On Nov 01 2020, Sam Ravnborg wrote: > > On Sun, Nov 01, 2020 at 11:29:41AM +0100, Geert Uytterhoeven wrote: > >> The horizontal resolution (640) for the TT High video mode (1280x960) is > >> definitely bogus. While fixing that, correct the timings to match the > >> TTM195 service manual. > >> > >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > >> --- a/drivers/video/fbdev/atafb.c > >> +++ b/drivers/video/fbdev/atafb.c > >> @@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { > >> "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30, > >> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP > >> }, { > >> - /* 1280x960, 29 kHz, 60 Hz (TT high) */ > >> - "tt-high", 57, 640, 960, 31041, 120, 100, 8, 16, 140, 30, > >> + /* 1280x960, 72 kHz, 72 Hz (TT high) */ > >> + "tt-high", 57, 1280, 960, 7761, 260, 60, 36, 4, 192, 4, > >> 0, FB_VMODE_NONINTERLACED | FB_VMODE_YWRAP > > > > Well-spotted. The change of 640 => 1280 is surely right. > > I have a harder time understanding why the change of pixclock from 31041 > > to 7761 is correct. All other modes have a pixclock close to or equal > > to 32000 - so it looks strange this one is off. > > According to the Profibuch the pixclock should be about 95000. Please have a look at the paragraph on p. 1052, and realize that it fails to take into account horizontal black/sync (the actual scan line length is 1792 not 1280 pixels) (thanks, Michael!). 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 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-11-09 8:38 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-01 10:29 [PATCH/RFC v2] video: fbdev: atari: Fix TT High video mode Geert Uytterhoeven 2020-11-01 11:29 ` Sam Ravnborg 2020-11-01 12:46 ` Andreas Schwab 2020-11-02 8:39 ` Geert Uytterhoeven 2020-11-02 9:38 ` Andreas Schwab 2020-11-02 10:11 ` Geert Uytterhoeven 2020-11-02 10:29 ` Andreas Schwab 2020-11-02 12:07 ` Geert Uytterhoeven 2020-11-02 9:40 ` Andreas Schwab 2020-11-02 18:52 ` Michael Schmitz 2020-11-09 8:38 ` Geert Uytterhoeven
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).