From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4E5A48A8C2 for ; Thu, 13 Aug 2026 15:30:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786635034; cv=none; b=crF4EmW0Dv3GanQmoBhPngkQw8du4eoBrIvu+Fh62sQkObTVja+5yk0FSfoH7IlB0SJmdst5JxMXo5OidYrvu2iLqt5RcRJ0w8ko61PETFt7oa0qc9+7oYmbkYh+yODYtSft1hHjG3H7oHtBoGfUpAmu0JOC4jdvM2AenP3XQmI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786635034; c=relaxed/simple; bh=fZHXHlUpDEgX8tHOpg8oqwQHGXxEPEgltzKhWJGUvts=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jeYoGKWoQa0pWDc/wo83JoZfSrFBpNPsspiJUIZoSPEuuwBPutEj7a2iM/bRMI3ZOPVViyZJdArO6js6+YcGmyrMHVxoJ4YM5Wl7UduCq/X0XPlUvXbZcgpTahN+Xwk+9R+D1VMWfZRmvTbBBN+F4zYQPgNXveonPMLmIQw+xf4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=ugOAk7OV; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="ugOAk7OV" 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 C806D1596 for ; Thu, 13 Aug 2026 08:30:27 -0700 (PDT) Received: from [192.168.0.1] (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7B6E33F632 for ; Thu, 13 Aug 2026 08:30:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1786635031; bh=fZHXHlUpDEgX8tHOpg8oqwQHGXxEPEgltzKhWJGUvts=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ugOAk7OVIohjq5Xz+mJpo+EZKNM4AzUXOA9dpzZDVWtbOGMHrxBqwxyEYftOm41BE D3fr5Q6lPrE+WWKCCVg8Cj0HDt777ji71H9qoQ3DI6ej8TfaJZtH1sbM6IiRmI//Gr ZDjRzKSCy8iKMbnM075ftRHT2bWa6JbuE+zLk4vA= Date: Thu, 13 Aug 2026 16:30:19 +0100 From: Liviu Dudau To: Nicolas Frattaroli Cc: Boris Brezillon , Steven Price , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Grant Likely , Heiko Stuebner , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com Subject: Re: [PATCH v3 3/3] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs Message-ID: References: <20260811-panthor-cache-flush-fix-v3-0-47d2c1bb1dab@collabora.com> <20260811-panthor-cache-flush-fix-v3-3-47d2c1bb1dab@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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260811-panthor-cache-flush-fix-v3-3-47d2c1bb1dab@collabora.com> On Tue, Aug 11, 2026 at 04:08:33PM +0200, Nicolas Frattaroli wrote: > panthor_gpu_soft_reset() sets pending_reqs to 0 without taking the > requisite reqs_lock. > > Fix this by taking the lock for the duration of the modification. > > Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block") > Signed-off-by: Nicolas Frattaroli Reviewed-by: Liviu Dudau Best regards, Liviu > --- > drivers/gpu/drm/panthor/panthor_gpu.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/panthor/panthor_gpu.c > index cb5319d1c5de..12e7e29b35b5 100644 > --- a/drivers/gpu/drm/panthor/panthor_gpu.c > +++ b/drivers/gpu/drm/panthor/panthor_gpu.c > @@ -405,7 +405,10 @@ int panthor_gpu_soft_reset(struct panthor_device *ptdev) > return -ETIMEDOUT; > } > > - ptdev->gpu->pending_reqs = 0; > + scoped_guard(spinlock, &ptdev->gpu->reqs_lock) { > + ptdev->gpu->pending_reqs = 0; > + } > + > return 0; > } > > > -- > 2.55.0 > -- ==================== | I would like to | | fix the world, | | but they're not | | giving me the | \ source code! / --------------- ¯\_(ツ)_/¯