From patchwork Wed Dec 11 07:54:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 13903068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6CE2BE7717D for ; Wed, 11 Dec 2024 07:54:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD0CE10E5E6; Wed, 11 Dec 2024 07:54:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="KRtVSfdE"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 45EE010E576 for ; Wed, 11 Dec 2024 07:54:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1733903662; bh=SIJsnPt0I4FD02q9szBFQ2RkNzIB1KMJFYToNwB238Y=; h=From:To:Cc:Subject:Date:From; b=KRtVSfdEMRxwzgt99IkVxqVEAOudD4Er9zH/MgKvwrZI/j2yjTPykKyt/G9QQh3RR mi30aO0W2dM7OLlERVMzTboUoTWK5xNk9lcnVWRxVJ5BAcJ8WUot2yjL4FXHRQHygD TPy2oCEwcHR0XVL8m6cIjGT/x/UOPqC4ycnsCYokOhLbdLybiKPvIq1Vub389k/nkB fUaqAAwmppanilv1oq7moNB32nznZcsccpnxRygqYwZsv62EUsvf5adGRppAYDnx/b u1mXEdRSjQUw2fsR9ehq+gQ+e6aAFqYBiZn2ywBfkZA6GiW0KeAYL5rTy6NrdCs4Ih my4Xm+EF4otQg== Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:d3ea:1c7:41fd:3038]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id 935F717E13A2; Wed, 11 Dec 2024 08:54:22 +0100 (CET) From: Boris Brezillon To: Boris Brezillon , Steven Price , Liviu Dudau , =?utf-8?q?Adri=C3=A1n_Larumbe?= Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com Subject: [PATCH v3 0/5] drm/panthor: Be robust against failures in the resume path Date: Wed, 11 Dec 2024 08:54:14 +0100 Message-ID: <20241211075419.2333731-1-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hello, Here's a collection of patches improving robustness to failures in the device resume/suspend path. Those failures are pretty hard to reproduce (happens once in a while on a deqp-vk run), so I used a mechanism to fake them. Faking a FW boot failure is kinda tricky though, which means the last patch has only been partially tested: - the fast reset path is well tested because that's the default on a device suspend - the slow reset has been tested with a hack replacing fast resets by slow resets - the fast -> slow reset fallback has been tested by faking boot failures after a fast reset, but these are not real, which means we can't really validate if the MCU recovers fine after a slow reset On the other hand, this implementation doesn't look like it could do more harm than the current one (the only difference is the extra GPU soft-reset that happens between the fast and slow FW boot). Nothing major changed in v3. Each patch contains a changelog, if you're interested. Regards, Boris Boris Brezillon (5): drm/panthor: Preserve the result returned by panthor_fw_resume() drm/panthor: Be robust against runtime PM resume failures in the suspend path drm/panthor: Ignore devfreq_{suspend,resume}_device() failures drm/panthor: Be robust against resume failures drm/panthor: Fix the fast-reset logic drivers/gpu/drm/panthor/panthor_devfreq.c | 12 ++-- drivers/gpu/drm/panthor/panthor_devfreq.h | 4 +- drivers/gpu/drm/panthor/panthor_device.c | 68 ++++++++++------------- drivers/gpu/drm/panthor/panthor_device.h | 37 ++++++++++++ drivers/gpu/drm/panthor/panthor_drv.c | 2 +- drivers/gpu/drm/panthor/panthor_fw.c | 68 +++++++---------------- drivers/gpu/drm/panthor/panthor_gpu.c | 14 +++-- drivers/gpu/drm/panthor/panthor_mmu.c | 3 +- drivers/gpu/drm/panthor/panthor_sched.c | 4 +- 9 files changed, 107 insertions(+), 105 deletions(-)