summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-11-27 17:46:15 +0100
committerLucas Stach <l.stach@pengutronix.de>2018-01-02 17:34:10 +0100
commit5b223e94a8842e5e9deaa1b8198fc52558fee782 (patch)
tree1e20165960b1de2c1ab87c9c7ba221a1f807bf83 /drivers/gpu/drm/etnaviv/etnaviv_gpu.c
parent2f9225dbc09abe7cacb9820ebdeef5b6c0eb9c72 (diff)
drm/etnaviv: move GPU active handling to bo pin/unpin
The active count is used to check if the BO is idle, where idle is defined as not active on the GPU and all VM mappings and reference counts dropped to the initial state. As the idling of the mappings and references now only happens in the submit cleanup, the active state handling must be moved to the same location in order to keep the userspace semantics. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gpu.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gpu.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index efa79af676d6..5742e023c5d8 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -1201,7 +1201,6 @@ static void retire_worker(struct work_struct *work)
retire_work);
u32 fence = gpu->completed_fence;
struct etnaviv_gem_submit *submit, *tmp;
- unsigned int i;
mutex_lock(&gpu->lock);
list_for_each_entry_safe(submit, tmp, &gpu->active_submit_list, node) {
@@ -1210,9 +1209,6 @@ static void retire_worker(struct work_struct *work)
list_del(&submit->node);
- for (i = 0; i < submit->nr_bos; i++)
- atomic_dec(&submit->bos[i].obj->gpu_active);
-
etnaviv_submit_put(submit);
/*
* We need to balance the runtime PM count caused by
@@ -1227,8 +1223,6 @@ static void retire_worker(struct work_struct *work)
gpu->retired_fence = fence;
mutex_unlock(&gpu->lock);
-
- wake_up_all(&gpu->fence_event);
}
int etnaviv_gpu_wait_fence_interruptible(struct etnaviv_gpu *gpu,
@@ -1429,10 +1423,6 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu,
/* We're committed to adding this command buffer, hold a PM reference */
pm_runtime_get_noresume(gpu->dev);
- for (i = 0; i < submit->nr_bos; i++) {
- struct etnaviv_gem_object *etnaviv_obj = submit->bos[i].obj;
- atomic_inc(&etnaviv_obj->gpu_active);
- }
hangcheck_timer_reset(gpu);
ret = 0;