Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5279285rwp; Mon, 17 Jul 2023 00:44:02 -0700 (PDT) X-Google-Smtp-Source: APBJJlEG0Qo5ArRFqNVhQeQUIbt6C+Tq/BEj0ndHn9BkAqi9bJQhhEBvXvG9qEDbHgwNgSepk2Tr X-Received: by 2002:a05:6358:3399:b0:134:c682:213f with SMTP id i25-20020a056358339900b00134c682213fmr10822938rwd.31.1689579842321; Mon, 17 Jul 2023 00:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689579842; cv=none; d=google.com; s=arc-20160816; b=FsAvDPgbu5w8M0P65OqUdzmkdJDfVu/HG0riI2uTJUtefOfoq45dlhh/sxnT5Q/nz0 o8RL0P713sn3kONPljuvQaL2HQY9yCv8kbW02i+CZk1aA6lOuXwCxVbx3W4M/Uc06JeE 0GYTWNi1/R21s4cxXsv7ITKQxRamqzol5I9HybdqUukkMEbMn96fB9POV1Ws0KePxZvO 37pWkMFsCwY9JO2MYPZLCNOUm2EeiZessJ0Vu6COE8IULdE878RyCwHyQh4xOfRrPiIs CtGU+sPM9FkpB3tMLEgnmL7DEWAVUAKnjnfiVbRmX0oS85H+nWgU3HVaTP9JxTWbigrs jWpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YGkZKT1AEJCBIKgvAF08lVQceWX8gmWPudTCmerepao=; fh=f/EQ4r/7rqXi4K2ER6r87naSN9bSZy+PQv6HwIHthZI=; b=it2oU/HWpMdA1JWj2/MAAN0wLIzWdSM893StYOgsLntg1Gxqppt2xLI/fvyRNs/doS RkNBBEQsO4uBXCc8DE5RVqa3JxEk7ST+4aEVaNDZCN1ZZjJX/OlSyfWgBm1BxBsLK7w5 XPKq0Y127FHu9MFeeA6q8WB4D97WVYWe2nXFTlpYWJCFUQnJhgMGc+vjt877NXvfp7HX 3DgSGoVvo2aa/Dq0wkqaBWNBNRxq5xmWKHqjrqy5YEIIyAucbOmDUJLcJY/fYPi8eKoM LUV2N4wvOVGHmhjD+MkAfa6asCV6chz5mwX6mCzS5qgOExdErhqWsBNAeBnKLDnqMGav Mk5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QHaic3iJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bd20-20020a056a00279400b0064d3e1db254si11008065pfb.347.2023.07.17.00.43.50; Mon, 17 Jul 2023 00:44:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=QHaic3iJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbjGQHUM (ORCPT + 99 others); Mon, 17 Jul 2023 03:20:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbjGQHUI (ORCPT ); Mon, 17 Jul 2023 03:20:08 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A93CE2 for ; Mon, 17 Jul 2023 00:20:07 -0700 (PDT) Received: from [192.168.2.153] (109-252-154-2.dynamic.spd-mgts.ru [109.252.154.2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madras.collabora.co.uk (Postfix) with ESMTPSA id A88486603203; Mon, 17 Jul 2023 08:20:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689578406; bh=2azQJ2Y4SSayyaeHVwWvWOeHAUzUtm51R0fJQMMVQ5c=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=QHaic3iJQAnUh41LPL/dSxbTzIoLUHJUqvA9Ca1tskxSrpSt8oXSxP50SxH+ur4tx /M19RkGlQGU3ywi/XWLXSf4C9qJau1esH0awecUt3jsSQ88rIgga/XZzYGCb5Z7+AA Zu3gwmBu4OT9MXtYwwdryWn8LZsBUudGGRDIgcDFHbIRqL4XSUI1cPkb3Lh28JF/D+ BPVKiqTpwGIbWoiTbqPyLDY/+4L3NTMkCjVHouapZULziLYjhxuu3caF1cJu7DT62a sGNhb8kbkBIcRQzvcGrr0paHt8hVQz/E9i/yJc+1kNUyaotcK1+8YxUaL5ujj9SSPK HyEyIDEP7XZdQ== Message-ID: <80de081a-e443-85a2-1a61-6a8885e8d529@collabora.com> Date: Mon, 17 Jul 2023 10:20:02 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.1 Subject: Re: [PATCH v1] drm/panfrost: Sync IRQ by job's timeout handler Content-Language: en-US To: Boris Brezillon Cc: Rob Herring , Steven Price , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <20230717065254.1061033-1-dmitry.osipenko@collabora.com> <20230717090506.2ded4594@collabora.com> From: Dmitry Osipenko In-Reply-To: <20230717090506.2ded4594@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 7/17/23 10:05, Boris Brezillon wrote: > Hi Dmitry, > > On Mon, 17 Jul 2023 09:52:54 +0300 > Dmitry Osipenko wrote: > >> Panfrost IRQ handler may stuck for a long time, for example this happens >> when there is a bad HDMI connection and HDMI handler takes a long time to >> finish processing, holding Panfrost. Make Panfrost's job timeout handler >> to sync IRQ before checking fence signal status in order to prevent >> spurious job timeouts due to a slow IRQ processing. > > Feels like the problem should be fixed in the HDMI encoder driver > instead, so it doesn't stall the whole system when processing its > IRQs (use threaded irqs, maybe). I honestly don't think blocking in the > job timeout path to flush IRQs is a good strategy. The syncing is necessary to have for correctness regardless of whether it's HDMI problem or something else, there could be other reasons for CPU to delay IRQ processing. It's wrong to say that hw is hung, while it's not. -- Best regards, Dmitry