Skip to content

accel/ivpu: Rework HW IP generation detection and dispatch

Dawid Osuchowski dri-devel 1 version Applied

Status from this message: Applied to drm-misc-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3accel/ivpu: Improve HW IP gen and buttress version checksdrivers/accel/ivpu/ivpu_drv.c drivers/accel/ivpu/ivpu_drv.h drivers/accel/ivpu/ivpu_hw.h +1 more+67 -622 replies
2/3accel/ivpu: Convert hw_ip_gen/btrs_gen to enum typesdrivers/accel/ivpu/ivpu_drv.h drivers/accel/ivpu/ivpu_hw_ip.c+26 -163 replies
3/3accel/ivpu: Split HW IP generation dispatch into helpersdrivers/accel/ivpu/ivpu_hw_ip.c+31 -332 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKarol WachowskiAndrzej KacprowskiJeff Hugo
1/3R-b R-b
2/3R-b R-b R-b
3/3R-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.

Read the v1 thread

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