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 CFEEC41A4F9 for ; Thu, 20 Aug 2026 11:06:44 +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=1787224007; cv=none; b=c0LqAvP6xFHSIHYz6N19PPa/rOuBGvKtD+p9nJI5y0K+rKU8pBVOKKJ+uuqqqrTAAT9fSJvnHF+u+gmaUTGEbJd1S/2RMAYB7p1lUWyk6tLXN66rFuPp637HgAc+DJiXsv3l60KJuRSOb7dzwuZwPmunMXh1a8hffuJB7SVj10I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787224007; c=relaxed/simple; bh=jNfDdzqRV98RHfLele5yJdWBh5exPf2ix6GNhcE9czw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kCL4Hp5+7F0GJhfhRqfPkCZhNDn5pGatscJ0OsqugR/QzN3prCcX4BPEgCaw00hssmnvEijUHv5Dy6tkp67h1wySQesqCyi2sdp05OIdt292jW/WwNguux47AgvAdPmsRGatzbHM9OyMUfWJJ5iK3qKp3X6KYBqFIuQTQv+kG74= 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=vUeWH+G1; 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="vUeWH+G1" 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 DB568153B for ; Thu, 20 Aug 2026 04:06:39 -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 91A2A3F763 for ; Thu, 20 Aug 2026 04:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1787224003; bh=jNfDdzqRV98RHfLele5yJdWBh5exPf2ix6GNhcE9czw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vUeWH+G1auIwNXtYOxlzKsjUXKAt/vywsCIsP8/K+wxCL9mL4HnyroArq7ibVuHJh AYdDWHsMX0xGG4XJm6C/UaomwkopMPlQCONn+BlD1TKfqQ6n96KNU6Ou5sqNCtqo4f c+HkBmYz8xwuxwTR2xuoUMySKVvYnDzHRVRtVGPg= Date: Thu, 20 Aug 2026 12:06:32 +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 v4 3/3] drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs Message-ID: References: <20260812-panthor-cache-flush-fix-v4-0-751e32901898@collabora.com> <20260812-panthor-cache-flush-fix-v4-3-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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260812-panthor-cache-flush-fix-v4-3-751e32901898@collabora.com> On Wed, Aug 12, 2026 at 04:07:20PM +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") > Reviewed-by: Boris Brezillon > 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 55e33f145b40..fb2702e1e0a2 100644 > --- a/drivers/gpu/drm/panthor/panthor_gpu.c > +++ b/drivers/gpu/drm/panthor/panthor_gpu.c > @@ -424,7 +424,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! / --------------- ¯\_(ツ)_/¯