From 1766e1c07b03c6ccf545469663334be762c0bddf Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 12 Mar 2008 23:37:29 +1100 Subject: nv50: force channel vram access through vm If we ever want to be able to use the 3D engine we have no choice. It appears that the tiling setup (required for 3D on G8x) is in the page tables. The immediate benefit of this change however is that it's now not possible for a client to use the GPU to render over the top of important engine setup tables, which also live in VRAM. G8x VRAM size is limited to 512MiB at the moment, as we use a 1-1 mapping of real vram pages to their offset within the start of a channel's VRAM DMA object and only populate a single PDE for VRAM use. --- shared-core/nouveau_state.c | 1 + 1 file changed, 1 insertion(+) (limited to 'shared-core/nouveau_state.c') diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c index 12162167..5ed16d7a 100644 --- a/shared-core/nouveau_state.c +++ b/shared-core/nouveau_state.c @@ -384,6 +384,7 @@ static void nouveau_card_takedown(struct drm_device *dev) nouveau_sgdma_takedown(dev); nouveau_gpuobj_takedown(dev); + nouveau_gpuobj_del(dev, &dev_priv->vm_vram_pt); nouveau_mem_close(dev); engine->instmem.takedown(dev); -- cgit v1.2.3 From 562f95ea96f08e1d73a872dc87237614292c873a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 31 Mar 2008 11:34:48 +1000 Subject: nouveau: fix return from function.. dude kernel moduless use kernel errors :) this fixes an oops on init when this codepath hits. --- shared-core/nouveau_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shared-core/nouveau_state.c') diff --git a/shared-core/nouveau_state.c b/shared-core/nouveau_state.c index 5ed16d7a..555955d4 100644 --- a/shared-core/nouveau_state.c +++ b/shared-core/nouveau_state.c @@ -46,7 +46,7 @@ static int nouveau_init_card_mappings(struct drm_device *dev) DRM_ERROR("Unable to initialize the mmio mapping (%d). " "Please report your setup to " DRIVER_EMAIL "\n", ret); - return 1; + return -EINVAL; } DRM_DEBUG("regs mapped ok at 0x%lx\n", dev_priv->mmio->offset); -- cgit v1.2.3