From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4E3F3E16AE for ; Thu, 25 Jun 2026 12:40:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782391252; cv=none; b=Yze4bbSLJDMgkK2Soa/Aw0JKAT1Xmqyh+EqN9kyw7eBzcs9PwZL/liJF7YfZAjOciHTeeSjhisSEYnXHr/H2yWDpZ/Zc9EF0fvv6FsXSLGfT4zVrKH7riXaJqDhy0SPNJK3deju5jbrNwh2VUjzXwp5L74EofoUlQ/YB3ulrWMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782391252; c=relaxed/simple; bh=EjMNoCtdmTlFzgPpR2n296dmmF/gMfxRAN22sL6ij+s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KleW3eNQCV9bEfPvgllATC+zeogbohg1nCy+lIXhUnGICz3ElS6+VD7t62qFKaMPi3g9a4PiN19wDprQG+Y/A/pk3S+2iYzqzsvCADA5Fmku91YHBMKKMOIEMwzmPT8zj/QRU27C2iMKVuS8cYaUkhiz2+hw6DIOxKVqNb5OZn0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Nazs8AN8; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Nazs8AN8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1782391236; bh=EjMNoCtdmTlFzgPpR2n296dmmF/gMfxRAN22sL6ij+s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Nazs8AN8JIb9Esaxy3DLEK0VX0DRaD75txPkETqX2fAN9UVeigzVikt929/Fd69pv JA1fLME3GAb0DiulSdqEuUdgxJjdkSkbXb8oG+WoFPRbY5VOJa7HqHK1Sump2I94Rk u+EYImnXTaVaAhAhnOBzbnS+IhFFg1S2NmW1TaOlC59CD2PBQWJo9SstPQptUPRhMh fG3MhcrLAzcYQqvtTJ/d6D99PEvhXxFx1RKb77/ZjCseSeejvfeFbGXyTNn1TyTrwe 9lBqKkwK8ikLb8lyWu0tDzRX9kuujHbKHB1STAHx+iIHe2TJRwb9cKRyhx5vB8/THX Q22C71Y9YTCzw== Received: from fedora-2.home (unknown [100.64.0.11]) (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 2B2A217E0CF3; Thu, 25 Jun 2026 14:40:36 +0200 (CEST) From: Boris Brezillon Date: Thu, 25 Jun 2026 14:40:36 +0200 Subject: [PATCH 10/11] drm/panthor: Interrupt group start/resumption if group_bind_locked() fails Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260625-panthor-misc-fixes-v1-10-b67ed973fea6@collabora.com> References: <20260625-panthor-misc-fixes-v1-0-b67ed973fea6@collabora.com> In-Reply-To: <20260625-panthor-misc-fixes-v1-0-b67ed973fea6@collabora.com> To: Steven Price , Liviu Dudau Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Nicolas Frattaroli , Chia-I Wu , Karunika Choo , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Boris Brezillon , sashiko-bot@kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1782391229; l=1614; i=boris.brezillon@collabora.com; s=20260429; h=from:subject:message-id; bh=EjMNoCtdmTlFzgPpR2n296dmmF/gMfxRAN22sL6ij+s=; b=poilMur5pICW5Zggh8awaVTPcQrtWd2JzAGoZSXvlhsZO2VSox8euXjBWjSAnIpugoqlKrb1s 7iMTLckkgvVBDg6YMsqxn9/E0RkstSJ4Ifad3WolvBFEfWsNh85Ul4I X-Developer-Key: i=boris.brezillon@collabora.com; a=ed25519; pk=eN+ORdOgQY7d5U+0kA8h5bf67XdD8bhKbjD/TCHexSY= group_bind_locked() can fail if the MMU block is stuck. This is normally a reset situation, but by the time we reset the GPU, we might have tried to resume a group that's not resident, which will probably trip out the FW. So let's avoid that by bailing out when group_bind_locked() returns an error. We don't even try to start more groups because the GPU will be reset anyway. Fixes: de8548813824 ("drm/panthor: Add the scheduler logical block") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260623-panthor-signal-from-irq-v3-0-2ece396f8ee0@collabora.com?part=7 Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panthor/panthor_sched.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c index 5fe95d03f23e..298b046c95ed 100644 --- a/drivers/gpu/drm/panthor/panthor_sched.c +++ b/drivers/gpu/drm/panthor/panthor_sched.c @@ -2368,7 +2368,13 @@ tick_ctx_apply(struct panthor_scheduler *sched, struct panthor_sched_tick_ctx *c csg_iface = panthor_fw_get_csg_iface(ptdev, csg_id); csg_slot = &sched->csg_slots[csg_id]; - group_bind_locked(group, csg_id); + ret = group_bind_locked(group, csg_id); + if (ret) { + panthor_device_schedule_reset(ptdev); + ctx->csg_upd_failed_mask |= BIT(csg_id); + return; + } + csg_slot_prog_locked(ptdev, csg_id, new_csg_prio--); csgs_upd_ctx_queue_reqs(ptdev, &upd_ctx, csg_id, group->state == PANTHOR_CS_GROUP_SUSPENDED ? -- 2.54.0