From 5967ecda8f30b56a8c2876d61ed71922049736ea Mon Sep 17 00:00:00 2001 From: Hareesh Gundu Date: Thu, 9 Feb 2017 11:33:51 +0530 Subject: [PATCH] msm: kgsl: Fix false timeout gpu faults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes ringbuffer timer is not getting updated due to race with the preemption. This can cause dispatcher to detect false timeout gpu faults. Remove preempt state check in adreno_dispatch_process_drawqueue(), which will allow to update ringbuffer timeout value irrespective of the preemption state. If the preemption completes successfully, preemption logic updates timer for new_rb. We don’t need to care if it is not updated for prev_rb. If preemption in-progress timer will be updated for cur_rb in adreno_dispatch_process_drawqueue(). In both cases we are taking care to update ringbuffer timer. Hence we don’t need to check preemption state. CRs-Fixed: 1095344 Change-Id: I0e0ec655e2262c4f499748ce35a8d710ed15b5e3 Signed-off-by: Hareesh Gundu --- drivers/gpu/msm/adreno_dispatch.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c index 0d068e9c5805..89218b62bb7d 100644 --- a/drivers/gpu/msm/adreno_dispatch.c +++ b/drivers/gpu/msm/adreno_dispatch.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -2327,10 +2327,6 @@ static int adreno_dispatch_process_drawqueue(struct adreno_device *adreno_dev, if (adreno_drawqueue_is_empty(drawqueue)) return count; - /* Don't update the drawqueue timeout if we are about to preempt out */ - if (!adreno_in_preempt_state(adreno_dev, ADRENO_PREEMPT_NONE)) - return count; - /* Don't update the drawqueue timeout if it isn't active */ if (!drawqueue_is_current(drawqueue)) return count;