From patchwork Mon Dec 31 01:34:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 1920851 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 2F67BDF230 for ; Mon, 31 Dec 2012 08:43:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E956E6124 for ; Mon, 31 Dec 2012 00:43:10 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 562 seconds by postgrey-1.32 at gabe; Sun, 30 Dec 2012 17:44:35 PST Received: from filtteri2.pp.htv.fi (filtteri2.pp.htv.fi [213.243.153.185]) by gabe.freedesktop.org (Postfix) with ESMTP id 21BCAE5C87 for ; Sun, 30 Dec 2012 17:44:35 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by filtteri2.pp.htv.fi (Postfix) with ESMTP id 0F85019B968; Mon, 31 Dec 2012 03:35:12 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp6.welho.com ([213.243.153.40]) by localhost (filtteri2.pp.htv.fi [213.243.153.185]) (amavisd-new, port 10024) with ESMTP id cZZez---FofU; Mon, 31 Dec 2012 03:35:11 +0200 (EET) Received: from blackmetal.pp.htv.fi (cs181064211.pp.htv.fi [82.181.64.211]) by smtp6.welho.com (Postfix) with ESMTP id B4CC05BC004; Mon, 31 Dec 2012 03:35:11 +0200 (EET) From: Aaro Koskinen To: David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] drm/nouveau: fix init with agpgart-uninorth Date: Mon, 31 Dec 2012 03:34:59 +0200 Message-Id: <1356917699-19479-1-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 31 Dec 2012 00:41:11 -0800 Cc: Aaro Koskinen X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Check that the AGP aperture can be mapped. This follows a similar change done for Radeon (commit 365048ff, drm/radeon: AGP memory is only I/O if the aperture can be mapped by the CPU.). The patch fixes the following error seen on G5 iMac: nouveau E[ DRM] failed to create kernel channel, -12 Reviewed-by: Michel Dänzer Signed-off-by: Aaro Koskinen --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 5614c89..69d7b1d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1276,7 +1276,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) if (drm->agp.stat == ENABLED) { mem->bus.offset = mem->start << PAGE_SHIFT; mem->bus.base = drm->agp.base; - mem->bus.is_iomem = true; + mem->bus.is_iomem = !dev->agp->cant_use_aperture; } #endif break;