diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-11-01 03:56:20 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 13:32:33 +1000 |
commit | d7722134b8254bcee6086230723814cddf9ab54b (patch) | |
tree | 7c814c6dd29b328f527e9a7af802e0736fa82ad9 /drivers/gpu/drm/nouveau/nouveau_chan.c | |
parent | 10842ba074e95efad1ac7de2f5279910988f3e68 (diff) | |
download | lwn-d7722134b8254bcee6086230723814cddf9ab54b.tar.gz lwn-d7722134b8254bcee6086230723814cddf9ab54b.zip |
drm/nouveau: switch over to new memory and vmm interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_chan.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 34dbcf5f7f4e..af1116655910 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c @@ -84,6 +84,14 @@ nouveau_channel_del(struct nouveau_channel **pchan) { struct nouveau_channel *chan = *pchan; if (chan) { + struct nouveau_cli *cli = (void *)chan->user.client; + bool super; + + if (cli) { + super = cli->base.super; + cli->base.super = true; + } + if (chan->fence) nouveau_fence(chan->drm)->context_del(chan); nvif_object_fini(&chan->nvsw); @@ -98,6 +106,9 @@ nouveau_channel_del(struct nouveau_channel **pchan) nouveau_bo_unpin(chan->push.buffer); nouveau_bo_ref(NULL, &chan->push.buffer); kfree(chan); + + if (cli) + cli->base.super = super; } *pchan = NULL; } |