Commit 67e26e41 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau: fix regression on agp boards

Extends the fix in f2f9a2cb to also
workaround permission issues noticed by people using AGP systems.

Cc: stable@vger.kernel.org # 3.16: f2f9a2cb: drm/nouveau: fix regression
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 40ac948e
......@@ -395,15 +395,20 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
struct nouveau_channel **pchan)
{
struct nouveau_cli *cli = (void *)nvif_client(&device->base);
bool super;
int ret;
/* hack until fencenv50 is fixed, and agp access relaxed */
super = cli->base.super;
cli->base.super = true;
ret = nouveau_channel_ind(drm, device, handle, arg0, pchan);
if (ret) {
NV_PRINTK(debug, cli, "ib channel create, %d\n", ret);
ret = nouveau_channel_dma(drm, device, handle, pchan);
if (ret) {
NV_PRINTK(debug, cli, "dma channel create, %d\n", ret);
return ret;
goto done;
}
}
......@@ -411,8 +416,9 @@ nouveau_channel_new(struct nouveau_drm *drm, struct nvif_device *device,
if (ret) {
NV_PRINTK(error, cli, "channel failed to initialise, %d\n", ret);
nouveau_channel_del(pchan);
return ret;
}
return 0;
done:
cli->base.super = super;
return ret;
}
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