summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_fence.h
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-29 10:06:18 +0200
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>2014-09-30 14:04:00 +0200
commit15a996bbb6978ae21c497aeadfe20deca6ddd07a (patch)
tree208bcce51bf6bfa6b1d831a15ced5a32a0c9e5b0 /drivers/gpu/drm/nouveau/nouveau_fence.h
parente3be4c230dfadf79567a245505a47a90db97f968 (diff)
drm/nouveau: assign fence_chan->name correctly
Make nouveau_fence_chan refcounted, to make trace_fence_destroy always return the correct name without a race condition. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fence.h')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fence.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.h b/drivers/gpu/drm/nouveau/nouveau_fence.h
index a7dc5375c320..943b0b17b1fc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.h
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.h
@@ -30,6 +30,8 @@ int nouveau_fence_sync(struct nouveau_bo *, struct nouveau_channel *, bool excl
struct nouveau_fence_chan {
spinlock_t lock;
+ struct kref fence_ref;
+
struct list_head pending;
struct list_head flip;
@@ -42,7 +44,7 @@ struct nouveau_fence_chan {
u32 sequence;
u32 context;
- char name[24];
+ char name[32];
struct nvif_notify notify;
int notify_ref;
@@ -63,6 +65,7 @@ struct nouveau_fence_priv {
void nouveau_fence_context_new(struct nouveau_channel *, struct nouveau_fence_chan *);
void nouveau_fence_context_del(struct nouveau_fence_chan *);
+void nouveau_fence_context_free(struct nouveau_fence_chan *);
int nv04_fence_create(struct nouveau_drm *);
int nv04_fence_mthd(struct nouveau_channel *, u32, u32, u32);