ATI DualHead driver 1.0f64

dear rhea & doug

i'm responding to your several posts (984 - 989) in mid May about
problems with the ATI .Display_DualHead video driver version 1.0f64
associated with all the ATI DualHead cards (7000, 7500, and 8500).
(Apparently there's no problem with the older ATI .Display_DualHead
1.0b61 driver, e.g. in a PowerBook.) You've run a lot of tests, which
characterize the driver's performance quite thoroughly. In most
respects the driver seems to run fine.

No anomalies at all appear when the card is tested in the Mac OS X
Classic environment, but the Classic environment probably provides a
completely different driver, not that used in Mac OS 9. The Classic
driver reports itself (to cscGetGamma) as having 8 bit DACs. That's a
disappointing limitation because many of us are interested in the
DualHead card precisely because of the 10-bit DACs and associated
driver support. However, it's not a bug.

PROBLEMS:

When tested in Mac OS 9.2.2, the driver supports a 10-bit gamma
table, and exhibits four anomalies:

1. ScreenTest finishes normally, but leaves the screen black. The
gamma table needs to be reloaded. Doug discovered that the ATI
DualHead driver fails to support the standard Apple convention of
allowing us to pass a NULL pointer with cscSetGamma to request an
identity gamma table. It works if the pixelSize is 8, otherwise you
get an all-black CLUT, as reported by Rhea. This is a driver bug,
which we should report to Apple, but it should be easy to work around.

2. The write-and-read test of SetClut and GetClut failed: "~=". This
is probably because ScreenTest didn't succeed in loading an identity
gamma table, for the same reason as in 1, above.

3. The cscGetClutBehavior call to the driver is accepted but is less
effective than it should be. The call determines whether SetClut
waits, provided the priority is 1 or less. At priority above 1,
SetClut never waits. Apple may not agree that this a bug, but we
might as well report it as such, if only to explain to the engineers
why running at high priority matters to us, so they'll know when
they're writing new drivers.

4. The test reports are inconsistent on one point. Some tests
indicate that, as far as waiting for blanking, it doesn't matter
whether the call to SetClut is loading one element or all elements.
Other tests indicate that SetClut only waits if loading the whole
clut. We need to run more tests to get a definite answer on this
point.

SOLUTIONS:

I'm enclosing an enhanced version of SCREEN.mex that treats the ATI
DualHead driver as a special case and always supplies a full gamma
table instead of using the Apple shortcut of passing a NULL pointer.
Hopefully this will clear up items 1 and 2. However, I don't know
whether the driver wants the gamma values aligned with the top or the
bottom of the 16 bit word, so we may need to do another iteration to
get this right. It's presently aligned with the bottom of the word.

Could you try running the enclosed new ScreenTest.m, SetClutTest.m,
and WaitBlanking.m with the new SCREEN.mex? And post the reports on
the forum?

best

denis

p.s.
I added a diagnostic printout to SCREEN.mex, each time the new
identity gamma table is computed. This will assure us that the ATI
DualHead driver is being detected. This printout will be mildly
annoying, so I'll remove it once were sure that the fix is working.
Dear Denis, Rhea, Flip ,

OK I got screentest to run with your latest patches
and the screen no longer is blackened at exit. The
1st set you sent was leaving the screen blank still
but now seems to be working fine. The results are below.
Just as a side note I had modified my own Screen.mex
function to treat the DualHead Radeons as a Radius
card and that worked also. I replaced .Display_Marin
with .Display_DualHead in the source and recompiled
the Screen.mex function. Denis, I don't know why
our server is rejecting your verizon messages. I got
the 1st 2 with no problems. Our Sys Administrator is
checking this out for me.

On a different subject to those people that are doing
OpenGL developement there is also a bug with
the DualHead Radeons when syncing SwapBuffers
to the VBL. Under 9.2.2 the ATI cards always
SwapBuffers at the rate of the Main Device(the device
on the VGA connector). The NVidia DualHead works
properly on both devices so I will report this on the
OpenGl list and if they are not aware of it there I will
make a bug report.

Thanks again, Denis.

Doug Taylor

Denis Pelli wrote:
> dear rhea and doug
>
> yet another draft. I'm also including two files I forgot to include
> before, DescribeComputer.m and DescribeScreen.m, which belong in
> PsychOneLiners.
>
> best
>
> denis
>
> At 2:51 AM -0400 6/3/02, Denis Pelli wrote:
> >dear rhea and doug
> >
> >i've further polished the code. Here's the latest. (Discard what I
> >sent before.)
> >
> >best
> >
> >denis
> >
> >p.s. i can't send email to doug from home because his institute
> >(smith-kettlewell) has blacklisted all email from verizon.net, which
> >is my ISP.
> >
> >At 2:38 AM -0400 6/3/02, Denis Pelli wrote:
> >>dear rhea & doug
> >>
> >>i've greatly enhanced ScreenTest and i'd like to see how it works
> >>in characterizing troublesome cases like the ATI DualHead and the
> >>NVidia.
> >>
> >>just dump the enclosed files into your PsychTests folder, replacing
> >>older versions.
> >>
> >>would you mind trying ScreenTest and sending me the report?
> >>
> >>best
> >>
> >>denis
> >>
> >>ps.
> >>this report supercedes the old ScreenTest; i don't need that report
> >>if i get this one.
> >>
> >>this requires a relatively new version of screen.mex, which you
> >>both have. others can get it from recent forum messages, e.g. 1018.
> >
dear doug

