From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D61C606A325 for ; Fri, 20 Nov 2026 15:12:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bTOrQtPM Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 86AD510E26E; Fri, 20 Nov 2026 15:12:34 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B4B610E919 for ; Fri, 20 Nov 2026 15:12:28 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id CD3E562121 for ; Fri, 20 Nov 2026 15:12:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 488991F000F2; Fri, 20 Nov 2026 15:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795187547; bh=lB9sHCbZhtEaFY5JpZM1BJGJc1QLHlVkJIZlCA+XOUU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=bTOrQtPMGEEeYbjj70XXP71lO5USOJqlFUcDrjYAYwvIDehIyNLNEzVy+a8GQX1fb +HvacKmldrXX+41nXu61wr+w59IQVj2cNW8uTS+LuBB4ICc2DyT9WTecdQcHnaceAz EPSuDkRMD0NuW2f8l7ZzvKdSnsRgCQoruOVk/86tHqJ20y6lbOCLJFIJn7MlN2Y1NF Ed43o8YTb4zybeDvE4rPo3RLrHH5H8CA9hl6QUqkyeGnPNW6m35z51cT6DrRnjqGX6 2c7AzXRtnAMCiz8w5igOgvPtn8gMfUccsQ+h85RGrJd+74kCzEDJf50N3CGqGKvjXR N8cN0tpWR57RA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 18/19] accel: ethosu: Support IFM upscaling To: =?utf-8?b?Um9iIEhlcnJpbmcgKEFybSk=?= Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261120-ethosu-fixes-v5-18-52d459acdb84@kernel.org> References: <20261120-ethosu-fixes-v5-0-52d459acdb84@kernel.org> <20261120-ethosu-fixes-v5-18-52d459acdb84@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 20 Nov 2026 15:12:26 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] accel: ethosu: missing NPU_SET_IFM_UPSCALE check in feat_matrix_validate() -- commit a2e33d72a9a5c1a79fd1f24546e3bdc167a7ece4 Author: Rob Herring (Arm) accel: ethosu: Support IFM upscaling This commit tracks NPU_SET_IFM_UPSCALE during command stream validation, adjusts IFM bounds for 2x resampling modes, and rejects incompatible stride, chained storage, resize, and pooling configurations. > diff --git a/drivers/accel/ethosu/ethosu_gem.c b/drivers/accel/ethosu/eth= osu_gem.c > index d2884d9922aea..b4544298742f1 100644 > --- a/drivers/accel/ethosu/ethosu_gem.c > +++ b/drivers/accel/ethosu/ethosu_gem.c [ ... ] > @@ -402,6 +403,11 @@ static int feat_matrix_validate(struct ethosu_device= *edev, > !cmd_state_reg_is_set(st, NPU_SET_IFM_PRECISION) || > !cmd_state_reg_is_set(st, NPU_SET_IFM_DEPTH_M1)) > return -EINVAL; > + if (st->ifm_upscale && > + (!cmd_state_reg_is_set(st, NPU_SET_KERNEL_STRIDE) || > + feat_matrix_chained(edev, fm) || > + (st->ifm.stride_kernel & (BIT(0) | BIT(1) | BIT(6) | BIT(9))))) > + return -EINVAL; > if (feat_matrix_chained(edev, fm)) > return 0; > if (!cmd_state_reg_is_set(st, NPU_SET_IFM_WIDTH0_M1) || [Severity: High] Should feat_matrix_validate() require cmd_state_reg_is_set(st, NPU_SET_IFM_UPSCALE) for FEAT_MATRIX_IFM? The NPU is not reset between consecutive jobs, so NPU_SET_IFM_UPSCALE persists in hardware from a previous job while cmd_state_init() zero-initializes st->ifm_upscale to NPU_IFM_UPSCALE_NONE. If a second job omits NPU_SET_IFM_UPSCALE, it runs with IFM upscaling enabled in hardware while validation checks st->ifm_upscale =3D=3D NPU_IFM_UPSCALE_NONE, bypass= ing the chained-IFM and kernel-stride checks here as well as the upscaling restrictions in calc_sizes_resize() and NPU_OP_POOL. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261120-ethosu-fix= es-v5-0-52d459acdb84@kernel.org?part=3D18