diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/compote/compote-channel.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/compote/compote-channel.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/compote/compote-channel.c b/drivers/gpu/drm/nouveau/compote/compote-channel.c index b5a490acf051..3bb7333f41a0 100644 --- a/drivers/gpu/drm/nouveau/compote/compote-channel.c +++ b/drivers/gpu/drm/nouveau/compote/compote-channel.c @@ -61,9 +61,18 @@ int compote_channel_new(struct compote_channel **channelp, if (ret) goto error; + ret = nvif_object_init(&channel->nvchan->user, 0, PASCAL_COMPUTE_B, + NULL, 0, &channel->nvcompute); + if (ret) + goto error_compute; + nvif_object_map(&channel->nvcompute); + *channelp = channel; return 0; +error_compute: + nouveau_channel_idle(channel->nvchan); + nouveau_channel_del(&channel->nvchan); error: kfree(channel); return ret; @@ -77,6 +86,8 @@ static void compote_channel_kref_put(struct kref *kref) channel = container_of(kref, struct compote_channel, kref); cfile = channel->cfile; + nvif_object_fini(&channel->nvcompute); + /* * Wait for all activity to stop before releasing notify object, which * may be still in use. |