Problem with persistent scaling/shifting in RADEONDisplayVideo()

Thomas Hilber xorg-driver-ati at
Fri Jul 25 11:09:01 PDT 2008

Hi list,

first of all I want to thank you for your great progress to support 
Radeons with your xf86-video-ati driver. 

I now started a project to use Radeons as RGB/PAL output devices for VDR

It is now possible to alter the 50Hz frame rate dynamically in very small
units (30usec per second). So I can fully synchronize VGAs frame rate 
with incoming DVB stream. This way a VGA can provide interlaced PAL 
output without any jerkyness or field loss. 

I tried with several Radeons (7000, 9200SE, 9250, 9600SE, IGP-9100) and
all are working great basically.

The trick is quite simple but effective:
I abuse vertical blank interrupt of Radeon DRM driver to temporarily 
alter the length of a few scan lines.

If interested please have a look at these threads:

But there is one litte issue with scaling left that keeps me away 
from a productive system.

For my application it is important that even and odd fields are copied
strictly 1:1 to the frame buffer. Any scaling in Y dimension must be
disabled. Otherwise even/odd fields overwrite each other producing jitter.

But it appears that even if I supply the following parameters to

src_x 0 src_y 0 drw_x 0 drw_y 0 src_w 720 src_h 576 drw_w 720 drw_h 576

the source is not copied exactly 100% to the destination. It appears if
there still takes place a vertical shift of 1/2 pixel or even less.

As a consequence the picture jitters a little.

It tried alot to fix this and finally found a crude workaround:

If I reduce drw_h==576 from above example to drw_h==575 this implies
a minimum scale in vertical dimension (squeeze). By this simple trick 
I almost get a perfect picture. Only the very upper and lower borders still
show some jitter effect.

Obviously my workaround largely compensates for the persistent and 
unwanted 'default' image shift from above.

I also tested with your newly introduced great textured XV adaptor. I 
get excellent picture quality there without any workaround.

The change from one frame to the next frame does not take place within
one scanline as in the case for double buffered overlay XV adaptor.
An area of many scanlines is involved. Large enough that I can't hide it 
completely behind the vertical blanking interval. Thus it appears that I 
can't use textured XV for my system.

Finally my questions concerning the overlay XV adaptor:

- can anybody imagine why there is a (minimal) static shift in XV overlay?
- is there a simple way to just disable ANY scaling/shifting etc?
- is there available some more information about the coding or register
usage in RADEONPutImage() and RADEONDisplayVideo()?
- any other suggestions?

Thank you for readig this

More information about the xorg-driver-ati mailing list