diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-11-01 13:08:26 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-11-17 23:38:57 -0500 |
commit | 9d5a6c4353eeac1e0095e731a0a746254f23af83 (patch) | |
tree | e22ca855a5875a1f2799dee834a3e429f7cef4d3 | |
parent | dd661e5f4e87609e7a9b4cbdff305dca7f494e7b (diff) |
drm/nouveau: Make PCIE GART size depend on the available RAMIN space.
Reported-by: Tomas Miljenovic <tomasmiljenovic@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_sgdma.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index 0b309c1cc3d..d4ac9700703 100644 --- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c +++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c | |||
@@ -224,11 +224,11 @@ nouveau_sgdma_init(struct drm_device *dev) | |||
224 | int i, ret; | 224 | int i, ret; |
225 | 225 | ||
226 | if (dev_priv->card_type < NV_50) { | 226 | if (dev_priv->card_type < NV_50) { |
227 | if(dev_priv->card_type < NV_40) { | 227 | if(dev_priv->ramin_rsvd_vram < 2 * 1024 * 1024) |
228 | aper_size = (64 * 1024 * 1024); | 228 | aper_size = 64 * 1024 * 1024; |
229 | } else { | 229 | else |
230 | aper_size = (512 * 1024 * 1024); | 230 | aper_size = 512 * 1024 * 1024; |
231 | } | 231 | |
232 | obj_size = (aper_size >> NV_CTXDMA_PAGE_SHIFT) * 4; | 232 | obj_size = (aper_size >> NV_CTXDMA_PAGE_SHIFT) * 4; |
233 | obj_size += 8; /* ctxdma header */ | 233 | obj_size += 8; /* ctxdma header */ |
234 | } else { | 234 | } else { |