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 2B8BD36BCFD for ; Thu, 20 Nov 2025 16:53:53 +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=1763657636; cv=none; b=IWw7NYYDwCewIuEgCiKeo6TDGe1yEvo7dSq7Bme5Q963Am2OwZQrk3qfRDQVIQtlLB8BvxfswsX/Q3gdu9zUYHLWlxZT5LnTEEW2N43evg1RJuQ+c6ilno1jQr0tkKtx1dPKgT0e4UyKsvQ7hnSbaJDf5hDKBQlpHvXZQlIfVtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763657636; c=relaxed/simple; bh=1pZoMVYO8xOb5IhhWwdX0LLFjmS2g++mOSpMQpR4RUg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=qAAQRyvTeiK32/tgIHybCQKDlIDEZZznMPYFju1o/22PlAtah4J2eEic4lBypeLrhrK40euzWW2LgwEhOSSe4TmL+ZwCCXhO5r4QHigjYAXi8klvGwln+47Q9g02QslHJu5+rZDJ4cy8hvjne3SolHRc39XIHbhuCh8BP2cQMtQ= 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; 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 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 CE82C339; Thu, 20 Nov 2025 08:53:45 -0800 (PST) Received: from [10.1.32.17] (unknown [10.1.32.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5B0BE3F66E; Thu, 20 Nov 2025 08:53:51 -0800 (PST) Message-ID: <61a9daa2-e34a-483e-a577-253feccb65f8@arm.com> Date: Thu, 20 Nov 2025 16:53:49 +0000 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] drm/panthor: Enable timestamp propogation To: Ashley Smith , Boris Brezillon , Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20251119162613.912486-1-ashley.smith@collabora.com> From: Steven Price Content-Language: en-GB In-Reply-To: <20251119162613.912486-1-ashley.smith@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 19/11/2025 16:25, Ashley Smith wrote: > Set the GLB_COUNTER_EN bit to enable coherent propagation of GPU > timestamp values to shader cores. This is a prerequisite for exposing > device-coherent timestamp queries. >> Bump the version to 1.6 so userspace can detect support. > > Signed-off-by: Ashley Smith > --- > drivers/gpu/drm/panthor/panthor_drv.c | 3 ++- > drivers/gpu/drm/panthor/panthor_fw.c | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c > index d1d4c50da5bf..0b0ec3b978c6 100644 > --- a/drivers/gpu/drm/panthor/panthor_drv.c > +++ b/drivers/gpu/drm/panthor/panthor_drv.c > @@ -1604,6 +1604,7 @@ static void panthor_debugfs_init(struct drm_minor *minor) > * - 1.3 - adds DRM_PANTHOR_GROUP_STATE_INNOCENT flag > * - 1.4 - adds DRM_IOCTL_PANTHOR_BO_SET_LABEL ioctl > * - 1.5 - adds DRM_PANTHOR_SET_USER_MMIO_OFFSET ioctl > + * - 1.6 - enables GLB_COUNTER_EN > */ > static const struct drm_driver panthor_drm_driver = { > .driver_features = DRIVER_RENDER | DRIVER_GEM | DRIVER_SYNCOBJ | > @@ -1617,7 +1618,7 @@ static const struct drm_driver panthor_drm_driver = { > .name = "panthor", > .desc = "Panthor DRM driver", > .major = 1, > - .minor = 5, > + .minor = 6, > > .gem_create_object = panthor_gem_create_object, > .gem_prime_import_sg_table = drm_gem_shmem_prime_import_sg_table, > diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c > index 38d87ab92eda..a02fb3afc2e1 100644 > --- a/drivers/gpu/drm/panthor/panthor_fw.c > +++ b/drivers/gpu/drm/panthor/panthor_fw.c > @@ -999,6 +999,7 @@ static void panthor_fw_init_global_iface(struct panthor_device *ptdev) > panthor_fw_update_reqs(glb_iface, req, GLB_IDLE_EN, GLB_IDLE_EN); > panthor_fw_toggle_reqs(glb_iface, req, ack, > GLB_CFG_ALLOC_EN | > + GLB_COUNTER_EN | > GLB_CFG_POWEROFF_TIMER | > GLB_CFG_PROGRESS_TIMER); This is definitely the wrong function. The COUNTER_ENABLE field isn't a toggle field. So '1' enables the counter propagation, '0' disables it. This code is toggling it so changing it from whatever default it started out at. Testing on my Rock5B I see that it does seem to start at 0, so this is probably why it seemed to work. But you need to include this value in the panthor_fw_update_reqs() call instead. Thanks, Steve > > > base-commit: 92c49b3f4df8f9acfa95551ef38fc00c675319fd