Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1180527

[PATCH v2] nouveau/ttm: fix tiled system memory with Maxwell

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Alexandre Courbot <acourbot@nvidia.com>
Newsgroups linux.kernel
Subject [PATCH v2] nouveau/ttm: fix tiled system memory with Maxwell
Date Thu, 09 Jul 2015 10:20:01 +0200
Message-ID <pKfdL-6cK-7@gated-at.bofh.it> (permalink)
X-Original-To Ben Skeggs <bskeggs@redhat.com>, nouveau@lists.freedesktop.org
X-PGP-Universal processed; by hqnvupgp08.nvidia.com on Thu, 09 Jul 2015 01:15:28 -0700
X-Mailer git-send-email 2.4.4
X-Nvconfidentiality public
MIME-Version 1.0
Content-Type text/plain
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 51
Organization linux.* mail to news gateway
X-Original-Cc linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, gnurou@gmail.com, Alexandre Courbot <acourbot@nvidia.com>
X-Original-Date Thu, 9 Jul 2015 17:15:14 +0900
X-Original-Message-ID <1436429714-27511-1-git-send-email-acourbot@nvidia.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1180527

Show key headers only | View raw


Add Maxwell to the switch statement that sets node->memtype, otherwise
all tiling information is ignored for buffers in system memory.

While we are at it, make that switch statement explicitly complain the
next time we meet a non-handled card family.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Changes since v1:
- Added a forgotten argument to NV_WARN

 drm/nouveau/nouveau_ttm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drm/nouveau/nouveau_ttm.c b/drm/nouveau/nouveau_ttm.c
index 18f449715788..7464aef34674 100644
--- a/drm/nouveau/nouveau_ttm.c
+++ b/drm/nouveau/nouveau_ttm.c
@@ -175,15 +175,24 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
 	node->page_shift = 12;
 
 	switch (drm->device.info.family) {
+	case NV_DEVICE_INFO_V0_TNT:
+	case NV_DEVICE_INFO_V0_CELSIUS:
+	case NV_DEVICE_INFO_V0_KELVIN:
+	case NV_DEVICE_INFO_V0_RANKINE:
+	case NV_DEVICE_INFO_V0_CURIE:
+		break;
 	case NV_DEVICE_INFO_V0_TESLA:
 		if (drm->device.info.chipset != 0x50)
 			node->memtype = (nvbo->tile_flags & 0x7f00) >> 8;
 		break;
 	case NV_DEVICE_INFO_V0_FERMI:
 	case NV_DEVICE_INFO_V0_KEPLER:
+	case NV_DEVICE_INFO_V0_MAXWELL:
 		node->memtype = (nvbo->tile_flags & 0xff00) >> 8;
 		break;
 	default:
+		NV_WARN(drm, "%s: unhandled family type %x\n", __func__,
+			drm->device.info.family);
 		break;
 	}
 
-- 
2.4.4

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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2] nouveau/ttm: fix tiled system memory with Maxwell Alexandre Courbot <acourbot@nvidia.com> - 2015-07-09 10:20 +0200

csiph-web