crypto: qat - add pm_status debugfs file
authorLucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Wed, 4 Oct 2023 10:09:20 +0000 (12:09 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 13 Oct 2023 10:31:07 +0000 (18:31 +0800)
commite079231676e05d6c88fba4585db1ac399a790b63
tree19fd819d37132e24bea856c77610a81ed43727b6
parent756762decc604a5ac5c041f23dd447c5e691f459
crypto: qat - add pm_status debugfs file

QAT devices implement a mechanism that allows them to go autonomously
to a low power state depending on the load.

Expose power management info by providing the "pm_status" file under
debugfs. This includes PM state, PM event log, PM event counters, PM HW
CSRs, per-resource type constrain counters and per-domain power gating
status specific to the QAT device.

This information is retrieved from (1) the FW by means of
ICP_QAT_FW_PM_INFO command, (2) CSRs and (3) counters collected by the
device driver.

In addition, add logic to keep track and report power management event
interrupts and acks/nacks sent to FW to allow/prevent state transitions.

Signed-off-by: Lucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
12 files changed:
Documentation/ABI/testing/debugfs-driver-qat
drivers/crypto/intel/qat/qat_common/Makefile
drivers/crypto/intel/qat/qat_common/adf_accel_devices.h
drivers/crypto/intel/qat/qat_common/adf_admin.c
drivers/crypto/intel/qat/qat_common/adf_common_drv.h
drivers/crypto/intel/qat/qat_common/adf_dbgfs.c
drivers/crypto/intel/qat/qat_common/adf_gen4_pm.c
drivers/crypto/intel/qat/qat_common/adf_gen4_pm.h
drivers/crypto/intel/qat/qat_common/adf_gen4_pm_debugfs.c [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs.c [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/adf_pm_dbgfs.h [new file with mode: 0644]
drivers/crypto/intel/qat/qat_common/icp_qat_fw_init_admin.h