video: fbdev: atari: Fix TT High video mode
PATCH v2 1/1 video: fbdev: atari: Fix TT High video mode
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.
---
Untested on actual hardware, hence the RFC.
v2:
- Use correct base.
--- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/atafb.c +2 -2
@@ -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 },
Signature · 1 line
2.25.1
Hi Geert.
Quoted 19 lines · 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 <[email protected]>---
Untested on actual hardware, hence the RFC.v2:
- Use correct base.--- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/video/fbdev/atafb.c +0
-0
drivers/video/fbdev/atafb.c static struct fb_videomode atafb_modedb[] __initdata = { · line 500
Quoted 8 lines
drivers/video/fbdev/atafb.c +2
-2@@ -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
Quoted 27 lines · Sam Ravnborg
Hi Geert.
Quoted 24 lines · 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 <[email protected]>---
Untested on actual hardware, hence the RFC.v2:
- Use correct base.--- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/video/fbdev/atafb.c +0
-2@@ -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,
Quoted 8 lines
drivers/video/fbdev/atafb.c static struct fb_videomode atafb_modedb[] __initdata = { · line 500
Quoted 3 lines
drivers/video/fbdev/atafb.c +2
-0+/* 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.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Hi Andreas,
Quoted 16 lines · Andreas Schwab
Quoted 15 lines · Sam Ravnborg
Quoted 14 lines · 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 <[email protected]>---
Untested on actual hardware, hence the RFC.v2:
- Use correct base.--- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 15 lines
Quoted 7 lines
Quoted 7 lines
drivers/video/fbdev/atafb.c +0
-0@@ -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 Quoted 8 lines
drivers/video/fbdev/atafb.c static struct fb_videomode atafb_modedb[] __initdata = { · line 500
Quoted 6 lines
drivers/video/fbdev/atafb.c +2
-2}, { -/* 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...
Quoted 3 lines
Quoted 3 lines
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?
Quoted 1 line
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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Quoted 1 line · Geert Uytterhoeven
95 ns?
No, 95 MHz.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Hi Andreas,
Quoted 5 lines · Andreas Schwab
Quoted 1 line · Geert Uytterhoeven
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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Quoted 2 lines · Geert Uytterhoeven
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.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Hi Andreas,
Quoted 5 lines · Andreas Schwab
Quoted 2 lines · Geert Uytterhoeven
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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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
Quoted 1 line · Geert Uytterhoeven
only the VGA and Falcon video modes are correct?
The TT shifter is not programmable, so the values don't really matter.
Andreas.
Signature · 3 lines
Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Hi Geert,
Quoted 33 lines · Geert Uytterhoeven
Hi Andreas,
Quoted 16 lines · Andreas Schwab
Quoted 15 lines · Sam Ravnborg
Quoted 14 lines · 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 <[email protected]>---
Untested on actual hardware, hence the RFC.v2:
- Use correct base.--- drivers/video/fbdev/atafb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Quoted 14 lines
Quoted 6 lines
Quoted 6 lines
drivers/video/fbdev/atafb.c +0
-0@@ -495,8 +495,8 @@ static struct fb_videomode atafb_modedb[] __initdata = { "tt-mid", 60, 640, 480, 31041, 120, 100, 8, 16, 140, 30,Quoted 8 lines
drivers/video/fbdev/atafb.c static struct fb_videomode atafb_modedb[] __initdata = { · line 500
Quoted 7 lines
drivers/video/fbdev/atafb.c +2
-20 ,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.
Quoted 2 lines
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.
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
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
Quoted 9 lines
Quoted 2 lines
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
Hi Andreas,
Quoted 25 lines · Andreas Schwab
Quoted 7 lines · Sam Ravnborg
Quoted 5 lines · 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 <[email protected]>Quoted 16 lines
drivers/video/fbdev/atafb.c static struct fb_videomode atafb_modedb[] __initdata = { · line 500
Quoted 11 lines
drivers/video/fbdev/atafb.c +2
-2@@ -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.
Quoted 1 line
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
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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