From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94D2DC11F65 for ; Wed, 30 Jun 2021 15:01:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62EFE6142C for ; Wed, 30 Jun 2021 15:01:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62EFE6142C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE29E6EA02; Wed, 30 Jun 2021 15:01:17 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 26C7E6EA04 for ; Wed, 30 Jun 2021 15:01:17 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7AF091FB; Wed, 30 Jun 2021 08:01:16 -0700 (PDT) Received: from [192.168.1.179] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 077F33F718; Wed, 30 Jun 2021 08:01:14 -0700 (PDT) Subject: Re: [PATCH v6 16/16] drm/panfrost: Increase the AS_ACTIVE polling timeout To: Boris Brezillon , dri-devel@lists.freedesktop.org References: <20210630062751.2832545-1-boris.brezillon@collabora.com> <20210630062751.2832545-17-boris.brezillon@collabora.com> From: Steven Price Message-ID: <56cba9eb-32a9-6227-a8fb-79e585c5dd1e@arm.com> Date: Wed, 30 Jun 2021 16:01:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210630062751.2832545-17-boris.brezillon@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomeu Vizoso , Rob Herring , Alyssa Rosenzweig , Robin Murphy Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 30/06/2021 07:27, Boris Brezillon wrote: > Experience has shown that 1ms is sometimes not enough, even when the GPU > is running at its maximum frequency, not to mention that an MMU operation > might take longer if the GPU is running at a lower frequency, which is > likely to be the case if devfreq is active. > > Let's pick a significantly bigger timeout value (1ms -> 100ms) to be on > the safe side. > > v5: > * New patch > > Signed-off-by: Boris Brezillon Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c > index e0356e68e768..0da5b3100ab1 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c > @@ -34,7 +34,7 @@ static int wait_ready(struct panfrost_device *pfdev, u32 as_nr) > /* Wait for the MMU status to indicate there is no active command, in > * case one is pending. */ > ret = readl_relaxed_poll_timeout_atomic(pfdev->iomem + AS_STATUS(as_nr), > - val, !(val & AS_STATUS_AS_ACTIVE), 10, 1000); > + val, !(val & AS_STATUS_AS_ACTIVE), 10, 100000); > > if (ret) { > /* The GPU hung, let's trigger a reset */ >