diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-10-20 01:49:33 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-10-20 02:13:13 -0400 |
commit | 67e26e41ff8aa514826dae79f0b10169b5ba93b4 (patch) | |
tree | 224b44fdeccde44034c7c7c5b65660937cebb7fa /drivers | |
parent | 40ac948e02e01e98474330f259ff842844096541 (diff) |
drm/nouveau: fix regression on agp boards
Extends the fix in f2f9a2cbaf019481feefe231f996d3602612fa99 to also
workaround permission issues noticed by people using AGP systems.
Cc: stable@vger.kernel.org # 3.16: f2f9a2c: drm/nouveau: fix regression
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-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 | } |