From: Mikulas P. <mpa...@re...> - 2009-06-17 21:05:36
|
On Wed, 17 Jun 2009, Ville Syrjälä wrote: > On Wed, Jun 17, 2009 at 06:02:30AM -0400, Mikulas Patocka wrote: > > On my card, the accelerator corrupts display if its line length is not > > multiple of 64 bytes. > > > > Misaligned lines in the drawn recrangle are shifted left, as if the accelerator > > thought that every line begins on 64-byte boundary. For example, in 800x600x8 > > (scanlines are aligned on 32 bytes) every odd scanline is drawn shifted by > > 32 bytes to the left. > > > > The card is ATI Technologies Inc 3D Rage Pro 215GP (rev 5c) onboard on > > Sparc64 Ultra 5. > > I think normally the offset should be just aligned to 8 bytes and pitch > to 8 bytes and 8 pixels. > > I was under the impression that 64 byte aligned offset and pitch are only > required if block writes are used. But perhaps it is always required > with SGRAM/WRAM, or perhaps you have auto block writes enabled. Can you > check the memory type and the the value of the HW_DEBUG register? Memory is SGRAM M32L1632512A-8Q. See this: http://www.digchip.com/datasheets/parts/datasheet/581/M32L1632512A.php The status line is: atyfb: 3D RAGE PRO (Mach64 GP, PQFP, PCI) [0x4750 rev 0x7c] atyfb: 4M SGRAM (1:1), 14.31818 MHz XTAL, 230 MHz PLL, 100 Mhz MCLK, 100 MHz XCLK The debug register is zero (printed with printk("ATI INIT ENGINE, DEBUG %08X", aty_ld_le32(HW_DEBUG, par)); at the end of aty_init_engine). > > This patch disables accelerator if scanline is not multiple of 64 bytes. > > A better option would be to round the pitch up in check_var(). Also it > would be more proper to use fix.line_length as the pitch value instead > of var.xres_virtual. That way check_var() could leave var.xres_virtual > alone and just round fix.line_length to whatever is required. > > Actually now that I think about it I would prefer to round to 64 bytes > always when SGRAM/WRAM is found. The reason is that the mach64 DirectFB > driver always enables auto block writes on SGRAM boards and if atyfb > uses less alignment things will not work correctly. Perhaps atyfb should > enable auto block writes too. So patch it to align line length (I don't know fb well to pick the right place) and send me the patch and I'll test it. BTW. why doesn't it use accelerator for screen scrolling? It seems to redraw all non-empty characters, which is fast if most of the screen is empty but gets slower if the screen is full of text. Mikulas > -- > Ville Syrjälä > sy...@sc... > http://www.sci.fi/~syrjala/ > |