Commit 3f0b646e authored by Eric Anholt's avatar Eric Anholt

drm/v3d: Rename the fence signaled from IRQs to "irq_fence".

We have another thing called the "done fence" that tracks when the
scheduler considers the job done, and having the shared name was
confusing.
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20190313235211.28995-2-eric@anholt.netReviewed-by: default avatarDave Emett <david.emett@broadcom.com>
parent ad8d68b2
...@@ -163,7 +163,7 @@ struct v3d_job { ...@@ -163,7 +163,7 @@ struct v3d_job {
struct dma_fence *in_fence; struct dma_fence *in_fence;
/* v3d fence to be signaled by IRQ handler when the job is complete. */ /* v3d fence to be signaled by IRQ handler when the job is complete. */
struct dma_fence *done_fence; struct dma_fence *irq_fence;
/* GPU virtual addresses of the start/end of the CL job. */ /* GPU virtual addresses of the start/end of the CL job. */
u32 start, end; u32 start, end;
...@@ -210,7 +210,7 @@ struct v3d_tfu_job { ...@@ -210,7 +210,7 @@ struct v3d_tfu_job {
struct dma_fence *in_fence; struct dma_fence *in_fence;
/* v3d fence to be signaled by IRQ handler when the job is complete. */ /* v3d fence to be signaled by IRQ handler when the job is complete. */
struct dma_fence *done_fence; struct dma_fence *irq_fence;
struct v3d_dev *v3d; struct v3d_dev *v3d;
......
...@@ -340,8 +340,8 @@ v3d_exec_cleanup(struct kref *ref) ...@@ -340,8 +340,8 @@ v3d_exec_cleanup(struct kref *ref)
dma_fence_put(exec->bin.in_fence); dma_fence_put(exec->bin.in_fence);
dma_fence_put(exec->render.in_fence); dma_fence_put(exec->render.in_fence);
dma_fence_put(exec->bin.done_fence); dma_fence_put(exec->bin.irq_fence);
dma_fence_put(exec->render.done_fence); dma_fence_put(exec->render.irq_fence);
dma_fence_put(exec->bin_done_fence); dma_fence_put(exec->bin_done_fence);
dma_fence_put(exec->render_done_fence); dma_fence_put(exec->render_done_fence);
...@@ -374,7 +374,7 @@ v3d_tfu_job_cleanup(struct kref *ref) ...@@ -374,7 +374,7 @@ v3d_tfu_job_cleanup(struct kref *ref)
unsigned int i; unsigned int i;
dma_fence_put(job->in_fence); dma_fence_put(job->in_fence);
dma_fence_put(job->done_fence); dma_fence_put(job->irq_fence);
for (i = 0; i < ARRAY_SIZE(job->bo); i++) { for (i = 0; i < ARRAY_SIZE(job->bo); i++) {
if (job->bo[i]) if (job->bo[i])
......
...@@ -96,7 +96,7 @@ v3d_irq(int irq, void *arg) ...@@ -96,7 +96,7 @@ v3d_irq(int irq, void *arg)
if (intsts & V3D_INT_FLDONE) { if (intsts & V3D_INT_FLDONE) {
struct v3d_fence *fence = struct v3d_fence *fence =
to_v3d_fence(v3d->bin_job->bin.done_fence); to_v3d_fence(v3d->bin_job->bin.irq_fence);
trace_v3d_bcl_irq(&v3d->drm, fence->seqno); trace_v3d_bcl_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base); dma_fence_signal(&fence->base);
...@@ -105,7 +105,7 @@ v3d_irq(int irq, void *arg) ...@@ -105,7 +105,7 @@ v3d_irq(int irq, void *arg)
if (intsts & V3D_INT_FRDONE) { if (intsts & V3D_INT_FRDONE) {
struct v3d_fence *fence = struct v3d_fence *fence =
to_v3d_fence(v3d->render_job->render.done_fence); to_v3d_fence(v3d->render_job->render.irq_fence);
trace_v3d_rcl_irq(&v3d->drm, fence->seqno); trace_v3d_rcl_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base); dma_fence_signal(&fence->base);
...@@ -141,7 +141,7 @@ v3d_hub_irq(int irq, void *arg) ...@@ -141,7 +141,7 @@ v3d_hub_irq(int irq, void *arg)
if (intsts & V3D_HUB_INT_TFUC) { if (intsts & V3D_HUB_INT_TFUC) {
struct v3d_fence *fence = struct v3d_fence *fence =
to_v3d_fence(v3d->tfu_job->done_fence); to_v3d_fence(v3d->tfu_job->irq_fence);
trace_v3d_tfu_irq(&v3d->drm, fence->seqno); trace_v3d_tfu_irq(&v3d->drm, fence->seqno);
dma_fence_signal(&fence->base); dma_fence_signal(&fence->base);
......
...@@ -156,9 +156,9 @@ static struct dma_fence *v3d_job_run(struct drm_sched_job *sched_job) ...@@ -156,9 +156,9 @@ static struct dma_fence *v3d_job_run(struct drm_sched_job *sched_job)
if (IS_ERR(fence)) if (IS_ERR(fence))
return NULL; return NULL;
if (job->done_fence) if (job->irq_fence)
dma_fence_put(job->done_fence); dma_fence_put(job->irq_fence);
job->done_fence = dma_fence_get(fence); job->irq_fence = dma_fence_get(fence);
trace_v3d_submit_cl(dev, q == V3D_RENDER, to_v3d_fence(fence)->seqno, trace_v3d_submit_cl(dev, q == V3D_RENDER, to_v3d_fence(fence)->seqno,
job->start, job->end); job->start, job->end);
...@@ -199,9 +199,9 @@ v3d_tfu_job_run(struct drm_sched_job *sched_job) ...@@ -199,9 +199,9 @@ v3d_tfu_job_run(struct drm_sched_job *sched_job)
return NULL; return NULL;
v3d->tfu_job = job; v3d->tfu_job = job;
if (job->done_fence) if (job->irq_fence)
dma_fence_put(job->done_fence); dma_fence_put(job->irq_fence);
job->done_fence = dma_fence_get(fence); job->irq_fence = dma_fence_get(fence);
trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno); trace_v3d_submit_tfu(dev, to_v3d_fence(fence)->seqno);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment