fbdev: atafb: Restrict SuperVidel handling to the Falcon
Subsystems (2)
PATCH 1/1 fbdev: atafb: Restrict SuperVidel handling to the Falcon
A framebuffer at 0xa0000000 or above is taken as being in SuperVidel RAM. A TT with a VME graphics card such as the Nova has its framebuffer there too, so in 8bpp it gets the Falcon palette registers instead of the card's VGA DAC, and in 8, 16 and 32bpp the SuperBlitter, which it does not have.
The SuperVidel exists only for the Falcon, so check for the Falcon video hardware as well.
--- drivers/video/fbdev/atafb.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/video/fbdev/atafb.c +13 -5
@@ -2065,6 +2065,15 @@ static void st_ovsc_switch(void)#ifdef ATAFB_EXT +/* +* Only a Falcon can have a SuperVidel; a TT with a VME graphics card can +* have its framebuffer in the same address range. +*/ +static bool ext_is_supervidel (void ) +{ +return ATARIHW_PRESENT (VIDEL_SHIFTER ) && external_addr >=0xa0000000 ; +} +static int ext_encode_fix (struct fb_fix_screeninfo *fix,struct atafb_par *par) {strcpy (fix->id,"Unknown Extern" );
@@ -2083,8 +2092,7 @@ static int ext_encode_fix(struct fb_fix_screeninfo *fix, struct atafb_par *par)* SuperVidel 8bpp chunky (fb in SV RAM) uses the Falcon palette */ int visual = (external_vgaiobase || - (external_depth ==8 && - external_addr >=0xa0000000 )) ? + (external_depth ==8 &&ext_is_supervidel ())) ?FB_VISUAL_PSEUDOCOLOR :FB_VISUAL_STATIC_PSEUDOCOLOR ;switch (external_pmode) {
@@ -2181,7 +2189,7 @@ static int ext_encode_var(struct fb_var_screeninfo *var, struct atafb_par *par) var->transp.offset =24 ; var->transp.length =8 ; }else if (external_pmode ==FB_TYPE_PACKED_PIXELS && - external_depth ==8 && external_addr >=0xa0000000 ) { + external_depth ==8 &&ext_is_supervidel ()) {/* SuperVidel 8bpp chunky: palette has 8 bits per channel. * Without this, fb_get_color_depth() sees length 0 and * fbcon falls back to its 2-color palette — the console
@@ -2245,7 +2253,7 @@ static int ext_setcolreg(unsigned int regno, unsigned int red,return 0 ; }if (external_pmode ==FB_TYPE_PACKED_PIXELS && external_depth ==8 && - external_addr >=0xa0000000 ) { +ext_is_supervidel ()) {/* SuperVidel native 8bpp chunky scans out via the Falcon * palette registers, honoring all 8 bits per channel */
@@ -3336,7 +3344,7 @@ static int __init atafb_probe(struct platform_device *pdev)memset (screen_base,0 , external_len);/* framebuffer in SV RAM: enable the SuperBlitter */ - if (external_addr >= 0xa0000000 && + if (ext_is_supervidel() && ((external_pmode == FB_TYPE_PACKED_PIXELS && external_depth == 8) || (external_pmode == -1 &&
Signature · 1 line
2.43.0
Quoted 9 lines · Miro Kropacek
A framebuffer at
0xa0000000or above is taken as being in SuperVidel RAM. A TT with a VME graphics card such as the Nova has its framebuffer there too, so in 8bpp it gets the Falcon palette registers instead of the card's VGA DAC, and in 8, 16 and 32bpp the SuperBlitter, which it does not have.The SuperVidel exists only for the Falcon, so check for the Falcon video hardware as well.
Quoted 8 lines
Fixes 51df976c3268 ("fbdev: atafb: Add support for further video bit depths on atafb:external")Fixes d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter")Reported-by Christian Zietz <[email protected]>Signed-off-by Miro Kropacek <[email protected]>--- drivers/video/fbdev/atafb.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
applied.
Thanks!
Helge