ATI Evergreen and the Kernel Driver

Hi Mario, I see you've added some preliminary support for ATI 5xxx series cards to the kernel driver. As I have a 5870 in a Mac Pro, I wondered if there was anything I could usefully test?

Are there any registers to tweak to reproduce the 10bit support already present for earlier ATI cards?

Cheers, Ian
I also have a 5870 in a Mac Pro, and would be willing to do testing.

Matt

--- In psychtoolbox@yahoogroups.com, "IanA" <iandol@...> wrote:
>
> Hi Mario, I see you've added some preliminary support for ATI 5xxx series cards to the kernel driver. As I have a 5870 in a Mac Pro, I wondered if there was anything I could usefully test?
>
> Are there any registers to tweak to reproduce the 10bit support already present for earlier ATI cards?
>
> Cheers, Ian
>
--- In psychtoolbox@yahoogroups.com, "IanA" <iandol@...> wrote:
>
> --- In psychtoolbox@yahoogroups.com, "Mario" <mario.kleiner@> wrote:
> > Is this a single display setup?
>
> Dual display, Output is to a CRT on the second displayport.
>
> > System freeze means that Matlab hangs? Not the whole system -- you don't need to power-cycle the machine?
>
> The whole machine froze, needing a power-cycle.
>

Ok, that's unexpected and a bit ugly. Usually just reading the wrong hardware register or such would not cause a gpu or system hang. But then there's no technical reason it shouldn't...

Maybe it doesn't like it if one tries to get information from a disabled scanout engine and hangs? In that case, one of the 6 values for 'ScreenToHead' should finally work.

Or the os/x graphics driver configures the card in a slightly different manner than on linux.

> > Can you post the output of the system log after the driver has loaded and before you run the test?
>

The output of the driver looks good now. One option would be to map BAR 4 instead of BAR 2. Both areas look suspiciously similar in size and format, altough the linux driver suggests that BAR 2 is the right choice. But then who knows what the crazy Apple hardware does different?

Keep us updated about the other tests.
-mario


> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver::start() called from IOKit. Starting up and trying to attach to GPU:
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Our provider service is: PXS1
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI device id is 6898
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: This is a ATI/AMD GPU, hopefully a compatible Radeon...
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Confirmed to have ATI's vendor id.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: This is a GPU with DCE-4 display engine.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[0] 80000000:10000000
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[1] 90400000:00020000
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: ==> AMD/ATI Radeon PCI Range[1] 90400000:00020000 is 1. candidate for register block.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[2] 00003000:00000100
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[3] 90420000:00020000
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: ==> AMD/ATI Radeon PCI Range[3] 90420000:00020000 is 2. candidate for register block.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Found 2 candidates for Radeon register block.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Range@0x18 90400000:00020000
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: GPU MMIO register block Range@0x18 (90400000) mapped to kernel virtual address 8265b000
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Psychtoolbox-3 kernel-level support driver V1.2 for ATI Radeon and NVidia GeForce GPU's ready for use!
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: This driver is copyright 2008, 2009, 2010, 2011 Mario Kleiner and the Psychtoolbox-3 project developers.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: The driver is licensed to you under GNU General Public License (GPL) Version 2 or later,
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: see the file License.txt in the Psychtoolbox root installation folder for details.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: The driver contains bits of code derived from the free software nouveau and radeon kms drivers on Linux.
> 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: See driver source code for specific copyright notices of the compatible licenses of those bits.
>
> > And the output of PerceptualVBLSyncTest with Screen('Preference','Verbosity', 20); - Matlab's diary on command can help to log the output to a file.
>
> I only see the following:
>
> Screen('Preference','Verbosity', 20);
> PTB-INFO: Connection to Psychtoolbox kernel support driver established. Will use the driver...
>
> > Plots of BeampositionTest?
>
> It also hangs the system completely...
>
> > If you repeat with calling Screen('Preference','ScreenToHead', 0, headid); trying all values of headid between 0 and 5.
>
> ...and thus I haven't tried this.
>
> I will disable multi-monitors and see what happens.
>
> Ian
>
Hi Ian

Ok, i talked to my guru at AMD and he says it should work from the hardware side and might be a pure os/x problem. Which gives me a new hunch what might go wrong.

