From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A1D03FC8D8; Sat, 28 Feb 2026 17:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300594; cv=none; b=SOPJQpu7VL09XZ+P3K/yVuZixizvN+3ZDT6AoulGEmeryAPVGx2EbxWjyL6VrmnlRECm0PBEGDu5J4lThr5x408Iuvot9wrMQSU0MAUw+ziBBb9rWp1HNT9Y2JrXEg5B+caEZEHTN9eiRamkvgo83y033NHYvDL+gCh2lG+oxAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300594; c=relaxed/simple; bh=pJq8t6Ws/PvBHxR7cZl+uRcxF+RXoBmnA2nHyPPEK2g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JZ+p/klDI5rWsclrJ75lcKzuUzqKPqdkii/xm+0gzqRskFkPv4rsYBcRWqExxgK/4icb2z3IuKnOvdNtjAIVabokHAmAEKHZ4d7Ho/IIF88noapvmN1WImce2E7HzBPeyPCKmMHzKtb1YySwUHkqq+kn9XP9BozCkGCFnh68P/k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HVsPykAi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HVsPykAi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D4B2C19423; Sat, 28 Feb 2026 17:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300594; bh=pJq8t6Ws/PvBHxR7cZl+uRcxF+RXoBmnA2nHyPPEK2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HVsPykAihacylnuduqv0BWIpD6Yw3a06rT3BgREeuSkxYovoiQCkZbtnHVK5eBCoR cbQTR/7t8ULdpgcSEPREwHbWoELVpy7dOvDg3n6G05gLd0sOIOUNDXy83ADO/RpC4b ZNi5GF9Sbpj6fBb2crmRf+Q5rVpEFIKWBz2jyTerf74dZQhRrKLdvhCo5mywnqKEQF NFBYjS/IlMd4g4toiYaneyFNyyH2mOAaBEeOooXC15LttOEr+0HSr55jZnKFiNl/N9 tcBtAmyyrQqgs1Q4PpmHd7P7QEnEEl8QaUkPRQcQTvEhkyg6avhiONWfHBswY1sq9I BrU7dYRRXCy+g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Val Packett , Dikshita Agarwal , Bryan O'Donoghue , Hans Verkuil , Sasha Levin Subject: [PATCH 6.19 635/844] media: iris: use fallback size when S_FMT is called without width/height Date: Sat, 28 Feb 2026 12:29:08 -0500 Message-ID: <20260228173244.1509663-636-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Val Packett [ Upstream commit 4980721cb97d6c47700ab61a048ac8819cfeec87 ] According to 4.5.1.5 of the M2M stateful decoder UAPI documentation, providing the width and the height to S_FMT is "required only if it cannot be parsed from the stream", otherwise they can be left as 0 and the S_FMT implementation is expected to return a valid placeholder resolution that would let REQBUFS succeed. iris was missing the fallback, so clients like rpi-ffmpeg wouldn't work. Fix by adding an explicit fallback to defaults. Fixes: b530b95de22c ("media: iris: implement s_fmt, g_fmt and try_fmt ioctls") Link: https://github.com/jc-kynesim/rpi-ffmpeg/issues/103 Reviewed-by: Dikshita Agarwal Signed-off-by: Val Packett Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/media/platform/qcom/iris/iris_vdec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c index 69ffe52590d3a..227e4e5a326fd 100644 --- a/drivers/media/platform/qcom/iris/iris_vdec.c +++ b/drivers/media/platform/qcom/iris/iris_vdec.c @@ -231,6 +231,14 @@ int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f) if (vb2_is_busy(q)) return -EBUSY; + /* Width and height are optional, so fall back to a valid placeholder + * resolution until the real one is decoded from the bitstream. + */ + if (f->fmt.pix_mp.width == 0 && f->fmt.pix_mp.height == 0) { + f->fmt.pix_mp.width = DEFAULT_WIDTH; + f->fmt.pix_mp.height = DEFAULT_HEIGHT; + } + iris_vdec_try_fmt(inst, f); switch (f->type) { -- 2.51.0