[PATCH v5 19/19] accel: ethosu: Reject IFM broadcast on U65

From: Rob Herring (Arm)

Date: Fri Nov 20 2026 - 09:59:32 EST


IFM broadcasting is only supported by U85. Recording IFM_BROADCAST on
U65 lets a command stream reduce the dimensions used for IFM bounds
validation, or skip IFM validation entirely with scalar broadcasting.
The hardware does not implement that broadcast configuration.

Reject NPU_SET_IFM_BROADCAST on U65 rather than using an unsupported
register command to determine the memory accessed by an operation.

Fixes: 5a5e9c0228e6 ("accel: Add Arm Ethos-U NPU driver")
Closes: https://sashiko.dev/#/bug/linux-c74c700c-c823-4b8d-8c90-14842935cdf0
Signed-off-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
---
v5:
- New patch.
---
drivers/accel/ethosu/ethosu_gem.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/accel/ethosu/ethosu_gem.c b/drivers/accel/ethosu/ethosu_gem.c
index b4544298742f..928764de2e2c 100644
--- a/drivers/accel/ethosu/ethosu_gem.c
+++ b/drivers/accel/ethosu/ethosu_gem.c
@@ -1255,6 +1255,8 @@ static int ethosu_gem_cmdstream_copy_and_validate(struct drm_device *ddev,
st.ifm_upscale = param;
break;
case NPU_SET_IFM_BROADCAST:
+ if (ethosu_is_u65(edev))
+ return -EINVAL;
st.ifm.broadcast = param;
break;
case NPU_SET_IFM_REGION:

--
2.53.0