dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] accel/ivpu: Disallow setting sched mode OS starting from NPU6
@ 2025-10-29 20:15 Karol Wachowski
  2025-10-29 20:17 ` Jeff Hugo
  0 siblings, 1 reply; 3+ messages in thread
From: Karol Wachowski @ 2025-10-29 20:15 UTC (permalink / raw)
  To: dri-devel
  Cc: oded.gabbay, jeff.hugo, maciej.falkowski, lizhi.hou,
	Karol Wachowski

OS scheduling mode gets deprecated starting from NPU6 onward.
Print warning and fallback to HW scheduling mode if OS mode is
explicitly selected with sched_mode parameter.

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
---
Changes in v2:
 - Fix subject description typo mentiniong that HW mode is deprecated
   instead of OS mode
---
 drivers/accel/ivpu/ivpu_drv.c | 2 +-
 drivers/accel/ivpu/ivpu_fw.c  | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/accel/ivpu/ivpu_drv.c b/drivers/accel/ivpu/ivpu_drv.c
index c6fe7a408912..20618c552c77 100644
--- a/drivers/accel/ivpu/ivpu_drv.c
+++ b/drivers/accel/ivpu/ivpu_drv.c
@@ -57,7 +57,7 @@ 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, 1 - Use HW scheduler");
+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);
diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c
index aa032b39dbe3..48386d2cddbb 100644
--- a/drivers/accel/ivpu/ivpu_fw.c
+++ b/drivers/accel/ivpu/ivpu_fw.c
@@ -144,6 +144,12 @@ bool ivpu_is_within_range(u64 addr, size_t size, struct ivpu_addr_range *range)
 static u32
 ivpu_fw_sched_mode_select(struct ivpu_device *vdev, const struct vpu_firmware_header *fw_hdr)
 {
+	if (ivpu_hw_ip_gen(vdev) >= IVPU_HW_IP_60XX &&
+	    ivpu_sched_mode == VPU_SCHEDULING_MODE_OS) {
+		ivpu_warn(vdev, "OS sched mode is not supported, using HW mode\n");
+		return VPU_SCHEDULING_MODE_HW;
+	}
+
 	if (ivpu_sched_mode != IVPU_SCHED_MODE_AUTO)
 		return ivpu_sched_mode;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] accel/ivpu: Disallow setting sched mode OS starting from NPU6
  2025-10-29 20:15 [PATCH v2] accel/ivpu: Disallow setting sched mode OS starting from NPU6 Karol Wachowski
@ 2025-10-29 20:17 ` Jeff Hugo
  2025-10-30  8:02   ` Karol Wachowski
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Hugo @ 2025-10-29 20:17 UTC (permalink / raw)
  To: Karol Wachowski, dri-devel; +Cc: oded.gabbay, maciej.falkowski, lizhi.hou

On 10/29/2025 2:15 PM, Karol Wachowski wrote:
> OS scheduling mode gets deprecated starting from NPU6 onward.
> Print warning and fallback to HW scheduling mode if OS mode is
> explicitly selected with sched_mode parameter.
> 
> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>

Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] accel/ivpu: Disallow setting sched mode OS starting from NPU6
  2025-10-29 20:17 ` Jeff Hugo
@ 2025-10-30  8:02   ` Karol Wachowski
  0 siblings, 0 replies; 3+ messages in thread
From: Karol Wachowski @ 2025-10-30  8:02 UTC (permalink / raw)
  To: Jeff Hugo, dri-devel; +Cc: oded.gabbay, maciej.falkowski, lizhi.hou

On 10/29/2025 9:17 PM, Jeff Hugo wrote:
> On 10/29/2025 2:15 PM, Karol Wachowski wrote:
>> OS scheduling mode gets deprecated starting from NPU6 onward.
>> Print warning and fallback to HW scheduling mode if OS mode is
>> explicitly selected with sched_mode parameter.
>>
>> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
>
> Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com> 
Pushed to drm-misc-next.
-Karol

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-30  8:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29 20:15 [PATCH v2] accel/ivpu: Disallow setting sched mode OS starting from NPU6 Karol Wachowski
2025-10-29 20:17 ` Jeff Hugo
2025-10-30  8:02   ` Karol Wachowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).