aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-12-29 20:53:48 -0500
committerBen Skeggs <bskeggs@redhat.com>2010-12-29 20:55:07 -0500
commit2a55c9a7ff2a863f05a9b9c8519ef81737d4a3ef (patch)
tree2d0c5cc9fc0dfd30a5641812c8c30136238546b9 /drivers/gpu/drm/nouveau
parent6effe39364f1212aa57e1b5f0bd0f388ebfe9b24 (diff)
drm/nvc0: reserve only subc 0 for kernel use
Current 3D driver expects this behaviour. While this could be changed, there's no compelling reason to reserve more than one subchannel for the DRM. If we ever need to use an object other then M2MF, we can just re-bind subchannel 0 as required. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_channel.c22
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fence.c2
2 files changed, 15 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index 4d2f19420922..a57a1d2f3a11 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -446,14 +446,20 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
446 else 446 else
447 init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART; 447 init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART;
448 448
449 init->subchan[0].handle = NvM2MF; 449 if (dev_priv->card_type < NV_C0) {
450 if (dev_priv->card_type < NV_50) 450 init->subchan[0].handle = NvM2MF;
451 init->subchan[0].grclass = 0x0039; 451 if (dev_priv->card_type < NV_50)
452 else 452 init->subchan[0].grclass = 0x0039;
453 init->subchan[0].grclass = 0x5039; 453 else
454 init->subchan[1].handle = NvSw; 454 init->subchan[0].grclass = 0x5039;
455 init->subchan[1].grclass = NV_SW; 455 init->subchan[1].handle = NvSw;
456 init->nr_subchan = 2; 456 init->subchan[1].grclass = NV_SW;
457 init->nr_subchan = 2;
458 } else {
459 init->subchan[0].handle = 0x9039;
460 init->subchan[0].grclass = 0x9039;
461 init->nr_subchan = 1;
462 }
457 463
458 /* Named memory object area */ 464 /* Named memory object area */
459 ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem, 465 ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem,
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 88b2f29ca3e4..221b8462ea37 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -165,7 +165,7 @@ nouveau_fence_emit(struct nouveau_fence *fence)
165 if (dev_priv->card_type < NV_C0) 165 if (dev_priv->card_type < NV_C0)
166 BEGIN_RING(chan, NvSubSw, 0x0050, 1); 166 BEGIN_RING(chan, NvSubSw, 0x0050, 1);
167 else 167 else
168 BEGIN_NVC0(chan, 2, NvSubSw, 0x0050, 1); 168 BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0050, 1);
169 } else { 169 } else {
170 BEGIN_RING(chan, NvSubSw, 0x0150, 1); 170 BEGIN_RING(chan, NvSubSw, 0x0150, 1);
171 } 171 }