Commit 512fa0b8 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/drm/nv50-: remove allocation of sw class

Hasn't been required for a long time.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 92b4eaaf
...@@ -54,7 +54,6 @@ enum { ...@@ -54,7 +54,6 @@ enum {
NvSub2D = 3, /* DO NOT CHANGE - hardcoded for kepler gr fifo */ NvSub2D = 3, /* DO NOT CHANGE - hardcoded for kepler gr fifo */
NvSubCopy = 4, /* DO NOT CHANGE - hardcoded for kepler gr fifo */ NvSubCopy = 4, /* DO NOT CHANGE - hardcoded for kepler gr fifo */
FermiSw = 5, /* DO NOT CHANGE (well.. 6/7 will work...) */
}; };
/* Object handles - for stuff that's doesn't use handle == oclass. */ /* Object handles - for stuff that's doesn't use handle == oclass. */
......
...@@ -388,22 +388,19 @@ nouveau_accel_init(struct nouveau_drm *drm) ...@@ -388,22 +388,19 @@ nouveau_accel_init(struct nouveau_drm *drm)
return; return;
} }
if (device->info.family < NV_DEVICE_INFO_V0_TESLA) {
ret = nvif_object_init(&drm->channel->user, NVDRM_NVSW, ret = nvif_object_init(&drm->channel->user, NVDRM_NVSW,
nouveau_abi16_swclass(drm), NULL, 0, &drm->nvsw); nouveau_abi16_swclass(drm), NULL, 0,
&drm->nvsw);
if (ret == 0) { if (ret == 0) {
ret = RING_SPACE(drm->channel, 2); ret = RING_SPACE(drm->channel, 2);
if (ret == 0) { if (ret == 0) {
if (device->info.family < NV_DEVICE_INFO_V0_FERMI) {
BEGIN_NV04(drm->channel, NvSubSw, 0, 1); BEGIN_NV04(drm->channel, NvSubSw, 0, 1);
OUT_RING (drm->channel, NVDRM_NVSW); OUT_RING (drm->channel, drm->nvsw.handle);
} else
if (device->info.family < NV_DEVICE_INFO_V0_KEPLER) {
BEGIN_NVC0(drm->channel, FermiSw, 0, 1);
OUT_RING (drm->channel, 0x001f0000);
}
} }
ret = nvif_notify_init(&drm->nvsw, nouveau_flip_complete, ret = nvif_notify_init(&drm->nvsw,
nouveau_flip_complete,
false, NV04_NVSW_NTFY_UEVENT, false, NV04_NVSW_NTFY_UEVENT,
NULL, 0, 0, &drm->flip); NULL, 0, 0, &drm->flip);
if (ret == 0) if (ret == 0)
...@@ -415,10 +412,11 @@ nouveau_accel_init(struct nouveau_drm *drm) ...@@ -415,10 +412,11 @@ nouveau_accel_init(struct nouveau_drm *drm)
} }
if (ret) { if (ret) {
NV_ERROR(drm, "failed to allocate software object, %d\n", ret); NV_ERROR(drm, "failed to allocate sw class, %d\n", ret);
nouveau_accel_fini(drm); nouveau_accel_fini(drm);
return; return;
} }
}
if (device->info.family < NV_DEVICE_INFO_V0_FERMI) { if (device->info.family < NV_DEVICE_INFO_V0_FERMI) {
ret = nvkm_gpuobj_new(nvxx_device(&drm->client.device), 32, 0, ret = nvkm_gpuobj_new(nvxx_device(&drm->client.device), 32, 0,
......
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