Commit 2a55c9a7 authored by Ben Skeggs's avatar Ben Skeggs

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent 6effe393
...@@ -446,14 +446,20 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data, ...@@ -446,14 +446,20 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
else else
init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART; init->pushbuf_domains = NOUVEAU_GEM_DOMAIN_GART;
init->subchan[0].handle = NvM2MF; if (dev_priv->card_type < NV_C0) {
if (dev_priv->card_type < NV_50) init->subchan[0].handle = NvM2MF;
init->subchan[0].grclass = 0x0039; if (dev_priv->card_type < NV_50)
else init->subchan[0].grclass = 0x0039;
init->subchan[0].grclass = 0x5039; else
init->subchan[1].handle = NvSw; init->subchan[0].grclass = 0x5039;
init->subchan[1].grclass = NV_SW; init->subchan[1].handle = NvSw;
init->nr_subchan = 2; init->subchan[1].grclass = NV_SW;
init->nr_subchan = 2;
} else {
init->subchan[0].handle = 0x9039;
init->subchan[0].grclass = 0x9039;
init->nr_subchan = 1;
}
/* Named memory object area */ /* Named memory object area */
ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem, ret = drm_gem_handle_create(file_priv, chan->notifier_bo->gem,
......
...@@ -165,7 +165,7 @@ nouveau_fence_emit(struct nouveau_fence *fence) ...@@ -165,7 +165,7 @@ nouveau_fence_emit(struct nouveau_fence *fence)
if (dev_priv->card_type < NV_C0) if (dev_priv->card_type < NV_C0)
BEGIN_RING(chan, NvSubSw, 0x0050, 1); BEGIN_RING(chan, NvSubSw, 0x0050, 1);
else else
BEGIN_NVC0(chan, 2, NvSubSw, 0x0050, 1); BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0050, 1);
} else { } else {
BEGIN_RING(chan, NvSubSw, 0x0150, 1); BEGIN_RING(chan, NvSubSw, 0x0150, 1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment