Skip to content

media: qcom: iris: Enable 10-bit support and extend format handling#773

Open
gouravk-qualcomm wants to merge 15 commits into
qualcomm-linux:qcom-6.18.yfrom
gouravk-qualcomm:sh-features
Open

media: qcom: iris: Enable 10-bit support and extend format handling#773
gouravk-qualcomm wants to merge 15 commits into
qualcomm-linux:qcom-6.18.yfrom
gouravk-qualcomm:sh-features

Conversation

@gouravk-qualcomm

Copy link
Copy Markdown

This series introduces support for 10-bit decoding on Gen2 targets in the IRIS video driver, along LTR/IR Layers etc.

CRs-Fixed: 4585241

lumag and others added 14 commits June 25, 2026 10:45
Requesting the IRQ and then immediately disabling it is fragile as it
leaves a window when the IRQ is still enabled although the underlying
device might be not completely setup for IRQ handling. Pass
IRQF_NO_AUTOEN instead of calling disable_irq_nosync().

Link: https://lore.kernel.org/all/20260529-iris-no-autoen-v2-1-b1bbaef65b41@oss.qualcomm.com/
Fixes: fb583a2 ("media: iris: introduce host firmware interface with necessary hooks")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: Appended Fix to patch title for -stable clarity]
[bod: Added cc stable for backporting]
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Add support for intra refresh configuration on gen1 encoder by enabling
V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD and
V4L2_CID_MPEG_VIDEO_INTRA_REFRESH_PERIOD_TYPE controls.

Link: https://lore.kernel.org/all/20260512-batch2_features-v7-1-4954e3b4df84@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Add Long-Term Reference(LTR) frame support for both gen1 and gen2
encoders by enabling the following V4L2 controls:
V4L2_CID_MPEG_VIDEO_LTR_COUNT
V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES
V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX

Link: https://lore.kernel.org/all/20260512-batch2_features-v7-2-4954e3b4df84@oss.qualcomm.com/
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Add support for B-frame configuration on both gen1 and gen2 encoders by
enabling V4L2_CID_MPEG_VIDEO_B_FRAMES control.

Link: https://lore.kernel.org/all/20260512-batch2_features-v7-3-4954e3b4df84@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Add hierarchical coding support for both gen1 and gen2 encoders by enabling
 the following V4L2 controls:
H264:
V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING,
V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE,
V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER
HEVC(gen2 only):
V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE,
V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER

Link: https://lore.kernel.org/all/20260512-batch2_features-v7-4-4954e3b4df84@oss.qualcomm.com/
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
…_property

Modify iris_hfi_gen1_packet_session_set_property to simplify size
calculations and remove redundant code patterns.

Previously, packet->shdr.hdr.size was incremented by sizeof(u32) in
every switch case, resulting in repetitive and less maintainable
logic.

Link: https://lore.kernel.org/all/20260512-batch2_features-v7-5-4954e3b4df84@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Unify AVC/HEVC handling by computing codec and lcu_size upfront.

Link: https://lore.kernel.org/all/20260512-batch2_features-v7-6-4954e3b4df84@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The struct iris_fmt unites pixfmt with the plane type, however the type
from the struct is not actually used. Drop the struct completely and use
u32 pixfmt in all the callsites.

Link: https://lore.kernel.org/all/20260529-iris-remote-fmts-v7-1-a8bd57ac8b5a@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Use div_u64() instead of mult_fract as u64 operator division fails on 32 bit
systems which don't link against libgcc.

Link: https://lore.kernel.org/all/20260602-fixbranch-v1-1-b8eccaad6d17@kernel.org/
Fixes: 5c66647a5c3e ("media: iris: add FPS calculation and VPP FW overhead in frequency formula")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606030132.qnBXVDkM-lkp@intel.com/
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
To simplify code checking for pixel formats, add helpers to
check for 8bit and 10bit formats.

Link: https://lore.kernel.org/all/20260602-topic-sm8x50-iris-10bit-decoding-v5-1-c2b32474ed67@linaro.org/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
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>
The P010 (YUV format with 16-bits per pixel with interleaved UV)
and QC10C (P010 compressed mode similar to QC08C) requires specific
buffer calculations to allocate the right buffer size for the DPB
(decoded picture buffer) frames and frames consumed by userspace.

Similar to 8bit, the 10bit DPB frames uses QC10C format.

Link: https://lore.kernel.org/all/20260602-topic-sm8x50-iris-10bit-decoding-v5-2-c2b32474ed67@linaro.org/
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>
Add the necessary plumbing into the HFi Gen2 to signal the decoder
the right 10bit pixel format and stride when in compressed mode.

Link: https://lore.kernel.org/all/20260602-topic-sm8x50-iris-10bit-decoding-v5-3-c2b32474ed67@linaro.org/
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>
… for 10bit formats

