From 2c15c3265bbcd88baf119f33f16c5a54d3d3f5a7 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 27 Jun 2014 09:46:33 +0300 Subject: gpu: nvgpu: Bump unmap retries if not silicon In simulation and emulation 50ms is not enough to ensure a job is complete. Bump it to 5s when not running on silicon. Bug 1510751 Change-Id: I90883b70ce2a75a8f07344f713d647b3fa0d0c7d Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/432044 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Chris Dragan Tested-by: Chris Dragan Reviewed-by: Deepak Nibade Reviewed-by: Shridhar Rasal Reviewed-by: Sachin Nikam --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 6f62e1cb..e580732a 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -794,7 +794,10 @@ static void gk20a_vm_unmap_user(struct vm_gk20a *vm, u64 offset) if (mapped_buffer->flags & NVHOST_AS_MAP_BUFFER_FLAGS_FIXED_OFFSET) { mutex_unlock(&vm->update_gmmu_lock); - retries = 1000; + if (tegra_platform_is_silicon()) + retries = 1000; + else + retries = 1000000; while (retries) { if (atomic_read(&mapped_buffer->ref.refcount) == 1) break; -- cgit v1.2.2