]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/etnaviv: hold GPU lock across perfmon sampling
authorLucas Stach <l.stach@pengutronix.de>
Fri, 5 Jul 2024 20:00:09 +0000 (22:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 09:59:33 +0000 (10:59 +0100)
commitc737219c86d8cc07ae4e1b2f0a4cb42b6f858d2b
treee5955e5333d285a22d75c31a3b3002ab9dfacca7
parentc4330f5517729eab8437c06f4d3ac53df06ac576
drm/etnaviv: hold GPU lock across perfmon sampling

[ Upstream commit 37dc4737447a7667f8e9ec790dac251da057eb27 ]

The perfmon sampling mutates shared GPU state (e.g. VIVS_HI_CLOCK_CONTROL
to select the pipe for the perf counter reads). To avoid clashing with
other functions mutating the same state (e.g. etnaviv_gpu_update_clock)
the perfmon sampling needs to hold the GPU lock.

Fixes: 68dc0b295dcb ("drm/etnaviv: use 'sync points' for performance monitor requests")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/etnaviv/etnaviv_gpu.c