From: chenzhen Date: Fri, 4 Nov 2016 01:29:41 +0000 (+0800) Subject: MALI: midgard: ARM: patch for fence timeout in monkey test X-Git-Tag: firefly_0821_release~1315 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1729873f60a716b58a0d3b4083865c78e8968aeb;p=firefly-linux-kernel-4.4.55.git MALI: midgard: ARM: patch for fence timeout in monkey test comes from mali support case [TAC674871]. Change-Id: I5e7c54190e24eea0306a9d64545482c6209a2c0d Signed-off-by: chenzhen --- diff --git a/drivers/gpu/arm/midgard/mali_kbase_js.c b/drivers/gpu/arm/midgard/mali_kbase_js.c index ac6c3ce333ed..c591ebbcd861 100644 --- a/drivers/gpu/arm/midgard/mali_kbase_js.c +++ b/drivers/gpu/arm/midgard/mali_kbase_js.c @@ -1595,6 +1595,9 @@ static kbasep_js_release_result kbasep_js_runpool_release_ctx_internal( if (new_ref_count == 0 && (!kbasep_js_is_submit_allowed(js_devdata, kctx) || kbdev->pm.suspending)) { + int num_slots = kbdev->gpu_props.num_job_slots; + int slot; + /* Last reference, and we've been told to remove this context * from the Run Pool */ dev_dbg(kbdev->dev, "JS: RunPool Remove Context %p because as_busy_refcount=%d, jobs=%d, allowed=%d", @@ -1637,6 +1640,14 @@ static kbasep_js_release_result kbasep_js_runpool_release_ctx_internal( * other thread will be operating in this * code whilst we are */ + + /* Recalculate pullable status for all slots */ + for (slot = 0; slot < num_slots; slot++) { + if (kbase_js_ctx_pullable(kctx, slot, false)) + kbase_js_ctx_list_add_pullable_nolock(kbdev, + kctx, slot); + } + spin_unlock_irqrestore(&js_devdata->runpool_irq.lock, flags); kbase_backend_release_ctx_noirq(kbdev, kctx);