Are you using a very recent (mid 2010 or later) model of a Mac Pro with 10.6? If so, it will use a 64 bit operating system kernel and our driver is very likely incompatible with those - it hasn't been ported to 64 bit and will do really ugly things, like read completely random system memory locations, which can cause your symptoms and also hard system crash.

Some versions of OS/X can be forced to boot a 32 bit kernel by holding down the 3 and 2 key simultaneously while powering up. I'm not sure if this is os/X server only or also for the regular os/x client, but it might be worth a try to see if our driver then works less wrong -- at least doesn't crash anymore.

-mario


--- In psychtoolbox@yahoogroups.com, "Mario" <mario.kleiner@...> wrote:
>
>
>
> --- In psychtoolbox@yahoogroups.com, "IanA" <iandol@> wrote:
> >
> > --- In psychtoolbox@yahoogroups.com, "Mario" <mario.kleiner@> wrote:
> > > Is this a single display setup?
> >
> > Dual display, Output is to a CRT on the second displayport.
> >
> > > System freeze means that Matlab hangs? Not the whole system -- you don't need to power-cycle the machine?
> >
> > The whole machine froze, needing a power-cycle.
> >
>
> Ok, that's unexpected and a bit ugly. Usually just reading the wrong hardware register or such would not cause a gpu or system hang. But then there's no technical reason it shouldn't...
>
> Maybe it doesn't like it if one tries to get information from a disabled scanout engine and hangs? In that case, one of the 6 values for 'ScreenToHead' should finally work.
>
> Or the os/x graphics driver configures the card in a slightly different manner than on linux.
>
> > > Can you post the output of the system log after the driver has loaded and before you run the test?
> >
>
> The output of the driver looks good now. One option would be to map BAR 4 instead of BAR 2. Both areas look suspiciously similar in size and format, altough the linux driver suggests that BAR 2 is the right choice. But then who knows what the crazy Apple hardware does different?
>
> Keep us updated about the other tests.
> -mario
>
>
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver::start() called from IOKit. Starting up and trying to attach to GPU:
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Our provider service is: PXS1
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI device id is 6898
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: This is a ATI/AMD GPU, hopefully a compatible Radeon...
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Confirmed to have ATI's vendor id.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: This is a GPU with DCE-4 display engine.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[0] 80000000:10000000
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[1] 90400000:00020000
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: ==> AMD/ATI Radeon PCI Range[1] 90400000:00020000 is 1. candidate for register block.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[2] 00003000:00000100
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: PCI Range[3] 90420000:00020000
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: ==> AMD/ATI Radeon PCI Range[3] 90420000:00020000 is 2. candidate for register block.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Found 2 candidates for Radeon register block.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Range@0x18 90400000:00020000
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: GPU MMIO register block Range@0x18 (90400000) mapped to kernel virtual address 8265b000
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: Psychtoolbox-3 kernel-level support driver V1.2 for ATI Radeon and NVidia GeForce GPU's ready for use!
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: This driver is copyright 2008, 2009, 2010, 2011 Mario Kleiner and the Psychtoolbox-3 project developers.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: The driver is licensed to you under GNU General Public License (GPL) Version 2 or later,
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: see the file License.txt in the Psychtoolbox root installation folder for details.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: The driver contains bits of code derived from the free software nouveau and radeon kms drivers on Linux.
> > 17/01/2011 10:49:45 kernel PsychtoolboxKernelDriver: See driver source code for specific copyright notices of the compatible licenses of those bits.
> >
> > > And the output of PerceptualVBLSyncTest with Screen('Preference','Verbosity', 20); - Matlab's diary on command can help to log the output to a file.
> >
> > I only see the following:
> >
> > Screen('Preference','Verbosity', 20);
> > PTB-INFO: Connection to Psychtoolbox kernel support driver established. Will use the driver...
> >
> > > Plots of BeampositionTest?
> >
> > It also hangs the system completely...
> >
> > > If you repeat with calling Screen('Preference','ScreenToHead', 0, headid); trying all values of headid between 0 and 5.
> >
> > ...and thus I haven't tried this.
> >
> > I will disable multi-monitors and see what happens.
> >
> > Ian
> >
>