]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/panthor: Enable timestamp propagation
authorAshley Smith <ashley.smith@collabora.com>
Thu, 27 Nov 2025 11:44:02 +0000 (11:44 +0000)
committerBoris Brezillon <boris.brezillon@collabora.com>
Fri, 5 Dec 2025 12:13:42 +0000 (13:13 +0100)
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.

v2:
- GLB_COUNTER_EN is not a toggle bit move to panthor_fw_update_reqs

Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patch.msgid.link/20251127115019.2113040-1-ashley.smith@collabora.com
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
drivers/gpu/drm/panthor/panthor_drv.c
drivers/gpu/drm/panthor/panthor_fw.c

index d1d4c50da5bf6ab73a3602ea99380d0d0e951163..0b0ec3b978c6e6fa472688af54863ff83d5aece2 100644 (file)
@@ -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,
index 94a3cd6dfa6dec5bde15a6f0c23d93c492c8658d..4beaa589ba66cd837a2d7c5403a7173a106afe0c 100644 (file)
@@ -1044,7 +1044,8 @@ static void panthor_fw_init_global_iface(struct panthor_device *ptdev)
        if (panthor_fw_has_glb_state(ptdev))
                glb_iface->input->ack_irq_mask |= GLB_STATE_MASK;
 
-       panthor_fw_update_reqs(glb_iface, req, GLB_IDLE_EN, GLB_IDLE_EN);
+       panthor_fw_update_reqs(glb_iface, req, GLB_IDLE_EN | GLB_COUNTER_EN,
+                              GLB_IDLE_EN | GLB_COUNTER_EN);
        panthor_fw_toggle_reqs(glb_iface, req, ack,
                               GLB_CFG_ALLOC_EN |
                               GLB_CFG_POWEROFF_TIMER |