[PATCH] 2.6.7-rc2: fix agpgart

From: Colin Leroy
Date: Fri Jun 04 2004 - 14:42:02 EST


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 <colin@xxxxxxxxxx>

--- 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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/