| 6eec0f9b | 10-Jul-2026 |
Gourav Kumar <gouravk@qti.qualcomm.com> |
media: iris: disable time-delta-based rate control for VBR
The iris encoder driver was not sending HFI_PROP_TIME_DELTA_BASED_RATE_CONTROL to the firmware during encoder initialization. Without this
media: iris: disable time-delta-based rate control for VBR
The iris encoder driver was not sending HFI_PROP_TIME_DELTA_BASED_RATE_CONTROL to the firmware during encoder initialization. Without this property, the firmware defaults to time-delta-based rate control (enabled), which calculates the output bitrate from actual frame timing rather than following the configured bitrate target. This caused variable bitrate (VBR) encoding to produce ~5x configured bitrate. For example, with video_bitrate=896000 (896 Kbps), the output is ~4.4 Mbps instead of the expected ~896 Kbps. Time-delta-based rate control is designed for variable frame rate (VFR) scenarios where the encoder adapts to actual frame timing. However, when an application explicitly configures a bitrate target, the firmware must follow that target regardless of frame timing. Fix this by adding the TIME_DELTA_BASED_RC capability with a default value of 0 (disabled) and sending HFI_PROP_TIME_DELTA_BASED_RATE_CONTROL = 0 to the firmware during stream-on, allowing the firmware to use the configured bitrate as the target.
Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| a9aba94a | 07-Jul-2026 |
Alexander Koskovich <akoskovich@pm.me> |
media: iris: Add support for Milos (VPU v2.0)
Add support for the Milos Iris codec. This only supports the variant found on the SM7635-AB that has half of it's pipes disabled via efuse.
Signed-off-
media: iris: Add support for Milos (VPU v2.0)
Add support for the Milos Iris codec. This only supports the variant found on the SM7635-AB that has half of it's pipes disabled via efuse.
Signed-off-by: Alexander Koskovich <akoskovich@pm.me> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 412a2e59 | 10-Jun-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: iris: Add Gen2 firmware autodetect and fallback
Some Iris platforms support both Gen1 and Gen2 HFI firmware images. Update the firmware loading logic to handle this generically by preferring
media: iris: Add Gen2 firmware autodetect and fallback
Some Iris platforms support both Gen1 and Gen2 HFI firmware images. Update the firmware loading logic to handle this generically by preferring Gen2 when available, while safely falling back to Gen1 when required.
The firmware loading logic is updated with the following priority: 1. Device Tree (`firmware-name`): If specified, load unconditionally. 2. Gen2 default : If no DT override exists, select the Gen2 firmware descriptor when present and attempt to load the corresponding firmware image. 3. Gen1 Fallback: If loading the Gen2 firmware fails and a Gen1 descriptor is available, retry with the Gen1 firmware image.
When a platform provides both Gen1 and Gen2 firmware descriptors and the firmware is loaded via a DT override, the driver detects the firmware generation at runtime before authentication by inspecting the firmware data. The firmware is classified as Gen2 if the QC_IMAGE_VERSION_STRING starts with "vfw" or matches the "video-firmware.N.M" format with N >= 2.
If a Gen1 firmware image is detected in this case, the driver switches to the Gen1 firmware descriptor and associated platform data so that the correct HFI implementation is used.
This change makes firmware generation detection platform‑agnostic, preserves DT overrides, prefers newer Gen2 firmware when available, and maintains compatibility with platforms that only support Gen1.
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Co-developed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| b9c2215b | 30-Jun-2026 |
Hungyu Lin <dennylin0707@gmail.com> |
media: qcom: iris: use disable_irq() during power-off
The IRQ is registered as a threaded IRQ.
Using disable_irq_nosync() in iris_vpu_power_off() does not wait for an already queued threaded IRQ ha
media: qcom: iris: use disable_irq() during power-off
The IRQ is registered as a threaded IRQ.
Using disable_irq_nosync() in iris_vpu_power_off() does not wait for an already queued threaded IRQ handler to complete before returning.
As a result, a threaded IRQ handler may still run after the VPU has been powered down and access hardware registers after power-off.
Replace disable_irq_nosync() with disable_irq() so the power-off path waits for any in-flight threaded IRQ handler to complete before returning.
Fixes: bb8a95aa038e ("media: iris: implement power management") Cc: stable@vger.kernel.org Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| f5daac6e | 08-Jun-2026 |
Hungyu Lin <dennylin0707@gmail.com> |
media: qcom: iris: initialize OPP pointer at declaration
Initialize the managed OPP pointer at declaration rather than assigning it in a separate statement.
This avoids a checkpatch warning about a
media: qcom: iris: initialize OPP pointer at declaration
Initialize the managed OPP pointer at declaration rather than assigning it in a separate statement.
This avoids a checkpatch warning about a potentially uninitialized managed pointer.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 75d79879 | 04-Jun-2026 |
Hungyu Lin <dennylin0707@gmail.com> |
media: qcom: iris: handle runtime PM resume failure in core deinit
Check the return value of pm_runtime_resume_and_get() in iris_core_deinit().
If runtime PM resume fails, skip hardware power-off o
media: qcom: iris: handle runtime PM resume failure in core deinit
Check the return value of pm_runtime_resume_and_get() in iris_core_deinit().
If runtime PM resume fails, skip hardware power-off operations but still perform software teardown and state transition. Also skip the corresponding pm_runtime_put_sync() call to avoid unbalanced runtime PM references.
Fixes: bb8a95aa038e ("media: iris: implement power management") Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 94ef7509 | 02-Jun-2026 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
media: iris: Enumerate cap->bus_info to differentiate between encoder and decoder
commit 66c744e28b69 ("media: venus: assign unique bus_info strings for encoder and decoder") introduced the naming c
media: iris: Enumerate cap->bus_info to differentiate between encoder and decoder
commit 66c744e28b69 ("media: venus: assign unique bus_info strings for encoder and decoder") introduced the naming convention plat:node-addr:video-codec{enc|dec}. Right now Iris does not replicate this naming convention.
When we do v4l2-ctrl --list -devices we see: Iris Decoder (platform:aa00000.video-codec): /dev/video0 /dev/video1
Enumerate the bus_info field of the capabilities structure for namespace parity and appropriate differentiation: Iris Decoder (plat:aa00000.video-codec:dec): /dev/video0
Iris Encoder (plat:aa00000.video-codec:enc): /dev/video1
Fixes: 5ad964ad5656 ("media: iris: Initialize and deinitialize encoder instance structure") Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| d2f0ebbc | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: Make iris_destroy_internal_buffer() return void
iris_destroy_internal_buffer() is guaranteed to succeed and never reports an error. Returning an int is misleading and forces calle
media: qcom: iris: Make iris_destroy_internal_buffer() return void
iris_destroy_internal_buffer() is guaranteed to succeed and never reports an error. Returning an int is misleading and forces callers to handle a meaningless status value. Convert it to return void to match its behavior and simplify callers.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 75126861 | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: Add missing break in iris_hfi_gen2_session_set_codec()
Without the break the AV1 case falls through, risking unintended behaviour if new cases are added after it.
Reviewed-by: Br
media: qcom: iris: Add missing break in iris_hfi_gen2_session_set_codec()
Without the break the AV1 case falls through, risking unintended behaviour if new cases are added after it.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 727a87c7 | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: Remove duplicate HFI_PROP_OPB_ENABLE entry
HFI_PROP_OPB_ENABLE/iris_hfi_gen2_set_opb_enable appeared twice in the dispatch table, causing the property to be sent to firmware twice
media: qcom: iris: Remove duplicate HFI_PROP_OPB_ENABLE entry
HFI_PROP_OPB_ENABLE/iris_hfi_gen2_set_opb_enable appeared twice in the dispatch table, causing the property to be sent to firmware twice on every config-params call.
Fixes: 2af481a459a4 ("media: iris: Define AV1-specific platform capabilities and properties") Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| f6afe7ff | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: Remove dead assignment in iris_hfi_gen2_set_tier()
Fold the ternary initialiser directly into the variable declaration, removing the dead store that was immediately overwritten.
media: qcom: iris: Remove dead assignment in iris_hfi_gen2_set_tier()
Fold the ternary initialiser directly into the variable declaration, removing the dead store that was immediately overwritten.
Reviewed-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 0ac05c4d | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: Fix bitmask test in iris_allow_cmd()
iris_allow_cmd() incorrectly checks a sub‑state flag using a logical equality comparison. Since sub_state is a bitmask, this allows STOP to pa
media: qcom: iris: Fix bitmask test in iris_allow_cmd()
iris_allow_cmd() incorrectly checks a sub‑state flag using a logical equality comparison. Since sub_state is a bitmask, this allows STOP to pass when IRIS_INST_SUB_DRAIN is set alongside other bits, violating the intended drain semantics. Fix this by using a proper bitmask test.
Fixes: d09100763bed ("media: iris: add support for drain sequence") Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| e1fb54b4 | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: Centralize internal buffer table selection
Internal buffer table dispatch is duplicated across multiple Iris code paths, which is error‑prone and makes future changes harder to re
media: qcom: iris: Centralize internal buffer table selection
Internal buffer table dispatch is duplicated across multiple Iris code paths, which is error‑prone and makes future changes harder to reason about.
Consolidate the buffer dispatch logic into a single helper so that table selection is defined in exactly one place and keep call sites minimal. No functional change intended.
Reviewed-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 5eebacbc | 23-Jul-2026 |
Wangao Wang <wangao.wang@oss.qualcomm.com> |
media: qcom: iris: fix missing hfi_id in gen1 GOP_SIZE cap
Add hfi_id to gen1 encoder GOP_SIZE cap and replace the set function, remove the redundant INTRA_PERIOD cap.
Fixes: d22037f3fd33 ("media:
media: qcom: iris: fix missing hfi_id in gen1 GOP_SIZE cap
Add hfi_id to gen1 encoder GOP_SIZE cap and replace the set function, remove the redundant INTRA_PERIOD cap.
Fixes: d22037f3fd33 ("media: iris: Set platform capabilities to firmware for encoder video device")
Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| f87d7eda | 08-Jun-2026 |
Hungyu Lin <dennylin0707@gmail.com> |
media: qcom: iris: fix runtime PM reference leaks
Use pm_runtime_resume_and_get() in iris_enable_power_domains() to avoid leaking a runtime PM usage count on failure.
Also ensure pm_runtime_put_syn
media: qcom: iris: fix runtime PM reference leaks
Use pm_runtime_resume_and_get() in iris_enable_power_domains() to avoid leaking a runtime PM usage count on failure.
Also ensure pm_runtime_put_sync() is always called in iris_disable_power_domains(), even when iris_opp_set_rate() fails, so runtime PM references remain balanced.
Fixes: bb8a95aa038e ("media: iris: implement power management") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 460d3257 | 31-May-2026 |
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> |
media: qcom: iris: fix state-change debug log printing stale value
The state‑change debug log in iris_inst_change_state() always prints the same value for the old and new state, rendering it useless
media: qcom: iris: fix state-change debug log printing stale value
The state‑change debug log in iris_inst_change_state() always prints the same value for the old and new state, rendering it useless for debugging. This happens because the state is updated before the log is emitted.
Log the transition before updating the state so the previous value is preserved, consistent with the existing sub‑state handling.
Fixes: 11712ce70f8e ("media: iris: implement vb2 streaming ops") Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Cc: stable@vger.kernel.org Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 65c06d2e | 02-Jun-2026 |
Neil Armstrong <neil.armstrong@linaro.org> |
media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
Add the necessary bits into the gen2 platforms tables and handlers to allow decoding streams into 10bit pixel formats.
Reviewed-by: Dm
media: qcom: iris: vdec: allow GEN2 decoding into 10bit format
Add the necessary bits into the gen2 platforms tables and handlers to allow decoding streams into 10bit pixel formats.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|
| 20c3ef4c | 02-Jun-2026 |
Neil Armstrong <neil.armstrong@linaro.org> |
media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
The 10bit pixel format can be only used when the decoder identifies the stream as decoding into 10bit pixel format buffer
media: qcom: iris: vdec: update find_format to handle 8bit and 10bit formats
The 10bit pixel format can be only used when the decoder identifies the stream as decoding into 10bit pixel format buffers, so update the find_format helper to filter the formats and only allow the proper formats when setting or trying a capture format.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
show more ...
|