thanks, but we're not out of the woods yet.

the special-case code that i inserted is VERY specific. It checks
both the name and version number of the driver. Rhea's driver was
version 1.0f64, so that's what I checked for. Your driver is version
1.0f69, so it won't match. Furthermore your ScreenTest report is not
interrupted by the diagnostic message I stuck in. Thus your driver is
passing without any special-case code. The simplest explanation would
be that Rhea's version 1.0f64 is buggy, and your version 1.0f69 is ok.

however, your ScreenTest report also shows up Rhea's other problem,
GetClut does not equal SetClut, which one would expect if the attempt
to load an identity gamma table failed.

so i removed the version check. I now treat as a special case any
driver named ".Display_DualHead" that wants a 10-bit gamma table.
This should include your and Rhea's 10-bit cards, but exclude the
older 8-bit cards that already work fine.

could you try the new, enclosed SCREEN.mex, and send me another
ScreenTest report?

could you also run ClutTest?

best

denis

p.s. there is an annoying diagnostic message, to assure us that the
driver is being detected properly. I'll remove that once you've
tested it.

>Dear Denis, Rhea, Flip ,
>
>OK I got screentest to run with your latest patches
>and the screen no longer is blackened at exit. The
>1st set you sent was leaving the screen blank still
>but now seems to be working fine. The results are below.
>Just as a side note I had modified my own Screen.mex
>function to treat the DualHead Radeons as a Radius
>card and that worked also. I replaced .Display_Marin
>with .Display_DualHead in the source and recompiled
>the Screen.mex function. Denis, I don't know why
>our server is rejecting your verizon messages. I got
>the 1st 2 with no problems. Our Sys Administrator is
>checking this out for me.
>
>On a different subject to those people that are doing
>OpenGL developement there is also a bug with
>the DualHead Radeons when syncing SwapBuffers
>to the VBL. Under 9.2.2 the ATI cards always
>SwapBuffers at the rate of the Main Device(the device
>on the VGA connector). The NVidia DualHead works
>properly on both devices so I will report this on the
>OpenGl list and if they are not aware of it there I will
>make a bug report.
>
>Thanks again, Denis.
>
>Doug Taylor
>
>
>
>ScreenTest
>*** Doug Taylor's Power Mac G4/400, Mac OS 9.2.2 *************************
>G4, 400 MHz, memory bus 100 MHz, 64.661 Mflop/s
>Psychtoolbox 2.44, 7 August 2000, Matlab 5.2.1.1421
>No serial port arbitration.
>*** Screen 0 *************************************************************
>ATY,R200i_A (.Display_DualHead version 1.0f69) in slot SLOT-A
>10 bit dacs. 1024x768 60 Hz. (56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
>--------------------------------------------------------------------------
>pixel size 8 16 32 bits
>pages 1 1 1
>CopyWindow (ie CopyBits) 185 190 191 MB/s
>GetClut equals SetClut? ~= ~= na
>SetClut suppresses ints. for 0.0 0.0 0.0 frames
>--------------------------------------------------------------------------
>Supports cscGetClutBehavior cscGetTimingRanges cscGetDetailedTiming
>1 SetClutDriverWaitsForBlanking
>--------------------------------------------------------------------------
>SetClut waits for blanking (i.e. ~60 Hz) if parameters have these values:
> prioritySequence
> 59 Hz: 0/0
> 60 Hz: 7/0
>SetClut does not wait for blanking if parameters have these values:
> prioritySequence
> 274 Hz: 7/7
>The following parameters do not affect whether SetClut waits for blanking:
> clutEntries pixelSize
>*** Screen 1 *************************************************************
>ATY,R200i_B (.Display_DualHead version 1.0f69) in slot SLOT-A
>10 bit dacs. 1024x768 85 Hz. (56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
>--------------------------------------------------------------------------
>pixel size 8 16 32 bits
>pages 1 1 1
>CopyWindow (ie CopyBits) 184 189 190 MB/s
>GetClut equals SetClut? ~= ~= na
>SetClut suppresses ints. for 0.0 0.0 0.0 frames
>--------------------------------------------------------------------------
>Supports cscGetClutBehavior cscGetTimingRanges cscGetDetailedTiming
>1 SetClutDriverWaitsForBlanking
>--------------------------------------------------------------------------
>SetClut waits for blanking (i.e. ~85 Hz) if parameters have these values:
> prioritySequence
> 77 Hz: 0/0
> 85 Hz: 7/0
>SetClut does not wait for blanking if parameters have these values:
> prioritySequence
> 284 Hz: 7/7
>The following parameters do not affect whether SetClut waits for blanking:
> clutEntries pixelSize
>**************************************************************************
>ยป