Update the gen2 response and vdec s_fmt code to take in account
the P010 and QC010 when calculating the width, height and stride.

Link: https://lore.kernel.org/all/20260602-topic-sm8x50-iris-10bit-decoding-v5-4-c2b32474ed67@linaro.org/
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>
…nd 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.

Link: https://lore.kernel.org/all/20260602-topic-sm8x50-iris-10bit-decoding-v5-5-c2b32474ed67@linaro.org/
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>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4585241 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4585241
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4585241 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4585241
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4585241 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4585241
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4585241 is not eligible for merge.

The parent software image for kernel.qli.2.0 is not development complete.

Entity: kernel.qli.2.0
CR: 4585241
Reason: CR_CANNOT_MERGE

Please ensure the CR passes both CCT (ComponentChangeTasks) and ICT (Integration Change Tasks) validations.

Add the necessary bits into the gen2 platforms tables and handlers
to allow decoding streams into 10bit pixel formats.

Link: https://lore.kernel.org/all/20260602-topic-sm8x50-iris-10bit-decoding-v5-6-c2b32474ed67@linaro.org/
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>
@qlijarvis

Copy link
Copy Markdown

PR #773 — validate-patch

PR: #773

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 15 patches have lore.kernel.org links
  2. Lore link matches PR commits: Cannot verify — links are future-dated (May-June 2026) and return empty from lore archives
  3. Upstream patch status: Cannot determine — patches dated in future, likely prepared for upstream submission or test scenario
  4. PR present in qcom-next: Not checked — FROMGIT prefix suggests these are being integrated from upstream git

Note: The future dates (May-June 2026) suggest either:

  • These are patches prepared for future upstream submission
  • This is a test/simulation environment
  • Dates were incorrectly set during patch preparation

The tag ordering issue affects all 15 patches and should be corrected to comply with kernel submission standards before merging.

Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #773 - FROMGIT: media: iris driver updates (15 patches)
Upstream commit: Multiple commits from lore.kernel.org (future-dated May-June 2026)
Verdict: ⚠️ PARTIAL - Tag ordering issues present in all patches

Commit Message

Check Status Note
Subject matches upstream ⚠️ Cannot verify - lore links are future-dated (2026) and don't exist yet
Body preserves rationale Commit message bodies appear well-formed and descriptive
Fixes tag present/correct Patch 01 has proper Fixes tag with commit SHA and subject
Authorship preserved Original authors (Dmitry Baryshkov, Wangao Wang, Neil Armstrong) preserved
Backport note (if applicable) Patch 01 has [bod: ...] notes documenting modifications

Tag Ordering Issues (ALL 15 PATCHES)

Issue Status Notes
Link tag placement Link: tag appears BEFORE Signed-off-by in all patches
Correct order should be Fixes → Reviewed-by/Tested-by → Signed-off-by → Link
Current order Link → Fixes/Reviewed-by/Tested-by → Signed-off-by

Patch-Specific Issues

Patch 01:

  • Subject line: "Fix use IRQF_NO_AUTOEN" is grammatically awkward (should be "Fix use of" or "Use")
  • [bod: ...] notes document modifications appropriately
  • Cc: stable@vger.kernel.org added (appropriate for bug fix)
  • Cc: stable tag placed between Signed-off-by tags (should be before first Signed-off-by)

Patches 02-15:

  • No patch-specific issues beyond the tag ordering problem

Diff

Cannot validate diffs against upstream as lore links return empty (future-dated patches).

Issues

Critical:

  1. Tag ordering violation (all 15 patches): Link: tag must appear AFTER all Signed-off-by tags, not before. Current order violates kernel submission guidelines.

Minor:
2. Patch 01 subject grammar: "Fix use IRQF_NO_AUTOEN" should be "Fix use of IRQF_NO_AUTOEN" or "Use IRQF_NO_AUTOEN instead of disable_irq_nosync()"
3. Patch 01 Cc: stable placement: Cc: stable@vger.kernel.org should appear before the first Signed-off-by, not between them

Cannot Verify:
4. Lore links are future-dated (May-June 2026) and don't exist in archives yet
5. Cannot compare diffs against upstream source
6. Cannot verify upstream acceptance status

Verdict

Fix required before merge: All 15 patches have incorrect tag ordering with Link: appearing before Signed-off-by tags instead of after.

Recommended actions:

  1. Move Link: tag to the end of each commit message (after all Signed-off-by tags)
  2. Fix patch 01 subject: "Fix use of IRQF_NO_AUTOEN" or similar
  3. Move Cc: stable@vger.kernel.org in patch 01 to before first Signed-off-by

Positive aspects:

  • Authorship chain properly preserved
  • [bod: ...] notes document modifications transparently
  • Fixes tag properly formatted
  • FROMGIT: prefix indicates upstream integration
  • Reviewed-by/Tested-by tags present

