<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi all,<br>
<br>
here's a summary of the experiments I have been doing.<br>
<br>
* A RS690 can not render a full-HD image in the vertical blanking time
(@50Hz) but the engine should easily be able to render a full screen
when split in two halves. This is the assumption I'm now working with
and I feel confident about this.<br>
<br>
* For testing purpose I'm rendering the source image (SD-TV) to a top
and bottom half, I'm using the full image scaled to half the height,
this eases comparison between the top and bottom segment. Before
rendering a segment I load the AVIVO_D1MODE_VLINE_START_END register
and issue a WAIT_UNTIL condition. These are some of the results:<br>
(hope this table works :-/)<br>
<table border="1" cellpadding="2" cellspacing="2" height="480"
width="496">
<tbody>
<tr>
<td valign="top"><br>
</td>
<td valign="top">INV</td>
<td valign="top">start<br>
</td>
<td valign="top">stop<br>
</td>
<td valign="top"><br>
</td>
<td valign="top">Result<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half<br>
</td>
<td valign="top">Set<br>
Set<br>
</td>
<td valign="top">0<br>
540<br>
</td>
<td valign="top">540<br>
1080<br>
</td>
<td valign="top">WAIT+FE<br>
WAIT+FE<br>
</td>
<td valign="top">tearing<br>
tearing<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top">Set<br>
Set<br>
</td>
<td valign="top">0<br>
540<br>
</td>
<td valign="top">540<br>
1080<br>
</td>
<td valign="top">FE<br>
FE<br>
</td>
<td valign="top">tearing<br>
tearing<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">0<br>
540<br>
</td>
<td valign="top">540<br>
1080<br>
</td>
<td valign="top">FE<br>
FE<br>
</td>
<td valign="top">tearing<br>
tearing<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top">Set<br>
Set<br>
</td>
<td valign="top">540<br>
0</td>
<td valign="top">1080<br>
540</td>
<td valign="top">WAIT+FE<br>
WAIT+FE<br>
</td>
<td valign="top">tearing<br>
STABLE<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top">Set<br>
Set<br>
</td>
<td valign="top">0<br>
540<br>
</td>
<td valign="top">540<br>
1080<br>
</td>
<td valign="top">RE<br>
RE<br>
</td>
<td valign="top">tearing<br>
STABLE<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">0<br>
540<br>
</td>
<td valign="top">540<br>
1080<br>
</td>
<td valign="top">RE<br>
RE<br>
</td>
<td valign="top">tearing<br>
STABLE<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">270<br>
810<br>
</td>
<td valign="top">275<br>
815<br>
</td>
<td valign="top">RE<br>
RE<br>
</td>
<td valign="top">tearing<br>
STABLE</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">540<br>
1080<br>
</td>
<td valign="top">545<br>
1085<br>
</td>
<td valign="top">RE<br>
RE<br>
</td>
<td valign="top">tearing<br>
STABLE</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">810<br>
270<br>
</td>
<td valign="top">815<br>
275<br>
</td>
<td valign="top">RE<br>
RE<br>
</td>
<td valign="top">tearing<br>
tearing<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">-<br>
0<br>
</td>
<td valign="top">-<br>
5<br>
</td>
<td valign="top">-<br>
RE<br>
</td>
<td valign="top">tearing<br>
STABLE<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">1080<br>
-<br>
</td>
<td valign="top">1085<br>
-<br>
</td>
<td valign="top">RE<br>
-<br>
</td>
<td valign="top">tearing<br>
tearing<br>
</td>
</tr>
<tr>
<td valign="top">top half<br>
bottom half</td>
<td valign="top"><br>
</td>
<td valign="top">0<br>
-<br>
</td>
<td valign="top">5<br>
-<br>
</td>
<td valign="top">RE<br>
-<br>
</td>
<td valign="top">tearing<br>
tearing<br>
</td>
</tr>
</tbody>
</table>
RE=RADEON_WAIT_RE_CRTC_VLINE<br>
FE=RADEON_WAIT_FE_CRTC_VLINE<br>
WAIT=RADEON_WAIT_CRTC_VLINE<br>
<br>
* I can only get the bottom segment stable, top is always tearing. If I
scale the playback window to normal size (around 300 lines) the top
segment is tearing and the bottom segment is stable, this is
independent of the position of the window (top/bottom screen). The
register values for vertical blanking are fixed and do not scale with
the window in this test, very surprising.<br>
<br>
* To see if the problem would be in the source data I added a 2ms delay
between the loading of the data in the framebuffer and the starting of
the rendering, this has no effect.<br>
<br>
* I tried using 3 wait points (line 0, 270, 810). This is causing
mplayer to slow down video playback (complains too slow machine). Every
wait_until seems to be waiting for a full frame instead of the
sequential position in one frame. <br>
<br>
* I tried putting all commands in the ring buffer to ensure execution
in the right order:<br>
- Write VLINE_START_END, write WAIT_UNTIL<br>
- Write Vertex data top segement<br>
- Write R300_DC_FLUSH_3D<br>
- Write VLINE_START_END, write WAIT_UNTIL<br>
- Write Vertex data bottom segement<br>
- Write R300_DC_FLUSH_3D<br>
The documentation seems to suggest this is needed for R500 chips but
should have no effect on R300 chips. On the RS690 this has no effect,
identical results. There seems to be a minor bug in the current code
here where the space in the ringbuffer is allocated, not sure if this
is critical.<br>
<br>
* The AVIVO_D1MODE_VLINE_START_END is doing something but it's not
clear what is happening. The register size also puzzles me, there seem
to be 14 bits reserved for start and stop position (IRC blog) while the
vertical counter register only has 13 bits.<br>
<br>
I'm really starting to run out of idea's here, any input would be very
appreciated. The system is intended as a HTPC connected to a full-HD
LCD but is pretty useless with the current performance. Fglrx drivers
are incredible unstable with full-HD and 64-bit platform and also do
not seem to resolve the tearing issue.<br>
<br>
Christiaan.<br>
<br>
</body>
</html>