<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/media/platform/qcom/iris, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:21:19+00:00</updated>
<entry>
<title>media: iris: Prevent output buffer queuing before stream-on completes</title>
<updated>2026-03-04T12:21:19+00:00</updated>
<author>
<name>Vishnu Reddy</name>
<email>busanna.reddy@oss.qualcomm.com</email>
</author>
<published>2025-12-29T06:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e68024984869e854a0972c3f48472a67be8d742'/>
<id>urn:sha1:2e68024984869e854a0972c3f48472a67be8d742</id>
<content type='text'>
[ Upstream commit 2c73cfd0cfc44ffe331ccb81f6ac45fc399d9ddb ]

During normal playback, stream-on for input is followed by output, and
only after input stream-on does actual streaming begin. However, when
gst-play performs a seek, both input and output streams are stopped,
and on restart, output stream-on occurs first. At this point, firmware
has not yet started streaming. Queuing output buffers before the firmware
begins streaming causes it to process buffers in an invalid state, leading
to an error response. These buffers are returned to the driver as errors,
forcing the driver into an error state and stopping playback.

Fix this by deferring output buffer queuing until stream-on completes.
Input buffers can still be queued before stream-on as required.

Fixes: 92e007ca5ab6 ("media: iris: Add V4L2 streaming support for encoder video device")
Signed-off-by: Vishnu Reddy &lt;busanna.reddy@oss.qualcomm.com&gt;
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: gen2: Add sanity check for session stop</title>
<updated>2026-03-04T12:21:19+00:00</updated>
<author>
<name>Dikshita Agarwal</name>
<email>dikshita.agarwal@oss.qualcomm.com</email>
</author>
<published>2025-12-29T06:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75992ba43072674fd4767df62a1fe2048565cc60'/>
<id>urn:sha1:75992ba43072674fd4767df62a1fe2048565cc60</id>
<content type='text'>
[ Upstream commit 9aa8d63d09cfc44d879427cc5ba308012ca4ab8e ]

In iris_kill_session, inst-&gt;state is set to IRIS_INST_ERROR and
session_close is executed, which will kfree(inst_hfi_gen2-&gt;packet).
If stop_streaming is called afterward, it will cause a crash.

Add a NULL check for inst_hfi_gen2-&gt;packet before sendling STOP packet
to firmware to fix that.

Fixes: 11712ce70f8e ("media: iris: implement vb2 streaming ops")
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: gen1: Destroy internal buffers after FW releases</title>
<updated>2026-03-04T12:21:19+00:00</updated>
<author>
<name>Dikshita Agarwal</name>
<email>dikshita.agarwal@oss.qualcomm.com</email>
</author>
<published>2025-12-29T06:31:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4457f23ac0130240053a34be663f0fade3bb371'/>
<id>urn:sha1:d4457f23ac0130240053a34be663f0fade3bb371</id>
<content type='text'>
[ Upstream commit 1dabf00ee206eceb0f08a1fe5d1ce635f9064338 ]

After the firmware releases internal buffers, the driver was not
destroying them. This left stale allocations that were no longer used,
especially across resolution changes where new buffers are allocated per
the updated requirements. As a result, memory was wasted until session
close.

Destroy internal buffers once the release response is received from the
firmware.

Fixes: 73702f45db81 ("media: iris: allocate, initialize and queue internal buffers")
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: Skip resolution set on first IPSC</title>
<updated>2026-03-04T12:21:19+00:00</updated>
<author>
<name>Dikshita Agarwal</name>
<email>dikshita.agarwal@oss.qualcomm.com</email>
</author>
<published>2025-12-29T06:31:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ccc1e1c06ee1671bec4e365cc6a86f305266538'/>
<id>urn:sha1:7ccc1e1c06ee1671bec4e365cc6a86f305266538</id>
<content type='text'>
[ Upstream commit 811dbc546f47559dc9d2098c612acfd47e32479e ]

The resolution property is not supposed to be set during reconfig.
Existing iris_drc_pending(inst) check is insufficient, as it doesn't
cover the first port setting change.

