[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260113171907.02623198@fedora>
Date: Tue, 13 Jan 2026 17:19:07 +0100
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Lukas Zapolskas <lukas.zapolskas@....com>
Cc: Liviu Dudau <liviu.dudau@....com>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Adrián Larumbe
<adrian.larumbe@...labora.com>, nd@....com,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, Mihail
Atanassov <mihail.atanassov@....com>
Subject: Re: [PATCH v6 5/7] drm/panthor: Implement the counter sampler and
sample handling
On Mon, 15 Dec 2025 17:14:51 +0000
Lukas Zapolskas <lukas.zapolskas@....com> wrote:
> +#define BLK_MASK(x) GENMASK_ULL((x) - 1, 0)
> +
> +static u64 get_sc_mask(struct panthor_device *ptdev)
> +{
> + const u64 sc_mask = ptdev->gpu_info.shader_present;
Hm, so I've just merged a change to allow overriding this
shader_present with a value loaded from an nvmem cell, meaning the
value returned to userspace no longer matches the number of cores known
by the GPU. I have a local hack to apply such overrides late and keep
panthor_device::gpu_info as the HW state, but this forces us to
be careful about which variant of shader_present we want depending on
the context (in panthor_{fw,sched}.c we want the user value, in
panthor_perf.c, it we want the user value in get_sc_mask(), and the HW
value in get_reserved_sc_blocks()).
> +
> + return BLK_MASK(hweight64(sc_mask));
I believe this should be sc_mask on v13-, and
BLK_MASK(hweight64(sc_mask)) on v14+.
> +}
Powered by blists - more mailing lists