From patchwork Sun May 8 18:46:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tormod Volden X-Patchwork-Id: 766192 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p48IkqFh015148 for ; Sun, 8 May 2011 18:47:13 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E17CB9E959 for ; Sun, 8 May 2011 11:46:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ww0-f43.google.com (mail-ww0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id A03C19E74B for ; Sun, 8 May 2011 11:46:42 -0700 (PDT) Received: by wwb17 with SMTP id 17so4162757wwb.12 for ; Sun, 08 May 2011 11:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=JZhSkeT3lUG0jNuiMaf+N1lCAE4Z2TFX1xtwYVCTyTY=; b=iFJ44epZE/JCB7O5NuJwYdBHXQn0HicR/+rSeYICJVOq5Azof8tbpnb8m+4I9jd/hg bdz7FmKH/zoIZxx9OLaT4mUVm+VuQ4VzRMVqOiE+n9P2a9USRAm6cubs5/9dWh1gr3/d vw2XYIdWsUQ6UHzAPQ+SqXCCQxvbark/6y6JY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; b=oyY2qTUHLuAdNbJd0H3Wq4MsEol8wH7+VUpLxfgf657J+0YtPI2CNPqO/caq6pUlsY 3UpnKp487LwDhDojKj0CgwHe0hVdxDydPGV8DW0r89gtnCnq4RWZLocJ3bNmjsDlC3uq nWbe3ARRavgzUikx5veh6kA8bA8rmp7d4KTMQ= Received: by 10.216.221.72 with SMTP id q50mr4429797wep.99.1304880401761; Sun, 08 May 2011 11:46:41 -0700 (PDT) Received: from localhost.localdomain (80-219-113-251.dclient.hispeed.ch [80.219.113.251]) by mx.google.com with ESMTPS id r80sm2649264wei.39.2011.05.08.11.46.40 (version=SSLv3 cipher=OTHER); Sun, 08 May 2011 11:46:40 -0700 (PDT) From: Tormod Volden To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon: Print gart initialization details on all chipsets Date: Sun, 8 May 2011 20:46:38 +0200 Message-Id: <1304880398-4616-1-git-send-email-lists.tormod@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 08 May 2011 18:47:13 +0000 (UTC) From: Tormod Volden The same way it was already done for r300. Also fix typo in gart warning messages. Signed-off-by: Tormod Volden Reviewed-by: Alex Deucher --- > While you are at it, you might want to update rv770, evergreen, and cayman. > Alex And all the others as well... Tormod PS. Why can't you keep the relatively logic r* naming? ni.c? drivers/gpu/drm/radeon/evergreen.c | 2 ++ drivers/gpu/drm/radeon/ni.c | 2 ++ drivers/gpu/drm/radeon/r100.c | 2 ++ drivers/gpu/drm/radeon/r600.c | 2 ++ drivers/gpu/drm/radeon/radeon_gart.c | 4 ++-- drivers/gpu/drm/radeon/rs400.c | 2 ++ drivers/gpu/drm/radeon/rs600.c | 2 ++ drivers/gpu/drm/radeon/rv770.c | 2 ++ 8 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index e9bc135..e91d708 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c @@ -879,6 +879,8 @@ int evergreen_pcie_gart_enable(struct radeon_device *rdev) WREG32(VM_CONTEXT1_CNTL, 0); evergreen_pcie_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; } diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 7aade20..05b34f9 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -991,6 +991,8 @@ int cayman_pcie_gart_enable(struct radeon_device *rdev) WREG32(VM_CONTEXT1_CNTL, 0); cayman_pcie_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; } diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index f2204cb..b67719c 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -513,6 +513,8 @@ int r100_pci_gart_enable(struct radeon_device *rdev) tmp = RREG32(RADEON_AIC_CNTL) | RADEON_PCIGART_TRANSLATE_EN; WREG32(RADEON_AIC_CNTL, tmp); r100_pci_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; } diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 6f27593..3ca448f 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -986,6 +986,8 @@ int r600_pcie_gart_enable(struct radeon_device *rdev) WREG32(VM_CONTEXT0_CNTL + (i * 4), 0); r600_pcie_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; } diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 8a955bb..674a6ca 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c @@ -142,7 +142,7 @@ void radeon_gart_unbind(struct radeon_device *rdev, unsigned offset, u64 page_base; if (!rdev->gart.ready) { - WARN(1, "trying to unbind memory to unitialized GART !\n"); + WARN(1, "trying to unbind memory to uninitialized GART !\n"); return; } t = offset / RADEON_GPU_PAGE_SIZE; @@ -174,7 +174,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset, int i, j; if (!rdev->gart.ready) { - WARN(1, "trying to bind memory to unitialized GART !\n"); + WARN(1, "trying to bind memory to uninitialized GART !\n"); return -EINVAL; } t = offset / RADEON_GPU_PAGE_SIZE; diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c index aa6a66e..d9dc25e 100644 --- a/drivers/gpu/drm/radeon/rs400.c +++ b/drivers/gpu/drm/radeon/rs400.c @@ -182,6 +182,8 @@ int rs400_gart_enable(struct radeon_device *rdev) /* Enable gart */ WREG32_MC(RS480_AGP_ADDRESS_SPACE_SIZE, (RS480_GART_EN | size_reg)); rs400_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; } diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c index 6e3b11e..3b6dce4 100644 --- a/drivers/gpu/drm/radeon/rs600.c +++ b/drivers/gpu/drm/radeon/rs600.c @@ -484,6 +484,8 @@ int rs600_gart_enable(struct radeon_device *rdev) tmp = RREG32_MC(R_000009_MC_CNTL1); WREG32_MC(R_000009_MC_CNTL1, (tmp | S_000009_ENABLE_PAGE_TABLES(1))); rs600_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; } diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index ef8a5ba..89b53ad 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c @@ -158,6 +158,8 @@ int rv770_pcie_gart_enable(struct radeon_device *rdev) WREG32(VM_CONTEXT0_CNTL + (i * 4), 0); r600_pcie_gart_tlb_flush(rdev); + DRM_INFO("PCIE GART of %uM enabled (table at 0x%08X).\n", + (unsigned)(rdev->mc.gtt_size >> 20), rdev->gart.table_addr); rdev->gart.ready = true; return 0; }