Extend the conditional check to also skip resolution setting when
the instance is in IRIS_INST_SUB_FIRST_IPSC.

Fixes: caf205548769 ("media: iris: Avoid updating frame size to firmware during reconfig")
Reviewed-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: Add buffer to list only after successful allocation</title>
<updated>2026-03-04T12:21:18+00:00</updated>
<author>
<name>Dikshita Agarwal</name>
<email>dikshita.agarwal@oss.qualcomm.com</email>
</author>
<published>2025-12-29T06:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98b4c4c90f1e11caecbe2093dbe3a901d338bc81'/>
<id>urn:sha1:98b4c4c90f1e11caecbe2093dbe3a901d338bc81</id>
<content type='text'>
[ Upstream commit 2d0bbd982dfdd67da488a772f7a8a1bdca7642bf ]

Move `list_add_tail()` to after `dma_alloc_attrs()` succeeds when creating
internal buffers. Previously, the buffer was enqueued in `buffers-&gt;list`
before the DMA allocation. If the allocation failed, the function returned
`-ENOMEM` while leaving a partially initialized buffer in the list, which
could lead to inconsistent state and potential leaks.

By adding the buffer to the list only after `dma_alloc_attrs()` succeeds,
we ensure the list contains only valid, fully initialized buffers.

Fixes: 73702f45db81 ("media: iris: allocate, initialize and queue internal buffers")
Reviewed-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: Add missing platform data entries for SM8750</title>
<updated>2026-03-04T12:21:18+00:00</updated>
<author>
<name>Dikshita Agarwal</name>
<email>dikshita.agarwal@oss.qualcomm.com</email>
</author>
<published>2025-12-18T06:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7b2105a1cad1737eb877cdb4865618927623dd4'/>
<id>urn:sha1:c7b2105a1cad1737eb877cdb4865618927623dd4</id>
<content type='text'>
[ Upstream commit bbef55f414100853d5bcea56a41f8b171bac8fcb ]

Two platform-data fields for SM8750 were missed:

  - get_vpu_buffer_size = iris_vpu33_buf_size
    Without this, the driver fails to allocate the required internal
    buffers, leading to basic decode/encode failures during session
    bring-up.

  - max_core_mbps = ((7680 * 4320) / 256) * 60
    Without this capability exposed, capability checks are incomplete and
    v4l2-compliance for encoder fails.

Fixes: a5925a2ce077 ("media: iris: add VPU33 specific encoding buffer calculation")
Fixes: a6882431a138 ("media: iris: Add support for ENUM_FRAMESIZES/FRAMEINTERVALS for encoder")
Cc: stable@vger.kernel.org
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@oss.qualcomm.com&gt;
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: remove v4l2_m2m_ioctl_{de,en}coder_cmd API usage during STOP handling</title>
<updated>2026-03-04T12:21:18+00:00</updated>
<author>
<name>Dikshita Agarwal</name>
<email>dikshita.agarwal@oss.qualcomm.com</email>
</author>
<published>2025-11-02T03:40:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6775afca34deabc4b234c7d46ee707367ef8837e'/>
<id>urn:sha1:6775afca34deabc4b234c7d46ee707367ef8837e</id>
<content type='text'>
[ Upstream commit 8fc707d13df517222db12b465af4aa9df05c99e1 ]

Currently v4l2_m2m_ioctl_{de,enc}coder_cmd is being invoked during STOP
command handling. However, this is not required as the iris driver has
its own drain and stop handling mechanism in place.

Using the m2m command API in this context leads to incorrect behavior,
where the LAST flag is prematurely attached to a capture buffer,
when there are no buffers in m2m source queue. But, in this scenario
even though the source buffers are returned to client, hardware might
still need to process the pending capture buffers.

Attaching LAST flag prematurely can result in the capture buffer being
removed from the destination queue before the hardware has finished
processing it, causing issues when the buffer is eventually returned by
the hardware.

To prevent this, remove the m2m API usage in stop handling.

