2003-02-21 04:33:08

by Toplica Tanaskovic

[permalink] [raw]
Subject: AGP backport from 2.5 to 2.4.21-pre4


I've finally succeeded to backport AGP3 routines from 2.5. At least I hope I
have. It is very Frankenstein looking but it can be compiled as module as it
can be compiled into kernel.
Any comments, directions are more than welcome, because I don't like how it
looks like. You will see some stupid includes, but that was the only way that
I could think of.
I am probably wrong, but I think that via-kt400.c in 2.5 is unnecessary, so
I've excluded it from this backport, with some changes in via-agp.c. I did
some tests, but most things are untested due to lack of hardware.

GA-7VAXPUltra (KT400) + ATI Radeon R9000 = passed.
+ GeForce 2MX400 = passed.
Chaintech 7AJA2E (KT133) + ATI Radeon R9000 = passed.
+ GeForce 2MX400 = passed.

Abit (i810) + ATI Radeon R9000 = passed.
+ GeForce 2MX400 = passed.

Forgot to write down Abit MB model, sorry.

On this ocassion i would like to ask anyone who aply this patch and something
goes wrong to send me detailed feedback.

--
Pozdrav,
Tanasković Toplica


Attachments:
(No filename) (1.01 kB)
agp3.diff.bz2 (49.92 kB)
Download all attachments

2003-02-21 09:11:33

by Samium Gromoff

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

> GA-7VAXPUltra (KT400) + ATI Radeon R9000 = passed.
> + GeForce 2MX400 = passed.
> Chaintech 7AJA2E (KT133) + ATI Radeon R9000 = passed.
> + GeForce 2MX400 = passed.
>
> Abit (i810) + ATI Radeon R9000 = passed.
> + GeForce 2MX400 = passed.

From all this hardware only the KT400+R9000 pair possibly engage in AGP8x transfers,
and i`m suspicious whether R9000 does it at all...

So i think somebody testing it on real AGP3.0-capable hardware would do good...

regards, Samium Gromoff

2003-02-21 11:40:24

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana petak 21. februar 2003. 10:20, Samium Gromoff je napisao/la:
>
> From all this hardware only the KT400+R9000 pair possibly engage in AGP8x
> transfers, and i`m suspicious whether R9000 does it at all...
>
No, AGP4x max. As I said I did only a few tests, due to lack of hardware.
>
> So i think somebody testing it on real AGP3.0-capable hardware would do
> good...
>

That would be most apreciated. But I would like to see results for other
chipsets AGP8x, AGP4x deosn't mather.

--
Pozdrav,
Tanasković Toplica


2003-02-21 13:11:00

by Dave Jones

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

On Fri, Feb 21, 2003 at 12:20:51PM +0300, Samium Gromoff wrote:
> > GA-7VAXPUltra (KT400) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 = passed.
> > Chaintech 7AJA2E (KT133) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 = passed.
> >
> > Abit (i810) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 = passed.
>
> From all this hardware only the KT400+R9000 pair possibly engage in AGP8x transfers,
> and i`m suspicious whether R9000 does it at all...
>
> So i think somebody testing it on real AGP3.0-capable hardware would do good...

A big issue is that there is no AGP3.0 card currently supported by DRI.
For an AGPx8 test, your only choice seems to be to hack the binary
drivers provided by ATi etc to try and work with the newstyle gart.

Dave

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2003-02-21 13:18:16

by Dave Jones

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

On Fri, Feb 21, 2003 at 05:40:19AM +0100, Toplica Tanaskovi?? wrote:

<hopefully you'll see this on Linux-kernel, as eunet.yu is unresolvable
here, and I'm getting bounces>

> I am probably wrong, but I think that via-kt400.c in 2.5 is unnecessary, so
> I've excluded it from this backport, with some changes in via-agp.c. I did
> some tests, but most things are untested due to lack of hardware.

Yes. via-kt400.c was unnecessary (well, it was useful as a standalone
whilst I was developing it) , which was why it was later merged into
via-agp.c in 2.5.60. There were also a bunch of other fixes merged
there, so if you based your backport on an earlier version, I suggest
you grab those changes.

Dave

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2003-02-21 14:19:58

by Edward Killips

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

On my GA-7VAXP (KT400) with an AIW 9700 Pro Radeon the agpgart module
would not load. It could not set the apeture size.

-Edward Killips.


On Fri, 21 Feb 2003, Samium Gromoff wrote:

> > GA-7VAXPUltra (KT400) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 = passed.
> > Chaintech 7AJA2E (KT133) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 = passed.
> >
> > Abit (i810) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 = passed.
>
> From all this hardware only the KT400+R9000 pair possibly engage in AGP8x transfers,
> and i`m suspicious whether R9000 does it at all...
>
> So i think somebody testing it on real AGP3.0-capable hardware would do good...
>
> regards, Samium Gromoff
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2003-02-21 14:38:07

