From owner-svn-src-all@FreeBSD.ORG Wed Dec 11 22:26:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D85D166; Wed, 11 Dec 2013 22:26:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 586821F29; Wed, 11 Dec 2013 22:26:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBMQArf081057; Wed, 11 Dec 2013 22:26:10 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBMQAtG081056; Wed, 11 Dec 2013 22:26:10 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201312112226.rBBMQAtG081056@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Wed, 11 Dec 2013 22:26:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r259234 - stable/10/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 22:26:10 -0000 Author: dumbbell Date: Wed Dec 11 22:26:09 2013 New Revision: 259234 URL: http://svnweb.freebsd.org/changeset/base/259234 Log: MFC r259101: drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes This fixes radeon_agp_init() and gtt_size is now correct. However, this is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't implemented yet. Submitted by: tijl@ Modified: stable/10/sys/dev/drm2/radeon/radeon_agp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_agp.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_agp.c Wed Dec 11 22:00:03 2013 (r259233) +++ stable/10/sys/dev/drm2/radeon/radeon_agp.c Wed Dec 11 22:26:09 2013 (r259234) @@ -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 >> 20) < 32) { 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",