1 From 0d00e0340c1aa9ce36bdff46f927916fe4903cee Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Thu, 27 Dec 2018 14:04:44 -0800
4 Subject: [PATCH 584/806] drm/v3d: Rename the fence signaled from IRQs to
7 We have another thing called the "done fence" that tracks when the
8 scheduler considers the job done, and having the shared name was
11 Signed-off-by: Eric Anholt <eric@anholt.net>
13 drivers/gpu/drm/v3d/v3d_drv.h | 4 ++--
14 drivers/gpu/drm/v3d/v3d_gem.c | 6 +++---
15 drivers/gpu/drm/v3d/v3d_irq.c | 6 +++---
16 drivers/gpu/drm/v3d/v3d_sched.c | 12 ++++++------
17 4 files changed, 14 insertions(+), 14 deletions(-)
19 --- a/drivers/gpu/drm/v3d/v3d_drv.h
20 +++ b/drivers/gpu/drm/v3d/v3d_drv.h
21 @@ -182,7 +182,7 @@ struct v3d_job {
22 struct dma_fence *in_fence;
24 /* v3d fence to be signaled by IRQ handler when the job is complete. */
25 - struct dma_fence *done_fence;
26 + struct dma_fence *irq_fence;
28 /* GPU virtual addresses of the start/end of the CL job. */
30 @@ -229,7 +229,7 @@ struct v3d_tfu_job {
31 struct dma_fence *in_fence;
33 /* v3d fence to be signaled by IRQ handler when the job is complete. */
34 - struct dma_fence *done_fence;
35 + struct dma_fence *irq_fence;
39 --- a/drivers/gpu/drm/v3d/v3d_gem.c
40 +++ b/drivers/gpu/drm/v3d/v3d_gem.c
41 @@ -381,8 +381,8 @@ v3d_exec_cleanup(struct kref *ref)
42 dma_fence_put(exec->bin.in_fence);
43 dma_fence_put(exec->render.in_fence);
45 - dma_fence_put(exec->bin.done_fence);
46 - dma_fence_put(exec->render.done_fence);
47 + dma_fence_put(exec->bin.irq_fence);
48 + dma_fence_put(exec->render.irq_fence);
50 dma_fence_put(exec->bin_done_fence);
51 dma_fence_put(exec->render_done_fence);
52 @@ -411,7 +411,7 @@ v3d_tfu_job_cleanup(struct kref *ref)
55 dma_fence_put(job->in_fence);
56 - dma_fence_put(job->done_fence);
57 + dma_fence_put(job->irq_fence);
59 for (i = 0; i < ARRAY_SIZE(job->bo); i++) {
61 --- a/drivers/gpu/drm/v3d/v3d_irq.c
62 +++ b/drivers/gpu/drm/v3d/v3d_irq.c
63 @@ -93,7 +93,7 @@ v3d_irq(int irq, void *arg)
65 if (intsts & V3D_INT_FLDONE) {
66 struct v3d_fence *fence =
67 - to_v3d_fence(v3d->bin_job->bin.done_fence);
68 + to_v3d_fence(v3d->bin_job->bin.irq_fence);
70 trace_v3d_bcl_irq(&v3d->drm, fence->seqno);
71 dma_fence_signal(&fence->base);
72 @@ -102,7 +102,7 @@ v3d_irq(int irq, void *arg)
74 if (intsts & V3D_INT_FRDONE) {
75 struct v3d_fence *fence =
76 - to_v3d_fence(v3d->render_job->render.done_fence);
77 + to_v3d_fence(v3d->render_job->render.irq_fence);
79 trace_v3d_rcl_irq(&v3d->drm, fence->seqno);
80 dma_fence_signal(&fence->base);
81 @@ -138,7 +138,7 @@ v3d_hub_irq(int irq, void *arg)
83 if (intsts & V3D_HUB_INT_TFUC) {
84 struct v3d_fence *fence =
85 - to_v3d_fence(v3d->tfu_job->done_fence);
86 + to_v3d_fence(v3d->tfu_job->irq_fence);
88 trace_v3d_tfu_irq(&v3d->drm, fence->seqno);
89 dma_fence_signal(&fence->base);
90 --- a/drivers/gpu/drm/v3d/v3d_sched.c
91 +++ b/drivers/gpu/drm/v3d/v3d_sched.c
92 @@ -152,9 +152,9 @@ static struct dma_fence *v3d_job_run(str
96 - if (job->done_fence)
97 - dma_fence_put(job->done_fence);
98 - job->done_fence = dma_fence_get(fence);
100 + dma_fence_put(job->irq_fence);
101 + job->irq_fence = dma_fence_get(fence);
103 trace_v3d_submit_cl(dev, q == V3D_RENDER, to_v3d_fence(fence)->seqno,
104 job->start, job->end);
105 @@ -195,9 +195,9 @@ v3d_tfu_job_run(struct drm_sched_job *sc
109 - if (job->done_fence)
110 - dma_fence_put(job->done_fence);
111 - job->done_fence = dma_fence_get(fence);
112 + if (job->irq_fence)
113 + dma_fence_put(job->irq_fence);
114 + job->irq_fence = dma_fence_get(fence);
116 trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno);