aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs2010-12-08 17:18:35 -0600
committerBen Skeggs2010-12-20 20:46:50 -0600
commitba731e7b58911e8caa4e37f0075a677d7ac2afc6 (patch)
tree0baa771480a82d365b7e4011c6a25907a81545c9 /nouveau
parent0184bb1c6d946bcaf198f7680b3405adca676790 (diff)
downloadlibdrm-ba731e7b58911e8caa4e37f0075a677d7ac2afc6.tar.gz
libdrm-ba731e7b58911e8caa4e37f0075a677d7ac2afc6.tar.xz
libdrm-ba731e7b58911e8caa4e37f0075a677d7ac2afc6.zip
nouveau: nvc0 drm has no concept of "notifier block"
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nouveau')
-rw-r--r--nouveau/nouveau_channel.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/nouveau/nouveau_channel.c b/nouveau/nouveau_channel.c
index ded54241..96fa03bd 100644
--- a/nouveau/nouveau_channel.c
+++ b/nouveau/nouveau_channel.c
@@ -75,20 +75,23 @@ nouveau_channel_alloc(struct nouveau_device *dev, uint32_t fb_ctxdma,
75 nvchan->base.subc[i].gr = &gr->base; 75 nvchan->base.subc[i].gr = &gr->base;
76 } 76 }
77 77
78 ret = nouveau_bo_wrap(dev, nvchan->drm.notifier_handle, 78 if (dev->chipset < 0xc0) {
79 &nvchan->notifier_bo); 79 ret = nouveau_bo_wrap(dev, nvchan->drm.notifier_handle,
80 if (!ret) 80 &nvchan->notifier_bo);
81 ret = nouveau_bo_map(nvchan->notifier_bo, NOUVEAU_BO_RDWR); 81 if (!ret)
82 if (ret) { 82 ret = nouveau_bo_map(nvchan->notifier_bo,
83 nouveau_channel_free((void *)&nvchan); 83 NOUVEAU_BO_RDWR);
84 return ret; 84 if (ret) {
85 } 85 nouveau_channel_free((void *)&nvchan);
86 86 return ret;
87 ret = nouveau_grobj_alloc(&nvchan->base, 0x00000000, 0x0030, 87 }
88 &nvchan->base.nullobj); 88
89 if (ret) { 89 ret = nouveau_grobj_alloc(&nvchan->base, 0x00000000, 0x0030,
90 nouveau_channel_free((void *)&nvchan); 90 &nvchan->base.nullobj);
91 return ret; 91 if (ret) {
92 nouveau_channel_free((void *)&nvchan);
93 return ret;
94 }
92 } 95 }
93 96
94 ret = nouveau_pushbuf_init(&nvchan->base, pushbuf_size); 97 ret = nouveau_pushbuf_init(&nvchan->base, pushbuf_size);
@@ -119,8 +122,10 @@ nouveau_channel_free(struct nouveau_channel **chan)
119 FIRE_RING(&nvchan->base); 122 FIRE_RING(&nvchan->base);
120 123
121 nouveau_pushbuf_fini(&nvchan->base); 124 nouveau_pushbuf_fini(&nvchan->base);
122 nouveau_bo_unmap(nvchan->notifier_bo); 125 if (nvchan->notifier_bo) {
123 nouveau_bo_ref(NULL, &nvchan->notifier_bo); 126 nouveau_bo_unmap(nvchan->notifier_bo);
127 nouveau_bo_ref(NULL, &nvchan->notifier_bo);
128 }
124 129
125 for (i = 0; i < nvchan->drm.nr_subchan; i++) 130 for (i = 0; i < nvchan->drm.nr_subchan; i++)
126 free(nvchan->base.subc[i].gr); 131 free(nvchan->base.subc[i].gr);