Commit f4163814 authored by Lucas Stach's avatar Lucas Stach

drm/etnaviv: kill active fence tracking

There is no need to track the currently active fence. The GPU scheduler
keeps track of all the in-flight jobs.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 6fce3a40
...@@ -994,7 +994,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gpu *gpu) ...@@ -994,7 +994,6 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gpu *gpu)
complete(&gpu->event_free); complete(&gpu->event_free);
bitmap_zero(gpu->event_bitmap, ETNA_NR_EVENTS); bitmap_zero(gpu->event_bitmap, ETNA_NR_EVENTS);
spin_unlock_irqrestore(&gpu->event_spinlock, flags); spin_unlock_irqrestore(&gpu->event_spinlock, flags);
gpu->completed_fence = gpu->active_fence;
etnaviv_gpu_hw_init(gpu); etnaviv_gpu_hw_init(gpu);
gpu->lastctx = NULL; gpu->lastctx = NULL;
...@@ -1306,8 +1305,6 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit) ...@@ -1306,8 +1305,6 @@ struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit)
goto out_unlock; goto out_unlock;
} }
gpu->active_fence = gpu_fence->seqno;
if (submit->nr_pmrs) { if (submit->nr_pmrs) {
gpu->event[event[1]].sync_point = &sync_point_perfmon_sample_pre; gpu->event[event[1]].sync_point = &sync_point_perfmon_sample_pre;
kref_get(&submit->refcount); kref_get(&submit->refcount);
...@@ -1806,8 +1803,8 @@ static int etnaviv_gpu_rpm_suspend(struct device *dev) ...@@ -1806,8 +1803,8 @@ static int etnaviv_gpu_rpm_suspend(struct device *dev)
struct etnaviv_gpu *gpu = dev_get_drvdata(dev); struct etnaviv_gpu *gpu = dev_get_drvdata(dev);
u32 idle, mask; u32 idle, mask;
/* If we have outstanding fences, we're not idle */ /* If there are any jobs in the HW queue, we're not idle */
if (gpu->completed_fence != gpu->active_fence) if (atomic_read(&gpu->sched.hw_rq_count))
return -EBUSY; return -EBUSY;
/* Check whether the hardware (except FE) is idle */ /* Check whether the hardware (except FE) is idle */
......
...@@ -121,7 +121,6 @@ struct etnaviv_gpu { ...@@ -121,7 +121,6 @@ struct etnaviv_gpu {
struct mutex fence_lock; struct mutex fence_lock;
struct idr fence_idr; struct idr fence_idr;
u32 next_fence; u32 next_fence;
u32 active_fence;
u32 completed_fence; u32 completed_fence;
wait_queue_head_t fence_event; wait_queue_head_t fence_event;
u64 fence_context; u64 fence_context;
......
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