Linux Media Controller development
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Christian Cortner <ccortner@gmail.com>,
	Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Cc: Abhinav Kumar <abhinav.kumar@linux.dev>,
	Birk Skyum <birk.skyum@pm.me>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [RFC PATCH 2/5] media: iris: Update the CAPTURE stride and size on S_FMT(OUTPUT)
Date: Tue, 27 Oct 2026 23:36:38 +0100	[thread overview]
Message-ID: <9a02ffa7-5ea5-4952-9ef8-45c7fee8f0fe@kernel.org> (raw)
In-Reply-To: <20261027021934.22113-3-ccortner@gmail.com>

On 27/10/2026 03:19, Christian Cortner wrote:
> Setting the OUTPUT format also updates the width and height of the
> CAPTURE format, but bytesperline and sizeimage keep their old values,
> those of the 320x240 default on a new instance. For a 640x360 stream,
> VIDIOC_G_FMT(CAPTURE) then reports 640x384 NV12 with a sizeimage of
> 147456 bytes. VIDIOC_REQBUFS(CAPTURE) allocates buffers of that size,
> and iris_vb2_buf_prepare() rejects every one of them with -EINVAL,
> because it checks them against the size computed from the new width
> and height.

Again the commit log is a word salad. A much clearer problem statement 
should be possible.
"When updating the OUTPUT format we fail to update some variables which 
we should be updating i.e. bytesperline and sizeimage."

Simple and clear, like myself ;)

> Move the per-format rules S_FMT(CAPTURE) uses into a helper and call it
> for both queues, so that S_FMT(OUTPUT) leaves the CAPTURE format exactly
> as S_FMT(CAPTURE) would set it for the same size.
> 
> Fixes: 8aadfd445373 ("media: iris: Update CAPTURE format info based on OUTPUT format")
> Cc:stable@vger.kernel.org
> Assisted-by: LLM sparse smatch

On the substance here I like it.

- Functional decomposition
- Reuse

So... I'd be inclined to take this. It fixes a real bug.

---
bod

  reply	other threads:[~2026-10-27 22:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <NKVWOXEaC2RjmCRG3wt6Y-1_CZxSqp_rpkiLIJV8xQg9k4sZGi5C2lZ4oIQ0qsI-Fk-wDDfmYsiCOiqKaDFnzQ==@protonmail.internalid>
2026-10-26 16:09 ` [BUG] media: iris: resolution change handling stops ffmpeg's h264_v4l2m2m decoder on glymur Christian Cortner
2026-10-26 17:50   ` Birk Skyum
2026-10-26 21:13     ` Birk Skyum
2026-10-26 22:31   ` Bryan O'Donoghue
2026-10-27  2:19     ` Christian Cortner
2026-10-27  2:19       ` [RFC PATCH 0/5] media: iris: ffmpeg decoder flow changes, for reference only Christian Cortner
2026-10-27  2:19         ` [RFC PATCH 1/5] media: iris: Don't flag an empty source change LAST buffer as an error Christian Cortner
2026-10-27 22:26           ` Bryan O'Donoghue
2026-10-27  2:19         ` [RFC PATCH 2/5] media: iris: Update the CAPTURE stride and size on S_FMT(OUTPUT) Christian Cortner
2026-10-27 22:36           ` Bryan O'Donoghue [this message]
2026-10-27  2:19         ` [RFC PATCH 3/5] media: iris: Signal V4L2_EVENT_EOS only at the end of a drain Christian Cortner
2026-10-27 22:44           ` Bryan O'Donoghue
2026-10-27  2:19         ` [RFC PATCH 4/5] media: iris: Let a resolution change drain before stopping CAPTURE Christian Cortner
2026-10-27 22:59           ` Bryan O'Donoghue
2026-10-27  2:19         ` [RFC PATCH 5/5] media: iris: Resume the first source change if it fits the CAPTURE setup Christian Cortner
2026-10-27 23:04           ` Bryan O'Donoghue
2026-10-27 12:43       ` [BUG] media: iris: resolution change handling stops ffmpeg's h264_v4l2m2m decoder on glymur Birk Skyum
2026-10-27 18:14         ` Christian Cortner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a02ffa7-5ea5-4952-9ef8-45c7fee8f0fe@kernel.org \
    --to=bod@kernel.org \
    --cc=abhinav.kumar@linux.dev \
    --cc=birk.skyum@pm.me \
    --cc=ccortner@gmail.com \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=vikash.garodia@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox