2004-06-04 15:48:55

by Colin Leroy

[permalink] [raw]
Subject: 2.6.7-rc2: no more AGP?

Hi,

just a lousy bugreport... I noticed that agpgart doesn't work anymore on
2.6.7-rc2. Xorg reports that AGP isn't supported, and dmesg doesn't show
the
agpgart: Putting AGP V2 device at 0000:00:0b.0 into 4x mode
agpgart: Putting AGP V2 device at 0000:00:10.0 into 4x mode

It only shows
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected Apple UniNorth 2 chipset
agpgart: Maximum main memory to use for agp memory: 565M
agpgart: configuring for size idx: 4
agpgart: AGP aperture is 16M @ 0x0

Using 2.6.6, it works fine.

hth,
--
Colin


2004-06-04 16:18:58

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: 2.6.7-rc2: no more AGP?

On Fri, 2004-06-04 at 10:48, Colin Leroy wrote:
> Hi,
>
> just a lousy bugreport... I noticed that agpgart doesn't work anymore on
> 2.6.7-rc2. Xorg reports that AGP isn't supported, and dmesg doesn't show
> the
> agpgart: Putting AGP V2 device at 0000:00:0b.0 into 4x mode
> agpgart: Putting AGP V2 device at 0000:00:10.0 into 4x mode
>
> It only shows
> Linux agpgart interface v0.100 (c) Dave Jones
> agpgart: Detected Apple UniNorth 2 chipset
> agpgart: Maximum main memory to use for agp memory: 565M
> agpgart: configuring for size idx: 4
> agpgart: AGP aperture is 16M @ 0x0

Right, something seems broken. I'm also having problems with USB
sleep & wakeup and with cpufreq. Argh, I've been away from ppc32 for
too long !

I'll try to spare some time this week-end. It might be too late for
2.6.7 though =P

Ben.


2004-06-04 16:22:58

by Michel Dänzer

[permalink] [raw]
Subject: Re: 2.6.7-rc2: no more AGP?

On Fri, 2004-06-04 at 17:48 +0200, Colin Leroy wrote:
>
> just a lousy bugreport... I noticed that agpgart doesn't work anymore on
> 2.6.7-rc2. Xorg reports that AGP isn't supported, and dmesg doesn't show
> the
> agpgart: Putting AGP V2 device at 0000:00:0b.0 into 4x mode
> agpgart: Putting AGP V2 device at 0000:00:10.0 into 4x mode
>
> It only shows
> Linux agpgart interface v0.100 (c) Dave Jones
> agpgart: Detected Apple UniNorth 2 chipset
> agpgart: Maximum main memory to use for agp memory: 565M
> agpgart: configuring for size idx: 4
> agpgart: AGP aperture is 16M @ 0x0
>
> Using 2.6.6, it works fine.

Paulus brought this up on IRC, it seems to be a bad DRM merge: The code

#ifndef VMAP_4_ARGS
if ( dev->agp->cant_use_aperture )
return -EINVAL;
#endif

in DRM(agp_acquire) should be removed altogether in a 2.6 kernel because
its vmap() takes 4 arguments; however, only the guards seem to have been
removed, which causes this function to erroneously fail if the AGP
aperture can't be directly accessed by the CPU.


--
Earthling Michel Dänzer | Debian (powerpc), X and DRI developer
Libre software enthusiast | http://svcs.affero.net/rm.php?r=daenzer

2004-06-04 19:39:30

by Colin Leroy

[permalink] [raw]
Subject: [PATCH] 2.6.7-rc2: fix agpgart

On 04 Jun 2004 at 18h06, Michel D?nzer wrote:

Hi,

> Paulus brought this up on IRC, it seems to be a bad DRM merge: The
> code
>
> #ifndef VMAP_4_ARGS
> if ( dev->agp->cant_use_aperture )
> return -EINVAL;
> #endif
>
> in DRM(agp_acquire) should be removed altogether in a 2.6 kernel
> because its vmap() takes 4 arguments; however, only the guards seem to
> have been removed, which causes this function to erroneously fail if
> the AGP aperture can't be directly accessed by the CPU.

Looks like. Removing it fixes the problem. Here's the patch...
Signed-off-by: Colin Leroy <[email protected]>

--- a/drivers/char/drm/drm_agpsupport.h 2004-06-04 17:44:23.000000000 +0200
+++ b/drivers/char/drm/drm_agpsupport.h 2004-06-04 21:01:03.000000000 +0200
@@ -109,8 +109,6 @@
return -EBUSY;
if (!drm_agp->acquire)
return -EINVAL;
- if ( dev->agp->cant_use_aperture )
- return -EINVAL;
if ((retcode = drm_agp->acquire()))
return retcode;
dev->agp->acquired = 1;

2004-06-05 03:35:09

by Paul Mackerras

[permalink] [raw]
Subject: Re: 2.6.7-rc2: no more AGP?

Benjamin Herrenschmidt writes:

> On Fri, 2004-06-04 at 10:48, Colin Leroy wrote:
> > Hi,
> >
> > just a lousy bugreport... I noticed that agpgart doesn't work anymore on
> > 2.6.7-rc2. Xorg reports that AGP isn't supported, and dmesg doesn't show
> > the
> > agpgart: Putting AGP V2 device at 0000:00:0b.0 into 4x mode
> > agpgart: Putting AGP V2 device at 0000:00:10.0 into 4x mode
> >
> > It only shows
> > Linux agpgart interface v0.100 (c) Dave Jones
> > agpgart: Detected Apple UniNorth 2 chipset
> > agpgart: Maximum main memory to use for agp memory: 565M
> > agpgart: configuring for size idx: 4
> > agpgart: AGP aperture is 16M @ 0x0
>
> Right, something seems broken. I'm also having problems with USB
> sleep & wakeup and with cpufreq. Argh, I've been away from ppc32 for
> too long !

You need this patch. Michel Daenzer tells me that the
cant_use_aperture check isn't needed.

Paul.

diff -urN linux-2.5/drivers/char/drm/drm_agpsupport.h pmac-2.5/drivers/char/drm/drm_agpsupport.h
--- linux-2.5/drivers/char/drm/drm_agpsupport.h 2004-05-11 13:19:51.000000000 +1000
+++ pmac-2.5/drivers/char/drm/drm_agpsupport.h 2004-05-28 22:21:33.000000000 +1000
@@ -109,8 +109,6 @@
return -EBUSY;
if (!drm_agp->acquire)
return -EINVAL;
- if ( dev->agp->cant_use_aperture )
- return -EINVAL;
if ((retcode = drm_agp->acquire()))
return retcode;
dev->agp->acquired = 1;

2004-06-05 08:23:48

by Dave Airlie

[permalink] [raw]
Subject: Re: [PATCH] 2.6.7-rc2: fix agpgart

> >
> > in DRM(agp_acquire) should be removed altogether in a 2.6 kernel
> > because its vmap() takes 4 arguments; however, only the guards seem to
> > have been removed, which causes this function to erroneously fail if
> > the AGP aperture can't be directly accessed by the CPU.
>
> Looks like. Removing it fixes the problem. Here's the patch...
> Signed-off-by: Colin Leroy <[email protected]>
>

okay I've put this into the DRM bk tree, thanks guys, I'll push it to
Linus ASAP..

Dave.

--
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
pam_smb / Linux DECstation / Linux VAX / ILUG person