diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-08-11 18:56:06 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-09-20 02:11:41 -0400 |
commit | 8c06e60ed4ce35590ef38327c93f351ba37dae47 (patch) | |
tree | f38cb3ca653b35cb68029baec736524057ef328e /drivers/gpu | |
parent | fbba036a56fe0e5c5e8c91daf3fa211f88d94a03 (diff) |
drm/nouveau: if requested, try harder at disabling sysmem pushbufs
On >=nv50, userspace would still end up allocating pushbufs in GART.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_channel.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index b0d753f45bbd..a319d5646ea9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c | |||
@@ -411,13 +411,17 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data, | |||
411 | return ret; | 411 | return ret; |
412 | init->channel = chan->id; | 412 | init->channel = chan->id; |
413 | 413 | ||
414 | if (chan->dma.ib_max) | 414 | if (nouveau_vram_pushbuf == 0) { |
415 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM | | 415 | if (chan->dma.ib_max) |
416 | NOUVEAU_GEM_DOMAIN_GART; | 416 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM | |
417 | else if (chan->pushbuf_bo->bo.mem.mem_type == TTM_PL_VRAM) | 417 | NOUVEAU_GEM_DOMAIN_GART; |
418 | else if (chan->pushbuf_bo->bo.mem.mem_type == TTM_PL_VRAM) | ||
419 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM; | ||
420 | else | ||
421 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART; | ||
422 | } else { | ||
418 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM; | 423 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_VRAM; |
419 | else | 424 | } |
420 | init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART; | ||
421 | 425 | ||
422 | if (dev_priv->card_type < NV_C0) { | 426 | if (dev_priv->card_type < NV_C0) { |
423 | init->subchan[0].handle = NvM2MF; | 427 | init->subchan[0].handle = NvM2MF; |