accel/ivpu: Remove sched_mode module parameter
Andrzej Kacprowski
maintainerPATCH v2 1/1 accel/ivpu: Remove sched_mode module parameter
OS scheduling supports only a limited subset of NPU functionality and is not intended for production use. However, the sched_mode module parameter exposes it as a regular configuration option, and the driver silently falls back to it when the firmware JSM API is older than 3.24.
Make hardware scheduling the only production mode:
- remove the sched_mode module parameter,
- require BOOT API 3.17 and JSM API 3.24 or newer, and fail probe with a message requesting a firmware update otherwise,
- allow OS scheduling on pre-60XX devices only through the IVPU_TEST_MODE_HWS_DISABLE test_mode bit, for debugging.
The initial 37xx and 40xx firmware added to linux-firmware in March 2025 reports BOOT and JSM APIs 3.27, meeting both minimum requirements.
Extend IVPU_FW_CHECK_API_COMPAT() to accept minimum major and minor versions so both API requirements can be checked explicitly.
---
Change in v2
- Resent the patch from the @linux.intel.com address, the @intel.com account adds a confidentiality notice.
drivers/accel/ivpu/ivpu_drv.c | 4 -- drivers/accel/ivpu/ivpu_drv.h | 4 +- drivers/accel/ivpu/ivpu_fw.c | 84 ++++++++++++++++------------------- 3 files changed, 39 insertions(+), 53 deletions(-)
drivers/accel/ivpu/ivpu_drv.c +0 -4
@@ -55,10 +55,6 @@ u8 ivpu_pll_max_ratio = U8_MAX;module_param_named (pll_max_ratio, ivpu_pll_max_ratio, byte,0644 );MODULE_PARM_DESC (pll_max_ratio,"Maximum PLL ratio used to set NPU frequency" ); -int ivpu_sched_mode =IVPU_SCHED_MODE_AUTO ; -module_param_named (sched_mode, ivpu_sched_mode, int,0444 ); -MODULE_PARM_DESC (sched_mode,"Scheduler mode: -1 - Use default scheduler, 0 - Use OS scheduler (supported on 27XX - 50XX), 1 - Use HW scheduler" ); -bool ivpu_disable_mmu_cont_pages;module_param_named (disable_mmu_cont_pages, ivpu_disable_mmu_cont_pages, bool,0444 );MODULE_PARM_DESC (disable_mmu_cont_pages,"Disable MMU contiguous pages optimization" );
drivers/accel/ivpu/ivpu_drv.h +1 -3
@@ -56,8 +56,6 @@#define IVPU_PLATFORM_HSLE 4#define IVPU_PLATFORM_INVALID 8 -#define IVPU_SCHED_MODE_AUTO -1 -#define IVPU_DBG_REG BIT(0)#define IVPU_DBG_IRQ BIT(1)#define IVPU_DBG_MMU BIT(2)
@@ -224,7 +222,6 @@ struct ivpu_file_priv {extern int ivpu_dbg_mask;extern u8 ivpu_pll_min_ratio;extern u8 ivpu_pll_max_ratio; -extern int ivpu_sched_mode;extern bool ivpu_disable_mmu_cont_pages;extern bool ivpu_force_snoop;
@@ -233,6 +230,7 @@ extern bool ivpu_force_snoop;#define IVPU_TEST_MODE_NULL_SUBMISSION BIT(2)#define IVPU_TEST_MODE_FREQ_CHANGE_ENABLE BIT(3)#define IVPU_TEST_MODE_MIP_DISABLE BIT(6) +#define IVPU_TEST_MODE_HWS_DISABLE BIT(7)#define IVPU_TEST_MODE_DISABLE_TIMEOUTS BIT(8)#define IVPU_TEST_MODE_TURBO_ENABLE BIT(9)#define IVPU_TEST_MODE_TURBO_DISABLE BIT(10)
drivers/accel/ivpu/ivpu_fw.c +38 -46
126 lines not on this page · raw message
Signature · 1 line
2.43.0
Quoted 12 lines · Andrzej Kacprowski
OS scheduling supports only a limited subset of NPU functionality and is not intended for production use. However, the
sched_modemodule parameter exposes it as a regular configuration option, and the driver silently falls back to it when the firmware JSM API is older than 3.24.Make hardware scheduling the only production mode:
- remove thesched_modemodule parameter,
- require BOOT API 3.17 and JSM API 3.24 or newer, and fail probe with a message requesting a firmware update otherwise,
- allow OS scheduling on pre-60XX devices only through theIVPU_TEST_MODE_HWS_DISABLEtest_modebit, for debugging.
Quoted 7 lines
The initial 37xx and 40xx firmware added to linux-firmware in March 2025 reports BOOT and JSM APIs 3.27, meeting both minimum requirements.
Extend
IVPU_FW_CHECK_API_COMPAT()to accept minimum major and minor versions so both API requirements can be checked explicitly.Signed-off-by Andrzej Kacprowski <[email protected]>
Quoted 13 lines · Jeff Hugo
Quoted 12 lines · Andrzej Kacprowski
OS scheduling supports only a limited subset of NPU functionality and is not intended for production use. However, the
sched_modemodule parameter exposes it as a regular configuration option, and the driver silently falls back to it when the firmware JSM API is older than 3.24.Make hardware scheduling the only production mode:
- remove thesched_modemodule parameter,
- require BOOT API 3.17 and JSM API 3.24 or newer, and fail probe with a message requesting a firmware update otherwise,
- allow OS scheduling on pre-60XX devices only through theIVPU_TEST_MODE_HWS_DISABLEtest_modebit, for debugging.
Quoted 8 lines
Quoted 7 lines
The initial 37xx and 40xx firmware added to linux-firmware in March 2025 reports BOOT and JSM APIs 3.27, meeting both minimum requirements.
Extend
IVPU_FW_CHECK_API_COMPAT()to accept minimum major and minor versions so both API requirements can be checked explicitly.Signed-off-by Andrzej Kacprowski <[email protected]>Reviewed-by Jeff Hugo <[email protected]>
Thanks, applied to drm-misc-next.