2003-07-12 15:37:06

by Jan Dittmer

[permalink] [raw]
Subject: agpgart, nforce2, radeon and agp fastwrite

Hi,

just took me half a hour to figure out. On nforce2 you have to disable
agp fastwrites, otherwise X locks hard on startup with the following
(from serial console).

Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected NVIDIA nForce2 chipset
agpgart: Maximum main memory to use for agp memory: 816M
agpgart: AGP aperture is 128M @ 0xd0000000
[drm] Initialized radeon 1.9.0 20020828 on minor 0
agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
agpgart: Putting AGP V2 device at 0000:00:00.0 into 2x mode
agpgart: Putting AGP V2 device at 0000:02:00.0 into 2x mode

No response, neither by ping, nor sysrq or anything else. just dead.
I already defined AGP_DEBUG in agp.h but that doesn't make it noisier.

# lspci -v
02:00.0 VGA compatible controller: ATI Technologies Inc Radeon R200 QL
[Radeon )
Subsystem: Hercules: Unknown device 0000
Flags: bus master, stepping, 66Mhz, medium devsel, latency 32,
IRQ 5
Memory at d8000000 (32-bit, prefetchable) [size=128M]
I/O ports at a000 [size=256]
Memory at e2000000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [58] AGP version 2.0
Capabilities: [50] Power Management version 2

Without AGP Fastwrites turned on, it all works wonderful. Just if
anybody encounters the same problem.
Mainboard is nForce2 based, graphics is radeon 8500le (R200).

Jan

--
Linux rubicon 2.5.75-mm1-jd1 #2 SMP Fri Jul 11 12:49:37 CEST 2003 i686


2003-07-12 20:09:07

by Dave Jones

[permalink] [raw]
Subject: Re: agpgart, nforce2, radeon and agp fastwrite

On Sat, Jul 12, 2003 at 05:51:42PM +0200, Jan Dittmer wrote:
> just took me half a hour to figure out. On nforce2 you have to disable
> agp fastwrites, otherwise X locks hard on startup with the following
> (from serial console).
> ...
>
> Without AGP Fastwrites turned on, it all works wonderful. Just if
> anybody encounters the same problem.
> Mainboard is nForce2 based, graphics is radeon 8500le (R200).

Could be that the nforce & radeon don't play well together.
Anyone using fast writes without problems with non-ATI cards & nforce ?
If it works there, it's trivial to blacklist ATI cards and make them
unable to enable fast writes in the gart driver.

Dave

2003-07-12 21:00:07

by Dave Jones

[permalink] [raw]
Subject: Re: agpgart, nforce2, radeon and agp fastwrite

On Sat, Jul 12, 2003 at 11:10:22PM +0200, Jan Dittmer wrote:
> Forgot to mention I had to use this patchlet to get nvidia-agp to link
> properly.
>
> Jan
>
> --- linux-mm/drivers/char/agp/generic.c Thu Jul 3 15:04:06 2003
> +++ 2.5.73-mm3/drivers/char/agp/generic.c Wed Jul 9 10:04:34 2003
> @@ -39,7 +39,7 @@
>
> __u32 *agp_gatt_table;
> int agp_memory_reserved;
> -
> +EXPORT_SYMBOL(agp_memory_reserved)


Girr. I'm not entirely happy about exporting that if I can help it.
It's annoying that the nvidia_insert_memory() routine is 99% the same
as the generic routine. If it could use that, we'd not have to worry
about the export.

A possible fix could be teaching the generic routine about offsets
where the table really begins in the GART. (nforce wants a 64MB GART
for a 32MB aperture, and needs to begin at some wierd offset..

Let me think a little on this one before merging that export.

Dave

--
Dave Jones http://www.codemonkey.org.uk

2003-07-12 20:55:41

by Jan Dittmer

[permalink] [raw]
Subject: Re: agpgart, nforce2, radeon and agp fastwrite

Dave Jones wrote:
> On Sat, Jul 12, 2003 at 05:51:42PM +0200, Jan Dittmer wrote:
> > just took me half a hour to figure out. On nforce2 you have to disable
> > agp fastwrites, otherwise X locks hard on startup with the following
> > (from serial console).
> > ...
> >
> > Without AGP Fastwrites turned on, it all works wonderful. Just if
> > anybody encounters the same problem.
> > Mainboard is nForce2 based, graphics is radeon 8500le (R200).
>
> Could be that the nforce & radeon don't play well together.
> Anyone using fast writes without problems with non-ATI cards & nforce ?
> If it works there, it's trivial to blacklist ATI cards and make them
> unable to enable fast writes in the gart driver.
>
Forgot to mention I had to use this patchlet to get nvidia-agp to link
properly.

Jan

--- linux-mm/drivers/char/agp/generic.c Thu Jul 3 15:04:06 2003
+++ 2.5.73-mm3/drivers/char/agp/generic.c Wed Jul 9 10:04:34 2003
@@ -39,7 +39,7 @@

__u32 *agp_gatt_table;
int agp_memory_reserved;
-
+EXPORT_SYMBOL(agp_memory_reserved)
/*
* Generic routines for handling agp_memory structures -
* They use the basic page allocation routines to do the brunt of the
work.


--
Linux rubicon 2.5.75-mm1-jd10 #1 SMP Sat Jul 12 19:40:28 CEST 2003 i686

2003-07-13 20:07:42

by Rahul Karnik

[permalink] [raw]
Subject: Re: agpgart, nforce2, radeon and agp fastwrite

Jamie Lokier wrote:
> Dave Jones wrote:
>
>>Girr. I'm not entirely happy about exporting that if I can help it.
>>It's annoying that the nvidia_insert_memory() routine is 99% the same
>>as the generic routine. If it could use that, we'd not have to worry
>>about the export.
>
>
> Is it time to teach the module loader how to patch certain binaries? :)

No, this is the NForce AGP module Dave is talking about that NVidia
contributed.

- Rahul
--
Rahul Karnik
[email protected]

2003-07-13 13:22:48

by Jamie Lokier

[permalink] [raw]
Subject: Re: agpgart, nforce2, radeon and agp fastwrite

Dave Jones wrote:
> Girr. I'm not entirely happy about exporting that if I can help it.
> It's annoying that the nvidia_insert_memory() routine is 99% the same
> as the generic routine. If it could use that, we'd not have to worry
> about the export.

Is it time to teach the module loader how to patch certain binaries? :)

-- Jamie

2003-07-13 10:02:46

by Jaakko Niemi

[permalink] [raw]
Subject: Re: agpgart, nforce2, radeon and agp fastwrite


Dave Jones wrote:
>On Sat, Jul 12, 2003 at 05:51:42PM +0200, Jan Dittmer wrote:
> > just took me half a hour to figure out. On nforce2 you have to disable
> > agp fastwrites, otherwise X locks hard on startup with the following
> > (from serial console).
> > ...
> >
> > Without AGP Fastwrites turned on, it all works wonderful. Just if
> > anybody encounters the same problem.
> > Mainboard is nForce2 based, graphics is radeon 8500le (R200).
>
>Could be that the nforce & radeon don't play well together.
>Anyone using fast writes without problems with non-ATI cards & nforce ?
>If it works there, it's trivial to blacklist ATI cards and make them
>unable to enable fast writes in the gart driver.

Turning on fastwrites produces hangs on at least four different VIA based
motherboards and five different radeons.

--j