]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/panfrost: Add cycle counter job requirement
authorMary Guillemard <mary.guillemard@collabora.com>
Mon, 19 Aug 2024 08:02:23 +0000 (10:02 +0200)
committerSteven Price <steven.price@arm.com>
Mon, 2 Sep 2024 09:13:38 +0000 (10:13 +0100)
commit3a8d97611b564b5b25f68c90b543056fc9ae0bec
tree956fe2af4b95fd0710b4a4ded91cd2a022d8686e
parent9c75b16cabc69adbbfdc9d219df87c9173f0da0a
drm/panfrost: Add cycle counter job requirement

Extend the uAPI with a new job requirement flag for cycle
counters. This requirement is used by userland to indicate that a job
requires cycle counters or system timestamp to be propagated. (for use
with write value timestamp jobs)

We cannot enable cycle counters unconditionally as this would result in
an increase of GPU power consumption. As a result, they should be left
off unless required by the application.

If a job requires cycle counters or system timestamps propagation, we
must enable cycle counting before issuing a job and disable it right
after the job completes.

Since this extends the uAPI and because userland needs a way to advertise
features like VK_KHR_shader_clock conditionally, we bumps the driver
minor version.

v2:
- Rework commit message
- Squash uAPI changes and implementation in this commit
- Simplify changes based on Steven Price comments

v3:
- Add Steven Price r-b
- Fix a codestyle issue

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240819080224.24914-3-mary.guillemard@collabora.com
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_job.c
include/uapi/drm/panfrost_drm.h