Skip to content

FROMLIST: media: iris: HFI gen2 features and fixes for VA-API - #1613

Open
mehugaur wants to merge 5 commits into
qualcomm-linux:qcom-6.18.yfrom
mehugaur:qcom-6.18.y
Open

mehugaur wants to merge 5 commits into
qualcomm-linux:qcom-6.18.yfrom
mehugaur:qcom-6.18.y

Conversation

@mehugaur

@mehugaur mehugaur commented Dec 2, 2026

Copy link
Copy Markdown

This series adds features and fixes to Iris HFI gen2 to support
qcom-va-driver [1], a userspace VA-API backend for the V4L2 stateful codec
interface.

It enables decode-order output and larger CAPTURE buffer pools for VA-API
clients, and exposes encoder deblocking controls. It also fixes
error-buffer timestamps and handling of non-display AV1 and VP9 pictures,
which affect both VA-API and direct V4L2 clients.

Synchronous per-picture clients such as VA-API can stall when firmware
holds decoded pictures for display reordering while the client waits for
the current picture before submitting more input.

Expose the decoder display-delay controls on HFI gen2, with a zero delay
selecting decode-order output. Keep display-order output as the default.

Signed-off-by: Xilin Wu <sophon@radxa.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Link: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-1-44a2783f782b@radxa.com
Signed-off-by: Mehul <mehugaur@qti.qualcomm.com>
VLC with VA-API frame threading can require more than the default vb2
limit of 32 CAPTURE buffers.

Raise the HFI gen2 decoder CAPTURE queue limit to 64 buffers.

Signed-off-by: Xilin Wu <sophon@radxa.com>
Link: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-2-44a2783f782b@radxa.com
Signed-off-by: Mehul <mehugaur@qti.qualcomm.com>
HFI gen2 encoders do not expose deblocking filter controls, preventing
applications from configuring the filter mode and offsets.

Add the standard V4L2 H.264 and HEVC loop filter controls.

Signed-off-by: Xilin Wu <sophon@radxa.com>
Link: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-3-44a2783f782b@radxa.com
Signed-off-by: Mehul <mehugaur@qti.qualcomm.com>
Clearing timestamps on error buffers prevents clients such as libva-v4l2
from identifying the failed picture and can cause synchronization timeouts.

Preserve the firmware-provided timestamp when returning an error buffer.

Fixes: b791dcf ("media: iris: Add handling for corrupt and drop frames")
Signed-off-by: Xilin Wu <sophon@radxa.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-4-44a2783f782b@radxa.com
Signed-off-by: Mehul <mehugaur@qti.qualcomm.com>
HFI gen2 reports non-display pictures with HFI_GEN2_PICTURE_NOSHOW, but
Iris returns them as errors. For AV1, hidden and displayed pictures can
share a timestamp, so GStreamer's v4l2av1dec drops the pending frame and
loses the displayed picture.

Recycle successful non-display buffers within the driver instead of
returning them to userspace as errors. This also fixes VP9 streams using
hidden alt-ref frames.

Fixes: ac72ad9 ("media: iris: Add handling for no show frames")
Signed-off-by: Xilin Wu <sophon@radxa.com>
Link: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-5-44a2783f782b@radxa.com
Signed-off-by: Mehul <mehugaur@qti.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No CR Numbers Found

Error: No Change Request numbers were found.

Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests.

@qlijarvis

Copy link
Copy Markdown

PR #1613 — validate-patch

PR: #1613

Verdict Issues Detailed Report
✅ 0 Full report

Final Summary

  1. Lore link present: Yes — all 5 commits have valid lore.kernel.org links in Link: trailers
  2. Lore link matches PR commits: Yes — diff content is identical; only context line numbers differ due to tree state differences (expected for FROMLIST patches applied to a vendor tree)
  3. Upstream patch status: ⏳ In review — posted 2026-10-29 (~5 weeks ago), received Acked-by from Nicolas Dufresne and Reviewed-by from Bryan O'Donoghue; no merge signal yet but positive maintainer feedback indicates likely acceptance
  4. PR present in qcom-next/topics: Yes - all 5 commit(s) are present in qcom-next or topics
Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #1613 - media: iris: HFI gen2 features and fixes for VA-API (5 commits)
Upstream commit: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-0-44a2783f782b@radxa.com
Verdict: ✅ PASS

Commit Message

Check Status Note
Subject matches upstream ✅ All 5 commits: FROMLIST prefix added, core subject preserved
Body preserves rationale ✅ All commit bodies match lore patches verbatim
Fixes tag present/correct N/A No Fixes tags in these patches (new features, not bug fixes)
Authorship preserved ✅ FROMLIST: Xilin Wu in From: and Signed-off-by: present in all commits
Backport note (if applicable) N/A FROMLIST patches, not backports

Diff

File Status Notes
drivers/media/platform/qcom/iris/iris_ctrls.c ✅ Identical code changes, context line numbers differ (154→155, 305→306 vs 309)
drivers/media/platform/qcom/iris/iris_hfi_gen2.c ✅ Identical code changes, context line numbers differ (20→842, 986→1818, etc.)
drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c ✅ Identical code changes, context line numbers differ (684→665, 712→691)
drivers/media/platform/qcom/iris/iris_hfi_gen2_defines.h ✅ Identical code changes, context line numbers differ (133→130)
drivers/media/platform/qcom/iris/iris_platform_common.h ✅ Identical code changes, context line numbers differ (208→211)
drivers/media/platform/qcom/iris/iris_vidc.c ✅ Identical code changes (commit 2/5)

Verdict

Merge as-is. All 5 commits faithfully represent their lore.kernel.org sources. The FROMLIST prefix is correctly applied, original authorship is preserved with proper Signed-off-by trailers, and the diff content matches the upstream patches exactly (context line number differences are expected and legitimate). The patches have received positive reviews from maintainers (Acked-by: Nicolas Dufresne, Reviewed-by: Bryan O'Donoghue).

Final Summary

  1. Lore link present: Yes — all 5 commits have valid lore.kernel.org links in Link: trailers
  2. Lore link matches PR commits: Yes — diff content is identical; only context line numbers differ due to tree state differences (expected for FROMLIST patches applied to a vendor tree)
  3. Upstream patch status: ⏳ In review — posted 2026-10-29 (~5 weeks ago), received Acked-by from Nicolas Dufresne and Reviewed-by from Bryan O'Donoghue; no merge signal yet but positive maintainer feedback indicates likely acceptance
  4. PR present in qcom-next/topics: Yes — all 5 commits present in qcom-next (per integration_presence_report.md: commits 2/5, 4/5, 5/5 exact patch-id matches; commits 1/5, 3/5 all added lines present)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 27cd2ba09b3377fea4e69efb419d44ca159c2bac
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/5 [PATCH 1/5] FROMLIST: media: iris: support decode-order output on HFI present - all checked added lines are present skipped - not checked because qcom-next already contains the change present
2/5 [PATCH 2/5] FROMLIST: media: iris: allow larger capture buffer pools present - exact patch-id match at 8c7cf26 skipped - not checked because qcom-next already contains the change present
3/5 [PATCH 3/5] FROMLIST: media: iris: Add deblocking filter controls for present - all checked added lines are present skipped - not checked because qcom-next already contains the change present
4/5 [PATCH 4/5] FROMLIST: media: iris: Preserve timestamps on error present - exact patch-id match at 1502349 skipped - not checked because qcom-next already contains the change present
5/5 [PATCH 5/5] FROMLIST: media: iris: Recycle decoder buffers for present - exact patch-id match at 061ef49 skipped - not checked because qcom-next already contains the change present

Final Status

overall_status: PASS
present_commits: 5/5
partial_commits: 0/5
missing_commits: 0/5
topics_checked_for_commits: 0/5
final_summary: PR present in qcom-next/topics: Yes - all 5 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #1613 — checker-log-analyzer

PR: #1613
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/46891910346

Checker Result Summary
Checker Result Summary
checkpatch ✅ All 5 commits passed
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed (pre-existing imagination driver errors unrelated to PR)
check-uapi-headers ✅ Passed
check-patch-compliance ❌ 1 commit content mismatch
tag-check ✅ All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1613 - media: iris: VA-API fixes for HFI gen2
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/46891910346
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch ✅ All 5 commits passed
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check ✅ Passed (pre-existing imagination driver errors unrelated to PR)
check-uapi-headers ✅ Passed
check-patch-compliance ❌ 1 commit content mismatch
tag-check ✅ All commits have valid FROMLIST: prefix

❌ check-patch-compliance

Root cause: Commit "FROMLIST: media: iris: Add deblocking filter controls for HFI gen2" has content differences from the upstream patch at the provided lore.kernel.org link.

Failure details:

Checking commit: FROMLIST: media: iris: Add deblocking filter controls for HFI gen2
Change is different from the one mentioned in Link
Link: https://lore.kernel.org/r/20261029-iris-va-fixes-v1-3-44a2783f782b@radxa.com

Analysis:

The checker detected that the patch content in the PR differs from the upstream patch posted to the mailing list. This can happen for several reasons:

  1. Context-only differences — Line numbers shifted due to other patches applied first (not a real issue)
  2. Legitimate adaptations — Changes needed for the target kernel version (should be documented)
  3. Missing hunks — Parts of the upstream patch were omitted (needs investigation)
  4. Extra hunks — Additional changes not in the upstream patch (should be attributed separately)

Fix:

  1. Fetch the upstream patch and compare:

    b4 am --single-message -C -l -3 https://lore.kernel.org/r/20261029-iris-va-fixes-v1-3-44a2783f782b@radxa.com -o /tmp/upstream
    git format-patch -1 2463c3d89de3 --stdout > /tmp/pr-patch
    
    # Compare the actual code changes (ignoring context):
    diff <(awk '/^diff/,/^--$/' /tmp/pr-patch | grep -E '^[+-][^+-]') \
         <(awk '/^diff/,/^--$/' /tmp/upstream/*.mbx | grep -E '^[+-][^+-]')
  2. Classify the differences:

    • If only context lines differ → False positive — document in commit message
    • If legitimate adaptation needed → Add explanation to commit message
    • If missing hunks → Apply the complete upstream patch
    • If extra changes → Split into separate commit or document why they're needed
  3. If changes are intentional adaptations:

    • Add a note in the commit message explaining the differences, e.g.:
      [ Adapted for qcom-6.18.y: adjusted context due to missing upstream commit XYZ ]
      
    • Consider using BACKPORT: prefix instead of FROMLIST: if modifications are substantial

Reproduce locally:

cd kernel-tree
./scripts/check-patch-compliance.sh <base_sha> <head_sha>
# Or for a single commit:
b4 am --single-message -C -l -3 https://lore.kernel.org/r/20261029-iris-va-fixes-v1-3-44a2783f782b@radxa.com

Verdict

1 blocker to fix before merge: The content mismatch in commit 3/5 must be investigated and either:

  • Documented if the differences are intentional adaptations for qcom-6.18.y
  • Fixed if the patch was incorrectly modified
  • Re-prefixed as BACKPORT: if substantial modifications were needed

All other checkers passed successfully. Once the content mismatch is resolved or properly documented, the PR will be ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants