diff --git a/hw_fence/include/hw_fence_drv_priv.h b/hw_fence/include/hw_fence_drv_priv.h index 14a302871d..b9165fe666 100644 --- a/hw_fence/include/hw_fence_drv_priv.h +++ b/hw_fence/include/hw_fence_drv_priv.h @@ -191,6 +191,7 @@ struct msm_hw_fence_mem_data { * @create_hw_fences: boolean to continuosly create hw-fences within debugfs * @clients_list: list of debug clients registered * @clients_list_lock: lock to synchronize access to the clients list + * @lock_wake_cnt: number of times that driver triggers wake-up ipcc to unlock inter-vm try-lock */ struct msm_hw_fence_dbg_data { struct dentry *root; @@ -204,6 +205,8 @@ struct msm_hw_fence_dbg_data { struct list_head clients_list; struct mutex clients_list_lock; + + u64 lock_wake_cnt; }; /** diff --git a/hw_fence/src/hw_fence_drv_debug.c b/hw_fence/src/hw_fence_drv_debug.c index a1db824278..314bf27a18 100644 --- a/hw_fence/src/hw_fence_drv_debug.c +++ b/hw_fence/src/hw_fence_drv_debug.c @@ -1003,6 +1003,8 @@ int hw_fence_debug_debugfs_register(struct hw_fence_driver_data *drv_data) debugfs_create_file("hw_fence_dump_queues", 0600, debugfs_root, drv_data, &hw_fence_dump_queues_fops); debugfs_create_file("hw_sync", 0600, debugfs_root, NULL, &hw_sync_debugfs_fops); + debugfs_create_u64("hw_fence_lock_wake_cnt", 0600, debugfs_root, + &drv_data->debugfs_data.lock_wake_cnt); return 0; } diff --git a/hw_fence/src/hw_fence_drv_utils.c b/hw_fence/src/hw_fence_drv_utils.c index 36d8494e1d..c8eab917dd 100644 --- a/hw_fence/src/hw_fence_drv_utils.c +++ b/hw_fence/src/hw_fence_drv_utils.c @@ -59,7 +59,11 @@ static void _unlock(struct hw_fence_driver_data *drv_data, uint64_t *lock) * SVM is in WFI state, since SVM acquire bit is set * Trigger IRQ to Wake-Up SVM Client */ - HWFNC_DBG_LOCK("triggering ipc to unblock SVM lock_val:%d\n", lock_val); +#if IS_ENABLED(CONFIG_DEBUG_FS) + drv_data->debugfs_data.lock_wake_cnt++; + HWFNC_DBG_LOCK("triggering ipc to unblock SVM lock_val:%d cnt:%llu\n", lock_val, + drv_data->debugfs_data.lock_wake_cnt); +#endif hw_fence_ipcc_trigger_signal(drv_data, drv_data->ipcc_client_pid, drv_data->ipcc_client_vid, 30); /* Trigger APPS Signal 30 */