dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] accel/ivpu: Rework HW IP generation detection and dispatch
@ 2026-10-01 11:03 Dawid Osuchowski
  2026-10-01 11:03 ` [PATCH 1/3] accel/ivpu: Improve HW IP gen and buttress version checks Dawid Osuchowski
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Dawid Osuchowski @ 2026-10-01 11:03 UTC (permalink / raw)
  To: dri-devel
  Cc: oded.gabbay, jeff.hugo, karol.wachowski, lizhi.hou,
	andrzej.kacprowski, Dawid Osuchowski

This series reworks how the driver determines the HW IP generation and
buttress version, and how it dispatches on them.

Today ivpu_hw_ip_gen() and ivpu_hw_btrs_gen() run a switch over the PCI
device ID on every call, and an unknown ID only triggers a WARN() while
probe continues with an undefined generation. Patch 1 resolves both
values once during device init and fails probe with -EINVAL on an
unrecognized device ID.

With that guarantee in place, patch 2 changes the stored values and their
accessors to the real enum types and drops the default: labels from the
switches that dispatch on them, so -Wswitch flags a generation that is
added later but not handled.

Patch 3 splits the remaining per-generation dispatch in
ivpu_hw_ip_soc_cpu_boot() and pwr_island_delay_set() into helpers that
return directly from each case, removing the locals that were left
uninitialized on the path past the last case.

No functional change is intended beyond failing probe on an unknown PCI
device ID and logging the SOC CPU boot mode even when the boot fails.

Andrzej Kacprowski (1):
  accel/ivpu: Improve HW IP gen and buttress version checks

Dawid Osuchowski (1):
  accel/ivpu: Convert hw_ip_gen/btrs_gen to enum types

Karol Wachowski (1):
  accel/ivpu: Split HW IP generation dispatch into helpers

 drivers/accel/ivpu/ivpu_drv.c   | 69 +++++++++++++++++++-------
 drivers/accel/ivpu/ivpu_drv.h   | 65 +++++++++----------------
 drivers/accel/ivpu/ivpu_hw.h    |  1 -
 drivers/accel/ivpu/ivpu_hw_ip.c | 86 ++++++++++++++++-----------------
 4 files changed, 117 insertions(+), 104 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-10-05  7:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 11:03 [PATCH 0/3] accel/ivpu: Rework HW IP generation detection and dispatch Dawid Osuchowski
2026-10-01 11:03 ` [PATCH 1/3] accel/ivpu: Improve HW IP gen and buttress version checks Dawid Osuchowski
2026-10-01 13:57   ` Wachowski, Karol
2026-10-02 15:19   ` Jeff Hugo
2026-10-01 11:04 ` [PATCH 2/3] accel/ivpu: Convert hw_ip_gen/btrs_gen to enum types Dawid Osuchowski
2026-10-01 13:58   ` Wachowski, Karol
2026-10-01 14:33   ` Andrzej Kacprowski
2026-10-02 15:20   ` Jeff Hugo
2026-10-01 11:04 ` [PATCH 3/3] accel/ivpu: Split HW IP generation dispatch into helpers Dawid Osuchowski
2026-10-01 14:34   ` Andrzej Kacprowski
2026-10-02 15:21   ` Jeff Hugo
2026-10-05  7:08 ` [PATCH 0/3] accel/ivpu: Rework HW IP generation detection and dispatch Wachowski, Karol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox