Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Nov 2013 11:38:46 +0100
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        =?ISO-8859-1?Q?Jean-S=E9bastien_P=E9dron?= <dumbbell@FreeBSD.org>, dt71@gmx.com
Cc:        freebsd-current@freebsd.org
Subject:   Re: new Xorg (KMS, etc.) for Radeon 9600
Message-ID:  <20131114113846.4dcb2037@kalimero.tijl.coosemans.org>
In-Reply-To: <5283E123.5000305@FreeBSD.org>
References:  <527F95BE.7080908@gmx.com> <Pine.GSO.4.64.1311101135590.9459@sea.ntplx.net> <527FC05D.8080703@gmx.com> <5283E123.5000305@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--MP_/pp3RINC0rlEZsakB5e13j9s
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Wed, 13 Nov 2013 21:29:23 +0100 Jean-S=E9bastien P=E9dron wrote:
> Le 10/11/2013 18:20, dt71@gmx.com a =E9crit :
>> drmn0: info: GTT: 0M 0xF0000000 - 0xEFFFFFFF
>=20
> Tijl Coosemans is right, the problem is this line.
>=20
> As I don't really now how AGP works and have no AGP hardware to=20
> reproduce the problem, can you post the output of the following commands=
=20
> as a start?
>      pciconf -lvbce
>      devinfo -vr

The attached patch should fix it, but I haven't been able to test it
yet.  The ai_aperture_size field is in bytes.

--MP_/pp3RINC0rlEZsakB5e13j9s
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=radeon_agp.patch

Index: sys/dev/drm2/radeon/radeon_agp.c
===================================================================
--- sys/dev/drm2/radeon/radeon_agp.c	(revision 258128)
+++ sys/dev/drm2/radeon/radeon_agp.c	(working copy)
@@ -153,11 +153,11 @@ int radeon_agp_init(struct radeon_device
 		return ret;
 	}
 
-	if (rdev->ddev->agp->info.ai_aperture_size < 32) {
+	if (rdev->ddev->agp->info.ai_aperture_size < (32 << 20)) {
 		drm_agp_release(rdev->ddev);
 		dev_warn(rdev->dev, "AGP aperture too small (%zuM) "
 			"need at least 32M, disabling AGP\n",
-			rdev->ddev->agp->info.ai_aperture_size);
+			rdev->ddev->agp->info.ai_aperture_size >> 20);
 		return -EINVAL;
 	}
 
@@ -246,7 +246,7 @@ int radeon_agp_init(struct radeon_device
 	}
 
 	rdev->mc.agp_base = rdev->ddev->agp->info.ai_aperture_base;
-	rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size << 20;
+	rdev->mc.gtt_size = rdev->ddev->agp->info.ai_aperture_size;
 	rdev->mc.gtt_start = rdev->mc.agp_base;
 	rdev->mc.gtt_end = rdev->mc.gtt_start + rdev->mc.gtt_size - 1;
 	dev_info(rdev->dev, "GTT: %juM 0x%08jX - 0x%08jX\n",

--MP_/pp3RINC0rlEZsakB5e13j9s--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131114113846.4dcb2037>