accel/ivpu: Rework HW IP generation detection and dispatch
Status from this message: Applied to drm-misc-next.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | accel/ivpu: Improve HW IP gen and buttress version checksdrivers/ drivers/ drivers/ +1 more | +67 | 2 replies | |
| 2/3 | accel/ivpu: Convert hw_ip_gen/btrs_gen to enum typesdrivers/ drivers/ | +26 | 3 replies | |
| 3/3 | accel/ivpu: Split HW IP generation dispatch into helpersdrivers/ | +31 | 2 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Karol Wachowski | Andrzej Kacprowski | Jeff Hugo |
|---|---|---|---|
| 1/3 | R-b | R-b | |
| 2/3 | R-b | R-b | R-b |
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/3] accel/ivpu: Rework HW IP generation detection and dispatch
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(-)
Signature · 1 line
2.43.0