Fixes: d09100763bed ("media: iris: add support for drain sequence")
Fixes: 75db90ae067d ("media: iris: Add support for drain sequence in encoder video device")
Signed-off-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: use fallback size when S_FMT is called without width/height</title>
<updated>2026-03-04T12:21:18+00:00</updated>
<author>
<name>Val Packett</name>
<email>val@packett.cool</email>
</author>
<published>2025-12-25T23:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1cd0628c37b7b39ebd05aa708a6e37ca00539cc4'/>
<id>urn:sha1:1cd0628c37b7b39ebd05aa708a6e37ca00539cc4</id>
<content type='text'>
[ 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 &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Signed-off-by: Val Packett &lt;val@packett.cool&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: Fix fps calculation</title>
<updated>2026-03-04T12:21:18+00:00</updated>
<author>
<name>Ricardo Ribalda</name>
<email>ribalda@chromium.org</email>
</author>
<published>2025-12-23T10:02:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb37b803fb6568ba5c745dfd38bec50b4989d5ca'/>
<id>urn:sha1:cb37b803fb6568ba5c745dfd38bec50b4989d5ca</id>
<content type='text'>
[ Upstream commit 71fe80364a6584f404556ac9a6a4aca4ab80fb5b ]

iris_venc_s_param() uses do_div to divide two 64 bits operators, this is
wrong. Luckily for us, both of the operators fit in 32 bits, so we can use
a normal division.

Now that we are at it, mark the fps smaller than 1 as invalid, the code
does not seem to handle them properly.

The following cocci warning is fixed with this patch:
./platform/qcom/iris/iris_venc.c:378:1-7: WARNING: do_div() does a 64-by-32 division, please consider using div64_u64 instead

Fixes: 4ff586ff28e3 ("media: iris: Add support for G/S_PARM for encoder video device")
Reviewed-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ricardo Ribalda &lt;ribalda@chromium.org&gt;
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>media: iris: Fix ffmpeg corrupted frame error</title>
<updated>2026-03-04T12:21:18+00:00</updated>
<author>
<name>Vishnu Reddy</name>
<email>quic_bvisredd@quicinc.com</email>
</author>
<published>2025-10-06T09:18:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c8f6ccef8c0a839b5ba1f95c4e15dc935e077882'/>
<id>urn:sha1:c8f6ccef8c0a839b5ba1f95c4e15dc935e077882</id>
<content type='text'>
[ Upstream commit 89f7cf35901138d9828d981ce64c131a3da6e867 ]

When the ffmpeg decoder is running, the driver receives the
V4L2_BUF_FLAG_KEYFRAME flag in the input buffer. The driver then forwards
this flag information to the firmware. The firmware, in turn, copies the
input buffer flags directly into the output buffer flags. Upon receiving
the output buffer from the firmware, the driver observes that the buffer
contains the HFI_BUFFERFLAG_DATACORRUPT flag. The root cause is that both
V4L2_BUF_FLAG_KEYFRAME and HFI_BUFFERFLAG_DATACORRUPT are the same value.
As a result, the driver incorrectly interprets the output frame as
corrupted, even though the frame is actually valid. This misinterpretation
causes the driver to report an error and skip good frames, leading to
missing frames in the final video output and triggering ffmpeg's "corrupt
decoded frame" error.

To resolve this issue, the input buffer flags should not be sent to the
firmware during decoding, since the firmware does not require this
information.

Fixes: 17f2a485ca67 ("media: iris: implement vb2 ops for buf_queue and firmware response")
Cc: stable@vger.kernel.org
Signed-off-by: Vishnu Reddy &lt;quic_bvisredd@quicinc.com&gt;
Reviewed-by: Dikshita Agarwal &lt;dikshita.agarwal@oss.qualcomm.com&gt;
Reviewed-by: Bryan O'Donoghue &lt;bryan.odonoghue@linaro.org&gt;
Reviewed-by: Vikash Garodia &lt;vikash.garodia@oss.qualcomm.com&gt;
Signed-off-by: Bryan O'Donoghue &lt;bod@kernel.org&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil+cisco@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
