linux/drivers/accel/ivpu
Andrzej Kacprowski 60cb4dfcf7 accel/ivpu: Fix the NPU's DPU frequency calculation
[ Upstream commit 6c2b75404d ]

Fix the frequency returned to the user space by
the DRM_IVPU_PARAM_CORE_CLOCK_RATE GET_PARAM IOCTL.
The kernel driver returned CPU frequency for MTL and bare
PLL frequency for LNL - this was inconsistent and incorrect
for both platforms. With this fix the driver returns maximum
frequency of the NPU data processing unit (DPU) for all HW
generations. This is what user space always expected.

Also do not set CPU frequency in boot params - the firmware
does not use frequency passed from the driver, it was only
used by the early pre-production firmware.
With that we can remove CPU frequency calculation code.

Show NPU frequency in FREQ_CHANGE interrupt when frequency
tracking is enabled.

Fixes: 8a27ad81f7 ("accel/ivpu: Split IP and buttress code")
Cc: stable@vger.kernel.org # v6.11+
Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com>
Signed-off-by: Maciej Falkowski <maciej.falkowski@linux.intel.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://lore.kernel.org/r/20250401155912.4049340-2-maciej.falkowski@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-05-02 07:58:56 +02:00
..
ivpu_coredump.c accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
ivpu_coredump.h accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
ivpu_debugfs.c accel/ivpu: Fix PM related deadlocks in MS IOCTLs 2025-04-20 10:15:35 +02:00
ivpu_debugfs.h accel/ivpu: Compile ivpu_debugfs.c conditionally 2023-09-27 13:11:51 +02:00
ivpu_drv.c accel/ivpu: Fix the NPU's DPU frequency calculation 2025-05-02 07:58:56 +02:00
ivpu_drv.h accel/ivpu: Add auto selection logic for job scheduler 2025-05-02 07:58:56 +02:00
ivpu_fw.c accel/ivpu: Fix the NPU's DPU frequency calculation 2025-05-02 07:58:56 +02:00
ivpu_fw.h accel/ivpu: Add auto selection logic for job scheduler 2025-05-02 07:58:56 +02:00
ivpu_fw_log.c accel/ivpu: Rename VPU to NPU in message strings 2024-02-19 10:52:35 +01:00
ivpu_fw_log.h accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
ivpu_gem.c accel/ivpu: Fix general protection fault in ivpu_bo_list() 2024-12-27 14:02:15 +01:00
ivpu_gem.h accel/ivpu: Add force snoop module parameter 2024-05-15 07:42:26 +02:00
ivpu_hw.c accel/ivpu: Add FW state dump on TDR 2025-02-27 04:30:15 -08:00
ivpu_hw.h accel/ivpu: Fix the NPU's DPU frequency calculation 2025-05-02 07:58:56 +02:00
ivpu_hw_37xx_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_40xx_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_btrs.c accel/ivpu: Fix the NPU's DPU frequency calculation 2025-05-02 07:58:56 +02:00
ivpu_hw_btrs.h accel/ivpu: Fix the NPU's DPU frequency calculation 2025-05-02 07:58:56 +02:00
ivpu_hw_btrs_lnl_reg.h accel/ivpu: Implement DCT handling 2024-06-14 09:13:32 +02:00
ivpu_hw_btrs_mtl_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_ip.c accel/ivpu: Fix NOC firewall interrupt handling 2024-10-30 10:17:00 +01:00
ivpu_hw_ip.h accel/ivpu: Replace wake_thread with kfifo 2024-05-17 08:30:27 +02:00
ivpu_hw_reg_io.h accel/ivpu: Fix verbose version of REG_POLL macros 2023-10-23 08:57:25 +02:00
ivpu_ipc.c accel/ivpu: Fix warning in ivpu_ipc_send_receive_internal() 2025-04-20 10:15:42 +02:00
ivpu_ipc.h accel/ivpu: Add FW state dump on TDR 2025-02-27 04:30:15 -08:00
ivpu_job.c accel/ivpu: Add auto selection logic for job scheduler 2025-05-02 07:58:56 +02:00
ivpu_job.h accel/ivpu: Abort jobs of faulty context 2024-06-14 09:12:11 +02:00
ivpu_jsm_msg.c accel/ivpu: Add FW state dump on TDR 2025-02-27 04:30:15 -08:00
ivpu_jsm_msg.h accel/ivpu: Add FW state dump on TDR 2025-02-27 04:30:15 -08:00
ivpu_mmu.c accel/ivpu: Abort jobs of faulty context 2024-06-14 09:12:11 +02:00
ivpu_mmu.h accel/ivpu: Dump MMU events in case of VPU boot timeout 2024-01-22 10:27:37 +01:00
ivpu_mmu_context.c accel/ivpu: Make parts of FW image read-only 2024-06-14 09:14:29 +02:00
ivpu_mmu_context.h accel/ivpu: Make parts of FW image read-only 2024-06-14 09:14:29 +02:00
ivpu_ms.c accel/ivpu: Fix deadlock in ivpu_ms_cleanup() 2025-04-20 10:15:42 +02:00
ivpu_ms.h accel/ivpu: Add NPU profiling support 2024-05-15 07:42:23 +02:00
ivpu_pm.c accel/ivpu: Fix error handling in recovery/reset 2025-02-27 04:30:15 -08:00
ivpu_pm.h accel/ivpu: Remove unused ivpu_rpm_get_if_active() 2024-06-14 09:15:28 +02:00
ivpu_sysfs.c accel/ivpu: Add auto selection logic for job scheduler 2025-05-02 07:58:56 +02:00
ivpu_sysfs.h accel/ivpu: Share NPU busy time in sysfs 2024-05-15 07:42:29 +02:00
Kconfig accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
Makefile accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
vpu_boot_api.h accel/ivpu: Update FW BOOT API headers 2024-06-14 09:14:11 +02:00
vpu_jsm_api.h accel/ivpu: Update VPU FW API headers 2024-05-15 07:37:30 +02:00