diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 977fb8f15d97..77c81d6b45ee 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c | |||
@@ -395,15 +395,20 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device, | |||
395 | struct nouveau_channel **pchan) | 395 | struct nouveau_channel **pchan) |
396 | { | 396 | { |
397 | struct nouveau_cli *cli = (void *)nvif_client(&device->base); | 397 | struct nouveau_cli *cli = (void *)nvif_client(&device->base); |
398 | bool super; | ||
398 | int ret; | 399 | int ret; |
399 | 400 | ||
401 | /* hack until fencenv50 is fixed, and agp access relaxed */ | ||
402 | super = cli->base.super; | ||
403 | cli->base.super = true; | ||
404 | |||
400 | ret = nouveau_channel_ind(drm, device, handle, arg0, pchan); | 405 | ret = nouveau_channel_ind(drm, device, handle, arg0, pchan); |
401 | if (ret) { | 406 | if (ret) { |
402 | NV_PRINTK(debug, cli, "ib channel create, %d\n", ret); | 407 | NV_PRINTK(debug, cli, "ib channel create, %d\n", ret); |
403 | ret = nouveau_channel_dma(drm, device, handle, pchan); | 408 | ret = nouveau_channel_dma(drm, device, handle, pchan); |
404 | if (ret) { | 409 | if (ret) { |
405 | NV_PRINTK(debug, cli, "dma channel create, %d\n", ret); | 410 | NV_PRINTK(debug, cli, "dma channel create, %d\n", ret); |
406 | return ret; | 411 | goto done; |
407 | } | 412 | } |
408 | } | 413 | } |
409 | 414 | ||
@@ -411,8 +416,9 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device, | |||
411 | if (ret) { | 416 | if (ret) { |
412 | NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret); | 417 | NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret); |
413 | nouveau_channel_del(pchan); | 418 | nouveau_channel_del(pchan); |
414 | return ret; | ||
415 | } | 419 | } |
416 | 420 | ||
417 | return 0; | 421 | done: |
422 | cli->base.super = super; | ||
423 | return ret; | ||
418 | } | 424 | } |