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 49CCD4DA9C9 for ; Fri, 2 Oct 2026 15:28:24 +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=1790954906; cv=none; b=XYqmQneJF4M0ckRdrMcbo6TetRHBF5qlfMNNWftRJFBN0Xp9WulZN+516sVjchAJWirRt0impQO59iuNNeWLP3F5+T4ZXH2iTaUbAi4NFl+WPoRvEg/XoPMWqSGrv/Ldsz9uvwaKqEVmW4640xL7rP3ObovJ0yARL6vgW/utIf0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790954906; c=relaxed/simple; bh=+c2XfBklE+xxM00L91xC98BmEy1tRYcDNN94L00w0FI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HLrhcpAQtOrrAKRpOSL025xLTTSe4b7TI9QiwLYVrZTcVuslQ4srXbcw0/+jsxzuzbGP5romZ3QW3KBLIpd0lbHLMEQgBX+fIsUVrNauwVw0H+X86is1CeOjqmppGoGlJWPv58PFj5RQRsft1x25y21EkFZ341vQu33MGmx/3MM= 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=SF03anza; 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="SF03anza" 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 0B673143D; Fri, 2 Oct 2026 08:28:20 -0700 (PDT) Received: from [10.0.129.26] (e122027.cambridge.arm.com [10.0.129.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 413F33F85F; Fri, 2 Oct 2026 08:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1790954903; bh=+c2XfBklE+xxM00L91xC98BmEy1tRYcDNN94L00w0FI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SF03anza6RwRPD8/TqflSqJSUNpMzGBQmJ4mxIT1x+WHcGQflCOE7659vrNAfZwN1 WlLbYN00xi3Wm9p4x2w4WnKYay3BDSm11GxmvSdNEVZMNRku/8mD0Gl+j8ptVPa5iI mYQldc5QeZH0BtK9i1BgjKDfNTrVfWecGO3NWP0k= Message-ID: Date: Fri, 2 Oct 2026 16:28:18 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v12 13/15] drm/panfrost: Avoid cache flush after perfcnt sample in fully coherent systems To: =?UTF-8?Q?Adri=C3=A1n_Larumbe?= , Boris Brezillon , Rob Herring , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Faith Ekstrand , "Marty E. Plummer" , Tomeu Vizoso , Eric Anholt , Robin Murphy , Philipp Zabel Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Collabora Kernel Team , Neil Armstrong References: <20260929-claude-fixes-v12-0-62beb08de207@collabora.com> <20260929-claude-fixes-v12-13-62beb08de207@collabora.com> From: Steven Price Content-Language: en-GB In-Reply-To: <20260929-claude-fixes-v12-13-62beb08de207@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 29/09/2026 04:44, Adrián Larumbe wrote: > If the GPU and CPU are fully coherent, then there's no need to flush the > GPU caches after a perfcnt sample is made available. > > Reviewed-by: Boris Brezillon > Signed-off-by: Adrián Larumbe Reviewed-by: Steven Price > --- > drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > index ffc77121070e..b3f71d7fd82a 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > +++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c > @@ -52,7 +52,10 @@ void panfrost_perfcnt_clean_cache_done(struct panfrost_device *pfdev) > > void panfrost_perfcnt_sample_done(struct panfrost_device *pfdev) > { > - gpu_write(pfdev, GPU_CMD, GPU_CMD_CLEAN_CACHES); > + if (pfdev->features.selected_coherency != COHERENCY_ACE) > + gpu_write(pfdev, GPU_CMD, GPU_CMD_CLEAN_CACHES); > + else > + complete(&pfdev->perfcnt->dump_comp); > } > > static int panfrost_perfcnt_dump_locked(struct panfrost_device *pfdev) >