Final Summary

  1. Lore link present: Yes — all 15 patches have lore.kernel.org links
  2. Lore link matches PR commits: Cannot verify — links are future-dated (May-June 2026) and return empty from lore archives
  3. Upstream patch status: Cannot determine — patches dated in future, likely prepared for upstream submission or test scenario
  4. PR present in qcom-next: Not checked — FROMGIT prefix suggests these are being integrated from upstream git

Note: The future dates (May-June 2026) suggest either:

  • These are patches prepared for future upstream submission
  • This is a test/simulation environment
  • Dates were incorrectly set during patch preparation

The tag ordering issue affects all 15 patches and should be corrected to comply with kernel submission standards before merging.

@qlijarvis

Copy link
Copy Markdown

PR #773 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 2 warnings in commit 09/15 (2e72fee)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers No UAPI header changes
check-patch-compliance 3 commits differ from upstream lore links
tag-check N/A Not applicable (qcom-6.18.y branch)
qcom-next-check ⏭️ All commits are FROMGIT: prefixed

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #773 - media: iris: FROMGIT patches (15 commits)
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/28154183086

Checker Result Summary
checkpatch 2 warnings in commit 09/15 (2e72fee)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers No UAPI header changes
check-patch-compliance 3 commits differ from upstream lore links
tag-check N/A Not applicable (qcom-6.18.y branch)
qcom-next-check ⏭️ All commits are FROMGIT: prefixed

❌ checkpatch

Root cause: Commit 09/15 (2e72fee) has 2 checkpatch warnings

Failure details:

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#7: 
Use div_u64() instead of mult_fract as u64 operator division fails on 32 bit

WARNING: Unknown commit id '5c66647a5c3e', maybe rebased or not pulled?
#11: 
Fixes: 5c66647a5c3e ("media: iris: add FPS calculation and VPP FW overhead in frequency formula")

Fix:

  1. Line length warning: Wrap the commit message line to 75 characters or less:

    Use div_u64() instead of mult_fract as u64 operator division
    fails on 32 bit
    
  2. Unknown commit warning: The Fixes tag references commit 5c66647a5c3e which is not present in the base branch. This is expected for FROMGIT patches that fix commits not yet in the target branch. This warning can be ignored as it's a false positive for FROMGIT patches, or the Fixes tag can be removed if the fixed commit isn't in qcom-6.18.y.

Reproduce locally:

./scripts/checkpatch.pl --strict --git c9744addfb04eec214121e1fc11040e828576da4..150a144a1016a7d4d0fb7139d33f8f2e85412d4d

❌ check-patch-compliance

Root cause: 3 commits have differences from their upstream lore.kernel.org links

Failure details:

The following commits failed patch compliance verification:

  1. Commit 02/15: FROMGIT: media: qcom: iris: Add intra refresh support for gen1 encoder

  2. Commit 05/15: FROMGIT: media: qcom: iris: Add hierarchical coding support for encoder

  3. Commit 08/15: FROMGIT: media: iris: drop struct iris_fmt

Fix:

The check-patch-compliance checker compares the actual patch content against the upstream lore link. Differences can occur due to:

  1. Backport modifications: Additional changes needed for the target kernel version
  2. Conflict resolution: Adjustments made during cherry-pick/rebase
  3. Additional trailers: Extra Signed-off-by, Reviewed-by, or other tags added downstream
  4. Wrong lore link: The Link tag may point to a different version than what was actually applied

To resolve:

  1. Verify the patches match the intended upstream commits:

    # For each failing commit, download the upstream patch and compare
    b4 am https://lore.kernel.org/all/20260512-batch2_features-v7-1-4954e3b4df84@oss.qualcomm.com/
    git show <commit-sha> > local.patch
    # Compare the diffs manually
  2. If intentional modifications exist: Document them in the commit message with a note like:

    [bod: Modified for qcom-6.18.y compatibility]
    
  3. If the wrong version was linked: Update the Link tag to point to the correct upstream version

  4. If patches are identical except for trailers: This is a known false positive in the checker and can be ignored

Reproduce locally:

bash ../kernel-checkers/check-patch-compliance.sh \
  --kernel-src /path/to/kernel \
  --base c9744addfb04eec214121e1fc11040e828576da4 \
  --head <pr-head-sha>

Verdict

2 blockers to fix:

  1. checkpatch warning (minor): Wrap commit message line in commit 09/15 to 75 chars. The "Unknown commit" warning can be ignored for FROMGIT patches.

  2. check-patch-compliance (major): 3 commits (02/15, 05/15, 08/15) differ from their upstream lore links. Verify whether differences are intentional backport modifications or indicate incorrect patches. If intentional, document the changes; if incorrect, update the patches to match upstream.

Recommendation: Review the patch compliance failures first, as they may indicate incorrect backports. The checkpatch line-length warning is cosmetic and can be fixed with a simple commit message amendment.

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.

4 participants