From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796075605; b=smfPhFLOm7ps5i1wUcnbgvNr+0a8FFLNUv3u6KRmgvEcRUmZePyizvz/PPpEgi0+rcoW YUfNd6AZM6P3MuG9dAN6I7shezUNhY9w0nUDfKvstvSdYcNrxRda4mbVfSxoxCKUYCeQn +jwdrvn0wHq2teuTWJ2Y1y0VGtWtigFn2uyIokzsnFmOsU2ZmggDebFsulGvW3e50ho9f obQHqOym6S3LFQPfsb8PPQL8bj3hWf9+LXlrVNEaPSJco9MDSI0kse03RZeQ9eeneaSd8 XGDyu+XjEIfq0zqnqH/IX60YwR6qqVsvD5zn0lfoMN25mtTxB8k0PM8a8hMVGKJk29w== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796075605; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking: X-Change-ID:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Endpoint-Received:X-Original-From:Reply-To; bh=mubsse5vbp2qV/7bzDshu/H7FcLnj/8VIe0nOYfRQhE=; b=dPi+krfUZQSE+eIJpVePejLeuUBmtRwIiGyeFsqh016UCPp4HC08ri9uI8x0DdcTxRFl Fulc8ghMjQQoBCKP0uNYKi4h60F2e3JATXFHOF4SjqoGz6W3U/fY0o5fg+6enSv7T+3xL IyU15vwFAHAR/eg7DKU37JOcUn0PfLBuHYwhmA8sS7ZL8eJA3NxHtdM4XdtciTwsX0B07 xHOz8pBsEAnm3TSgR3GEioFVSb24uW7D+z1+vqUltMrgT4tP/DeWHN3siCypCSFpKEUpv 2j6u/ATL9sVX7cdJa4/PNC3wRiQ43A/rEz9PYZvEsx4B/GKDgYFfTyrRloewFQelufA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Wlm2oDeU; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72CF9606A329; Mon, 30 Nov 2026 21:53:25 +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=Wlm2oDeU Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796075605; b=sFRM7e2ME3pbeIML+PtmNCaM/ADgVUFtcp2gDn6nrqGbp9vPnlhtl6uO45qTQWy0Qjzy bK/FvwUDHpTwz3GLJ2zqj7FnOHbxRfqWrPPR75X15LHUlhzhUcPISwza2oMiir5mlQ0hq OJVyvXlCdityFT4iT4SmXKCIblZaOcv7fuibXcbTEN+gKI56O6J9Bw3RyRdBzzR7z1+dC iBIoUi33wJZGxkIDdkkppMTvl+djI7ABzzMo6ISHqFkab8t+ZAkyDfaIXaqQGUOEFyGmy vO0r2dbZrdQNbSH26tCooK/mEi2L6//dd8iVZ9IDwvRMmXlPshVSYixm33EmDGm4M9w== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796075605; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=mubsse5vbp2qV/7bzDshu/H7FcLnj/8VIe0nOYfRQhE=; b=gpppjDilWNtBzFzfo9EMjPBUFjr/ZTdPXF76jLt9L7QrpvjpwtpDYuWZvvU+xdHQx3+v unAxNCDL/JvaQ7+RNwHx6kSGjmp2+b87kFMR0c1GbZnRRyTrkWeC0349+6gqDEs2w6yIC tz+lHbmSbISnJKnkK99fO6bViwO07gOzjPMVfBcdMblzWbmPK+uCTKd1f+aeqpfr2/MhN 15ubfUPJheZJrI+2W3VHcQQTpVMxTdn4yGCtvltrEQoAd6a65/3WnJII0/WW7YLhnYJjp RGHavQDIj7t7nrxIgwY1z65Yfj5dxIZfMavPT6Qu329ylmIGv1B/uH6Tda7sleSmThg== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (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.kernel.org (Postfix) with ESMTPS id 1A0221F0089A; Mon, 30 Nov 2026 21:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796075605; bh=mubsse5vbp2qV/7bzDshu/H7FcLnj/8VIe0nOYfRQhE=; h=From:Subject:Date:To:Cc:Reply-To; b=Wlm2oDeUgp7LqzrAyUPyp1JY8ypfrTS2m4b0f4h3/8zWNyh6rJgywMn/mzuPc2RyI smSLGBw6TwsbobnpLIEz0pJvvB9CtfRX3bcf9fcPuy5e4GJEK/vx+dwiPBbkVvTyrb 14kiw15eOgvQxUxVkFF0WTax5mbu4ROdwOlgE0wRcyLjS65oIzse8btIjrNSU3T166 eVYHBgqpGyXtOLYRHF3OpZDoX4hXDirn+yJ+8ppasDiWHIqEfb/d+E6iNbhBvlJk8W G/jFKpEW++1kM5nCtL8w8Dfeq3h3xh9eqVKpfOv39HiJpRpOTFwDthl2SnmfH+HwCr MoDQjVKI9ATKg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 9BE774EA2D; Mon, 30 Nov 2026 21:53:03 +0000 (UTC) From: Arun Iyengar via B4 Relay Subject: [PATCH v3 0/5] media: verisilicon: Keep the CAPTURE format in line with the decoder Date: Mon, 30 Nov 2026 21:53:01 +0000 Message-Id: <20261130-hantro-fixes-v3-0-5324f239c22e@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/12Nyw7CIBBFf6WZtRigz7jyP4wLoNN2jBUDlWia/ rtQY1Jd3jv3nJnBoyP0cMhmcBjIk73FkO8yMIO69ciojRkkl5UQImexnJxlHT3RM6UM8qItZdV oiMjd4XqIxOn8yf6hL2im5EiLgfxk3Wv9F0TafdXFrzoIxpnSum5kVTRc4LEfFV33xo6Q1EFu4 fIPlhHWHZpO81rlWG/hZVnePWb33vcAAAA= X-Change-ID: 20261113-hantro-fixes-aace04d5268b To: Nicolas Dufresne , Benjamin Gaignard , Philipp Zabel , Mauro Carvalho Chehab , Andrzej Pietrasiewicz , Hans Verkuil , Jernej Skrabec , Ezequiel Garcia Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Arun Iyengar X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796075583; l=2122; i=aiyengar1990@gmail.com; s=20261110; h=from:subject:message-id; bh=ZSZqlRrcrWKzhSHLWQqhgG8qM+NB2mvuAkeICBMFquY=; b=dn8KNBMuOljMpVLQ+KjG+OLGgPBZKxvq5XetNDwlw4JcFtWguaB0Dn0Nu4Bqf2PJHhkoPwaWq 4re5ByZkl1mAFIiHIROClY6yLC14VIKRKVZxXPtiswgis7q6Q8ZPCfO X-Developer-Key: i=aiyengar1990@gmail.com; a=ed25519; pk=zXpRgUTrhaFe6jLyPqbBy3ccfkj04w0g2690Wv3mg+0= X-Endpoint-Received: by B4 Relay for aiyengar1990@gmail.com/20261110 with auth_id=1480 X-Original-From: Arun Iyengar Reply-To: aiyengar1990@gmail.com Fixes for cases where the decoder writes past the CAPTURE format or an auxiliary buffer, found by Sashiko on hantro-dec-size-check v1 [1]. Tested with AV1 on an Orange Pi 5 (RK3588S): CAPTURE format checks for patches 2, 4 and 5; 64 10-bit vectors to NV12 bit-exact with libdav1d for patch 3. VP8 and AV1 fluster on v2: no new failures. The overrun in patch 1 was not reproduced. HEVC and VP9 (G2) are untested. Developed with Claude (Anthropic), which wrote the code and the commit messages. I reviewed every change. [1] https://lore.kernel.org/r/20261112-hantro-dec-size-check-v1-1-e5f1180b625f@gmail.com --- Changes in v3: - New 3/5: size reference frames by the stream bit depth (Sashiko on v2 3/4) - 5/5: drop the NULL check, v4l2_ctrl_new() now sets the handler error - Reviewed-by from Benjamin on 1/5 and 2/5 - Rebased on media-committers next - Link to v2: https://patch.msgid.link/20261115-hantro-fixes-v2-0-bfecfb07a3e7@gmail.com Changes in v2: - 3/4: also replace a native format when post-processing; second Fixes tag (Sashiko) - 4/4: check the control returned by v4l2_ctrl_new_custom() (Sashiko) - Shorter commit messages, fewer code comments - Link to v1: https://patch.msgid.link/20261114-hantro-fixes-v1-0-abb78264801e@gmail.com --- Arun Iyengar (5): media: verisilicon: Size the VP8 segment map for the largest frame media: verisilicon: Set need_postproc before resetting the CAPTURE format media: verisilicon: Size reference frames by the stream bit depth media: verisilicon: Keep the CAPTURE format at the stream's bit depth media: verisilicon: Set the bit depth again when its control is rewritten drivers/media/platform/verisilicon/hantro_drv.c | 11 +++++++++-- drivers/media/platform/verisilicon/hantro_v4l2.c | 23 ++++++++++++++++++----- drivers/media/platform/verisilicon/hantro_vp8.c | 4 ++-- 3 files changed, 29 insertions(+), 9 deletions(-) --- base-commit: 95c189b26efb07257888ccf9d873a5c366aafbc6 change-id: 20261113-hantro-fixes-aace04d5268b Best regards, -- Arun Iyengar