by Dave Jones

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

On Fri, Feb 21, 2003 at 09:27:55AM -0500, Edward Killips wrote:
> On my GA-7VAXP (KT400) with an AIW 9700 Pro Radeon the agpgart module
> would not load. It could not set the apeture size.

Looks like the backport was based on too early a snapshot.
The via-agp.c in 2.5.62 should work fine.

Dave

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2003-02-21 16:45:35

by Matthew D. Pitts

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4


----- Original Message -----
From: "Samium Gromoff" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Friday, February 21, 2003 4:20 AM
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4


> > GA-7VAXPUltra (KT400) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 =
passed.
> > Chaintech 7AJA2E (KT133) + ATI Radeon R9000 = passed.
> > + GeForce 2MX400 =
passed.
> >
> > Abit (i810) + ATI Radeon R9000 =
passed.
> > + GeForce 2MX400 =
passed.
>
> From all this hardware only the KT400+R9000 pair possibly engage in AGP8x
transfers,
> and i`m suspicious whether R9000 does it at all...
>
> So i think somebody testing it on real AGP3.0-capable hardware would do
good...
I plan to do that as soon as possible.

2003-02-22 06:13:56

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana petak 21. februar 2003. 14:40 napisali ste:

>
> Yes. via-kt400.c was unnecessary (well, it was useful as a standalone
> whilst I was developing it) , which was why it was later merged into
> via-agp.c in 2.5.60. There were also a bunch of other fixes merged
> there, so if you based your backport on an earlier version, I suggest
> you grab those changes.
>
Done, also fixed warnings from previous patch, and what is most important
fixed page locking, no more segmantation faults when unloading drm module.

All test for previous patch passed for this one too, except i've now tested it
with GA-7VRX (KT333) too.

BTW code is backported from 2.5.62.

--
Pozdrav,
Tanasković Toplica



Attachments:
(No filename) (695.00 B)
agp3.diff.bz2 (49.99 kB)
Download all attachments

2003-02-22 17:47:01

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana petak 21. februar 2003. 15:27, Edward Killips je napisao/la:
>
> On my GA-7VAXP (KT400) with an AIW 9700 Pro Radeon the agpgart module
> would not load. It could not set the apeture size.
>
> -Edward Killips.
>

I've send new patch, try it please and send me results.
--
Pozdrav,
Tanasković Toplica


2003-02-22 22:56:47

by Edward Killips

[permalink] [raw]
Subject: RE: AGP backport from 2.5 to 2.4.21-pre4


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The apeture is now set correctly. The ATI 4.2.0-2.5.1 drivers don't work but I
think that is a dri problem. Everything works fine with the vesa drivers using XFree86 4.2.99.

- -Edward Killips

- -----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Toplica
Tanaskovic
Sent: Saturday, February 22, 2003 1:21 AM
To: Dave Jones
Cc: [email protected]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4


Dana petak 21. februar 2003. 14:40 napisali ste:

>
> Yes. via-kt400.c was unnecessary (well, it was useful as a standalone
> whilst I was developing it) , which was why it was later merged into
> via-agp.c in 2.5.60. There were also a bunch of other fixes merged
> there, so if you based your backport on an earlier version, I suggest
> you grab those changes.
>
Done, also fixed warnings from previous patch, and what is most important
fixed page locking, no more segmantation faults when unloading drm module.

All test for previous patch passed for this one too, except i've now tested it
with GA-7VRX (KT333) too.

BTW code is backported from 2.5.62.

- --
Pozdrav,
Tanaskovic Toplica



-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPlgCwXg7wzlNS3haEQIa+wCgghCr47gdTARzeQ60vLYypWZQPuMAn2S0
Wndxm6BEpA0t8o23iL6SaLz8
=sQHD
-----END PGP SIGNATURE-----

2003-02-23 13:44:13

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana nedelja 23. februar 2003. 00:07 napisali ste:
> The apeture is now set correctly. The ATI 4.2.0-2.5.1 drivers don't work
> but I think that is a dri problem. Everything works fine with the vesa
> drivers using XFree86 4.2.99.
>

That's good, but ATI 4.2.0-2.5.1. should work, try loading fglrx.o manualy:

telinit 3
insmod /path/fglrx.o
telinit 5

Then go and check ATI control panel, and please send me results, on my R9000
it reports AGP4x which is OK, I hope it will be 8x for you.
--
Pozdrav,
Tanasković Toplica


2003-02-23 15:52:09

by Sheng Long Gradilla

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

I tested on an Asus A7V8X motherboard (KT400) with a GeForce4 Ti 4200
AGP8X. The module loads correctly, at last! It sets the apperture size
correctly and all, but when I start XFree, I get do not get any
graphical screen, but text mode garbage. Characters of all colors, with
no sense at all. I had exactly the same problem in other kernels.

I played a bit with the NvAGP option on XF86Config file. According to
the documentation, 0 is PCI mode, 1 is NvAGP or fallback to PCI if
failed, 2 is AGPGART mode or fallback to PCI if failed, 3 is autodetect.
If I set it to 2, 3 or comment it, I got the same problem with the
garbage and had to reset the PC. Setting it to 0 would make it run in
PCI mode, and it always works. I tried setting it to 1, thinking that
maybe the documentation is wrong. X started successfully, but the card
was in PCI mode. I read the logs to confirm it, and indeed, the NvAGP
module fails to identify the AGP chipset and falls back to PCI.

I tried setting NvAGP to 2 again, to read the logs and see if there is
something I could find out, but unfortunately the log had nothing but
garbage. I tried several times with no success. The log is always garbage.

- Sheng Long Gradilla

2003-02-23 18:36:15

by Edward Killips

[permalink] [raw]
Subject: RE: AGP backport from 2.5 to 2.4.21-pre4


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I tried. fglrx.o loads without errors, but when X starts I get a blank screen. The last thing that appears in the logs for XFree86 (version 4.2.99) is the drm initialization. The card and the XF86Config file both work fine under Linux if I use them with a machine that only supports 4x AGP and does not support AGP 3.0.

- -Edward Killips

- -----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Toplica
Tanaskovic
Sent: Sunday, February 23, 2003 8:51 AM
To: [email protected]
Cc: [email protected]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4


Dana nedelja 23. februar 2003. 00:07 napisali ste:
> The apeture is now set correctly. The ATI 4.2.0-2.5.1 drivers don't work
> but I think that is a dri problem. Everything works fine with the vesa
> drivers using XFree86 4.2.99.
>

That's good, but ATI 4.2.0-2.5.1. should work, try loading fglrx.o manualy:

telinit 3
insmod /path/fglrx.o
telinit 5

Then go and check ATI control panel, and please send me results, on my R9000
it reports AGP4x which is OK, I hope it will be 8x for you.
- --
Pozdrav,
Tanaskovic Toplica


-

2003-02-23 19:35:05

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana nedelja 23. februar 2003. 17:02 napisali ste:
> I tested on an Asus A7V8X motherboard (KT400) with a GeForce4 Ti 4200
> AGP8X. The module loads correctly, at last! It sets the apperture size
> correctly and all, but when I start XFree, I get do not get any
> graphical screen, but text mode garbage. Characters of all colors, with
> no sense at all. I had exactly the same problem in other kernels.
>
What kernels? Are you using old agpgart or new one with other kernels?

> I played a bit with the NvAGP option on XF86Config file. According to
> the documentation, 0 is PCI mode, 1 is NvAGP or fallback to PCI if
> failed, 2 is AGPGART mode or fallback to PCI if failed, 3 is autodetect.
> If I set it to 2, 3 or comment it, I got the same problem with the
> garbage and had to reset the PC. Setting it to 0 would make it run in
> PCI mode, and it always works. I tried setting it to 1, thinking that
> maybe the documentation is wrong. X started successfully, but the card
> was in PCI mode. I read the logs to confirm it, and indeed, the NvAGP
> module fails to identify the AGP chipset and falls back to PCI.
>
> I tried setting NvAGP to 2 again, to read the logs and see if there is
> something I could find out, but unfortunately the log had nothing but
> garbage. I tried several times with no success. The log is always garbage.
>
Try fetching latest nVidia drivers.

I'll try to isolate problem, and send patch if neccessery.

> - Sheng Long Gradilla

--
Pozdrav,
Tanasković Toplica


2003-02-23 19:55:49

by Sheng Long Gradilla

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

The "other kernels" I am talking about are 2.4.19 and 2.4.20 with the
old agpgart. As I said, the new agpgart module now loads but the results
are the same. I yet have to try some other tricks like setting the AGP
rate manually.

I am also using the latest nvidia modules, which are 1.0-4191


- Sheng Long Gradilla

Toplica Tanasković wrote:
> Dana nedelja 23. februar 2003. 17:02 napisali ste:
>
>>I tested on an Asus A7V8X motherboard (KT400) with a GeForce4 Ti 4200
>>AGP8X. The module loads correctly, at last! It sets the apperture size
>>correctly and all, but when I start XFree, I get do not get any
>>graphical screen, but text mode garbage. Characters of all colors, with
>>no sense at all. I had exactly the same problem in other kernels.
>>
>
> What kernels? Are you using old agpgart or new one with other kernels?
>
>
>>I played a bit with the NvAGP option on XF86Config file. According to
>>the documentation, 0 is PCI mode, 1 is NvAGP or fallback to PCI if
>>failed, 2 is AGPGART mode or fallback to PCI if failed, 3 is autodetect.
>>If I set it to 2, 3 or comment it, I got the same problem with the
>>garbage and had to reset the PC. Setting it to 0 would make it run in
>>PCI mode, and it always works. I tried setting it to 1, thinking that
>>maybe the documentation is wrong. X started successfully, but the card
>>was in PCI mode. I read the logs to confirm it, and indeed, the NvAGP
>>module fails to identify the AGP chipset and falls back to PCI.
>>
>>I tried setting NvAGP to 2 again, to read the logs and see if there is
>>something I could find out, but unfortunately the log had nothing but
>>garbage. I tried several times with no success. The log is always garbage.
>>
>
> Try fetching latest nVidia drivers.
>
> I'll try to isolate problem, and send patch if neccessery.
>
>
>>- Sheng Long Gradilla
>
>

2003-02-23 20:26:44

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana nedelja 23. februar 2003. 21:05 napisali ste:
> The "other kernels" I am talking about are 2.4.19 and 2.4.20 with the
> old agpgart. As I said, the new agpgart module now loads but the results
> are the same. I yet have to try some other tricks like setting the AGP
> rate manually.
>
> I am also using the latest nvidia modules, which are 1.0-4191
>
Thank God, it's not agpgart's fault, it is the fact that Dave Jones mentioned
earlier, I doubdt that any (ATI, nVidia..) drivers support AGP8x transfer
rate.
If this agpgart works fine with 2x and 4x transfer rates, than I believe that
my backport is correct. We will have to wait drivers that support 8x transfer
rate, and then test it, or to hack their binaries, but I doubdt that any one
of us have time to do such a thing.
The fact that it now sets aperture size correctly for 8x is a good sign :)
--
Pozdrav,
Tanasković Toplica


2003-02-23 21:42:00

by Bryan Andersen

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4


> Thank God, it's not agpgart's fault, it is the fact that Dave Jones mentioned
> earlier, I doubdt that any (ATI, nVidia..) drivers support AGP8x transfer
> rate.

The nVidia 1.0-4191 kernel driver release notes say they now support AGP
8X (AGP 3.0). I did notice a slight speed up on some very heavy
graphics tasks but that is it.

- Bryan

2003-02-24 02:18:05

by Toplica Tanaskovic

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Dana nedelja 23. februar 2003. 22:51 napisali ste:
> > Thank God, it's not agpgart's fault, it is the fact that Dave Jones
> > mentioned earlier, I doubdt that any (ATI, nVidia..) drivers support
> > AGP8x transfer rate.
I forgot to add through agpgart.
>
> The nVidia 1.0-4191 kernel driver release notes say they now support AGP
> 8X (AGP 3.0). I did notice a slight speed up on some very heavy
> graphics tasks but that is it.
>
That is correct, but I do not think that they knew about my backport, it is
not official, and it is still untested well and only few days old. From my
previos experience with nVidia and ATI drivers I can tell you that they have
bulit in AGP support, and they do not need agpgart to run. They will use it
for sure for 2x and 4x but it is questionable, that they do any checking if
agpgart can do 8x.

I've never programmed graphics but I intend, as soon as I find some extra
time, to try to write a small program which will check if all AGP modes work
correctly with my backport.

--
Pozdrav,
Tanasković Toplica


2003-02-24 10:20:16

by Dave Jones

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

On Sat, Feb 22, 2003 at 06:07:46PM -0500, Edward Killips wrote:
>
> The apeture is now set correctly. The ATI 4.2.0-2.5.1 drivers don't work but I
> think that is a dri problem. Everything works fine with the vesa drivers using XFree86 4.2.99.

The ATI drivers rely on some additional changes to agpgart.
I've not yet figured out exactly what it is they're trying to do,
and as the code is quite messy, I haven't found the motivation^Wstomach
to go back and look at their code.

Dave

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

2003-02-24 15:35:07

by Stian Jordet

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

man, 2003-02-24 kl. 11:42 skrev Dave Jones:
> On Sat, Feb 22, 2003 at 06:07:46PM -0500, Edward Killips wrote:
> >
> > The apeture is now set correctly. The ATI 4.2.0-2.5.1 drivers don't work but I
> > think that is a dri problem. Everything works fine with the vesa drivers using XFree86 4.2.99.
>
> The ATI drivers rely on some additional changes to agpgart.
> I've not yet figured out exactly what it is they're trying to do,
> and as the code is quite messy, I haven't found the motivation^Wstomach
> to go back and look at their code.
Well, you would be my hero for all eternity if you found out :)

Regards,
Stian Jordet

2003-02-25 06:56:09

by Sheng Long Gradilla

[permalink] [raw]
Subject: Re: AGP backport from 2.5 to 2.4.21-pre4

Toplica Tanaskovi? <[email protected]> wrote:

>Dana nedelja 23. februar 2003. 22:51 napisali ste:
>> > ? ? Thank God, it's not agpgart's fault, it is the fact that Dave Jones
>> > mentioned earlier, I doubdt that any (ATI, nVidia..) drivers support
>> > AGP8x transfer rate.
> ? ?I forgot to add through agpgart.
>>

I made an extensive testing of the NVidia driver. I did not know the Internal NVidia AGP would fail if I had AGPGART loaded, so I performed the testing again.

I set NvAGP to 1 and did not load agpgart, then tried to start X. Got the same garbage on screen. After rebooting and checking the log, to my surprise it was not full of garbage like other times! The last line was the one where the display was being set to 1280x1024, and the one above it was "AGP8X Initialized successfully" or something like that. I now set the NvAGP to 2 so it would try to use the AGPGART, and still got garbage on the screen, as usual. I rebooted and checked the log, and it had no garbage this time either! Checking the end of the log, I noticed the line just above the last one said 4X, not 8X...

I hacked the nvidia module's source so no other mode but 8X could be detected (it can be verified on /proc/drivers/nvidia/agp/host_controller). Alright, now the kernel module reported the card and AGP Bus transfer rate as 8X only (It normally reported 4X and 8X). I started X, and still garbage. Another reboot and check at the logs... still 4X.

My conclussion: I agree with you, my friend. The NVidia drivers do not seem to support AGP8X through AGPGART.



__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/