From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (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 07324453A28 for ; Wed, 12 Aug 2026 14:08:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786543695; cv=pass; b=K8vhTRde0Y70nfvxlr+lJKhsdKpAfi4IqQlqBKUoLVfUxZbq6JkKzJocjIl2WRLTeHKh1hYOjeLEgHpd0SmqoxFER3PqqtkdPK5c+zidmyuwIpoNHpsh3E2xe3PokMHBfNvVlOAaOLvQanAf6RNefgdtR3gTF4sUBGlQhrVoY44= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786543695; c=relaxed/simple; bh=WFEUUMN8dG3V9tshEG60BjCCdPH3p5HukypOSCdOkuA=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=tJR1zWux2xyBYVMaZgAvtgPIKeqHZf+QXc7ERQbDyxN+WRe8X5c4BwmCaKp4X02Y7kZ3Tctm39AtRJZpc0BaHqXwax7gszgBcsfhMZ1/5ccAxfF/fMgUXzPVXDAEBzhLjxwEUwZ+MICxT8szJ3UBro5iVqk+uKCGIl9UsoSqDy8= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b=XQ6uAeU7; arc=pass smtp.client-ip=136.143.188.112 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 (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="XQ6uAeU7" ARC-Seal: i=1; a=rsa-sha256; t=1786543661; cv=none; d=zohomail.com; s=zohoarc; b=V6OEEgm5QIPfEGM2KJiT3LCgDCLcnA13CFRuNpkgJPtH3n4L//f9S69L2GSYxbDJ9Dq0APMIG6XWAKkZ+e/QMX5CvbVyzFJfynLJu2kzXOXBWUBV3iECbPlorpKLlnfcXpeJo30gbgmrEZhqPDKeK8oVxtRwg+eQBo8X4XJD0bY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1786543661; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=HtaUknOBrtxOVm97oCaJuMIizysi38YEI9j5FiYHokU=; b=H/8XY+e/DMLZBtklbTdoL9oogCuV2GSBH+XijPjYjBWhz+VKB+LZkSCSetwJyCI1sNifrPtWCXsNrVHCiPeK7TgQArlRDTr0/FmJguzPp0XDhyI4FpJcw3f/euf/aOnkRIkr+U7Havl3/ZNknaQjwXZOSFO6OGgRjUwnLpsG/1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1786543661; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:To:To:Cc:Cc:Reply-To; bh=HtaUknOBrtxOVm97oCaJuMIizysi38YEI9j5FiYHokU=; b=XQ6uAeU77Dcgy/kAuuHQ0kAcrkRXGgfrA7cnhkzaPFVKymtSx4PBE41SRqfh4yhS mjbtw+lronIW2FI1uRMlX3D5zGTUyUGa8P8BC+fBjHNNyFOBLiL4Q39nGmWxj8aIS+d gfV1Ibuj/NE9Ygd0rRJy1Ol0QhGC0PtN6xcUt/64= Received: by mx.zohomail.com with SMTPS id 1786543659744525.0726026625509; Wed, 12 Aug 2026 07:07:39 -0700 (PDT) From: Nicolas Frattaroli Subject: [PATCH v4 0/3] Rework panthor's cache flush and soft reset locking Date: Wed, 12 Aug 2026 16:07:17 +0200 Message-Id: <20260812-panthor-cache-flush-fix-v4-0-751e32901898@collabora.com> 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 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/3XO3W6EIBAF4FcxXJeWH3fFvep7bPYCBig0KhbQt Nn47kXXpE1Tr8ghM9+cO0omepPQpbqjaGaffBhKqJ8qBE4ObwZ7XTJihJ1JwwQe5ZBdiBgkOIN tNyWHrf/Eip9B0ZNtGXBUtsdoyvcmX2+PnCb1biCv3D4RzcdUTubHGFIyGQyh732+VDr2OPvxZ X/RijifcohfW9uZbjt7sfaw2EwxwYycWkaN5iDoK4SukypE+Vxube7MflmcHFtstUTTkroRylr 7n8V/LEHpscWLVTeaAVWKaqn+WsuyfANnuQs8nwEAAA== X-Change-ID: 20260728-panthor-cache-flush-fix-b36cb15f92c3 To: Boris Brezillon , Steven Price , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Grant Likely , Heiko Stuebner Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com, Nicolas Frattaroli X-Mailer: b4 0.15.2 There is a problem in panthor's cache flushing/soft reset code related to locking. They take the reqs_lock spinlock with _irqsave, even though the contended lock is never acquired in a raw interrupt handler. Only a threaded handler locks it. A new tracepoint to debug cache flushing duration without initial locking waits is thrown in for good measure as well, to complement what's in lock_stat and what the function tracer can already do. Signed-off-by: Nicolas Frattaroli --- Changes in v4: - Replace flush tracepoints with just one tracepoint that has a duration and exit status argument - Link to v3: https://patch.msgid.link/20260811-panthor-cache-flush-fix-v3-0-47d2c1bb1dab@collabora.com Changes in v3: - Drop new wait_event macro patch as the existing ones have a memory barrier that makes the current use valid - Rewrite fix patch to use scoped guards, and just get rid of the IRQ disabling - Add separate fix for the outside-of-lock pending_reqs clearing in soft reset path - Move tracepoint patch to before fixes for easier before/after testing - Link to v2: https://patch.msgid.link/20260730-panthor-cache-flush-fix-v2-0-28790478bfff@collabora.com Changes in v2: - Use trace event template for the two tracepoints (ty Steven Rostedt) - Link to v1: https://patch.msgid.link/20260729-panthor-cache-flush-fix-v1-0-205921ed3c81@collabora.com --- Nicolas Frattaroli (3): drm/panthor: Add tracepoint for cache flushing drm/panthor: Revisit reqs_lock handling in flush/reset paths drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs drivers/gpu/drm/panthor/panthor_gpu.c | 89 ++++++++++++++++++++------------- drivers/gpu/drm/panthor/panthor_trace.h | 38 ++++++++++++++ 2 files changed, 93 insertions(+), 34 deletions(-) --- base-commit: 96ddbb14986632af742523e68f90d51c138c57f0 change-id: 20260728-panthor-cache-flush-fix-b36cb15f92c3 Best regards, -- Nicolas Frattaroli