Skip to content

media: qcom: iris: encoder feature enhancements batch2 - #867

Open
WangaoW wants to merge 4 commits into
qualcomm-linux:qcom-6.18.yfrom
WangaoW:batch2_backport
Open

media: qcom: iris: encoder feature enhancements batch2#867
WangaoW wants to merge 4 commits into
qualcomm-linux:qcom-6.18.yfrom
WangaoW:batch2_backport

Conversation

@WangaoW

@WangaoW WangaoW commented Jul 27, 2026

Copy link
Copy Markdown

This patch series introduces several enhancements to the Qualcomm Iris
encoder driver, improving support for V4L2 controls and enabling more
video encoding features.

All patches have been tested with v4l2-compliance and v4l2-ctl on
gen1:SM8250, QCS6490, gen2:QCS8300, QCS8550, QCS9100, X1E-80100.

CRs-Fixed: 4623257

Wangao Wang added 4 commits July 27, 2026 17:55
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.

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>
Link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-1-4954e3b4df84@oss.qualcomm.com/
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

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>
Link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-2-4954e3b4df84@oss.qualcomm.com/
Add support for B-frame configuration on both gen1 and gen2 encoders by
enabling V4L2_CID_MPEG_VIDEO_B_FRAMES control.

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>
Link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-3-4954e3b4df84@oss.qualcomm.com/
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

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>
Link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-4-4954e3b4df84@oss.qualcomm.com/
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4623257 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4623257

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qlijarvis

Copy link
Copy Markdown

PR #867 — validate-patch

PR: #867

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: Yes — all 4 commits include correct lore.kernel.org links to the v7 series
  2. Lore link matches PR commits: Yes — diff content is faithful to lore; all commits are clean cherry-picks with BACKPORT: prefix added
  3. Upstream patch status: ⏳ Decision Pending — v7 series posted 2026-05-12, received Reviewed-by tags from subsystem reviewers (Dikshita Agarwal, Dmitry Baryshkov, Vikash Garodia) and maintainer sign-off from Bryan O'Donoghue. No explicit "applied" or "queued" message yet, but maintainer engagement indicates acceptance intent. Last activity: 2026-05-13.
  4. PR present in qcom-next/topics: Yes - all 4 commit(s) are present in qcom-next or topics
Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #867 - media: qcom: iris: encoder feature enhancements batch2 (4 commits)
Upstream commits: lore.kernel.org v7 series (patches 1-4 of 6)
Verdict: ✅ PASS

Summary

This PR contains 4 commits from a 6-patch upstream series (v7). All commits are properly prefixed with BACKPORT:, include correct lore links, preserve upstream authorship and sign-offs, and match the upstream content. The series has received Reviewed-by tags from subsystem reviewers (Dikshita Agarwal, Dmitry Baryshkov) and was signed off by the maintainer (Bryan O'Donoghue).


Commit 1/4: BACKPORT: media: qcom: iris: Add intra refresh support for gen1 encoder

Lore link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-1-4954e3b4df84@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream Identical (with BACKPORT: prefix added)
Body preserves rationale Identical description of V4L2 control enablement
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved From: Wangao Wang matches lore author
Backport note N/A No backport note required - this is a direct cherry-pick with BACKPORT: prefix
Trailers correct All upstream trailers preserved: Reviewed-by (Dikshita, Dmitry), Tested-by (Neil), Signed-off-by (Wangao, Bryan)

Diff

File Status Notes
iris_ctrls.c Adds iris_set_ir_period_gen1() function
iris_ctrls.h Renames iris_set_ir_period to gen1/gen2 variants
iris_hfi_gen1.c Adds IR_TYPE and IR_PERIOD capability entries
iris_hfi_gen1_command.c Adds HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH handling
iris_hfi_gen1_defines.h Adds HFI intra refresh mode definitions
iris_hfi_gen2.c Updates function call to iris_set_ir_period_gen2

Upstream status:Decision Pending — Series posted v7 on 2026-05-12. Received Reviewed-by tags from Dikshita Agarwal and Dmitry Baryshkov. Maintainer Bryan O'Donoghue signed off and requested author rebase to venus-iris-next branch. No explicit "applied" or "queued" message found in thread, but maintainer sign-off indicates acceptance intent. Last activity: 2026-05-13.


Commit 2/4: BACKPORT: media: qcom: iris: Add Long-Term Reference support for encoder

Lore link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-2-4954e3b4df84@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream Identical (with BACKPORT: prefix added)
Body preserves rationale Identical description of LTR V4L2 controls
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved From: Wangao Wang matches lore author
Backport note N/A No backport note required
Trailers correct All upstream trailers preserved: Tested-by (Neil), Reviewed-by (Dikshita), Signed-off-by (Wangao, Bryan)

Diff

File Status Notes
iris_ctrls.c Adds LTR control handling functions
iris_ctrls.h Adds function declarations
iris_hfi_gen1.c Adds LTR capability entries for gen1
iris_hfi_gen1_command.c Adds HFI LTR property handling
iris_hfi_gen1_defines.h Adds HFI LTR structure definitions
iris_hfi_gen2.c Adds LTR capability entries for gen2
iris_hfi_gen2_defines.h Adds gen2 LTR definitions
iris_platform_common.h Adds LTR capability enum entries
iris_vpu_buffer.c Updates buffer size calculation for LTR

Upstream status:Decision Pending — Same series as commit 1/4. Reviewed-by from Dikshita Agarwal, signed off by Bryan O'Donoghue.


Commit 3/4: BACKPORT: media: qcom: iris: Add B frames support for encoder

Lore link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-3-4954e3b4df84@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream Identical (with BACKPORT: prefix added)
Body preserves rationale Identical description of B-frame control
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved From: Wangao Wang matches lore author
Backport note N/A No backport note required
Trailers correct All upstream trailers preserved: Reviewed-by (Dikshita), Tested-by (Neil), Signed-off-by (Wangao, Bryan)

Diff

File Status Notes
iris_ctrls.c Adds B-frame control handling
iris_ctrls.h Adds function declaration
iris_hfi_gen1.c Adds B-frame capability for gen1
iris_hfi_gen1_command.c Adds HFI B-frame property handling
iris_hfi_gen1_defines.h Adds HFI B-frame definitions
iris_hfi_gen2.c Adds B-frame capability for gen2
iris_platform_common.h Adds B_FRAME capability enum
iris_vpu_buffer.c Updates buffer calculation for B-frames

Upstream status:Decision Pending — Same series as commit 1/4. Reviewed-by from Dikshita Agarwal, signed off by Bryan O'Donoghue.


Commit 4/4: BACKPORT: media: qcom: iris: Add hierarchical coding support for encoder

Lore link: https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-4-4954e3b4df84@oss.qualcomm.com/

Commit Message

Check Status Note
Subject matches upstream Identical (with BACKPORT: prefix added)
Body preserves rationale Identical description of hierarchical coding controls for H264/HEVC
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved From: Wangao Wang matches lore author
Backport note N/A No backport note required
Trailers correct All upstream trailers preserved: Reviewed-by (Vikash), Signed-off-by (Wangao, Bryan)

Diff

File Status Notes
iris_ctrls.c Adds hierarchical coding control handling
iris_ctrls.h Adds function declarations
iris_hfi_gen1.c Adds H264 hierarchical coding for gen1
iris_hfi_gen1_command.c Adds HFI hierarchical coding property handling
iris_hfi_gen1_defines.h Adds HFI definitions
iris_hfi_gen2.c Adds H264/HEVC hierarchical coding for gen2
iris_hfi_gen2_defines.h Adds gen2 definitions
iris_instance.h Adds instance state fields
iris_platform_common.h Adds capability enum entries

Upstream status:Decision Pending — Same series as commit 1/4. Reviewed-by from Vikash Garodia, signed off by Bryan O'Donoghue.


Issues Found

None. All commits are properly formatted with correct authorship, trailers, lore links, and BACKPORT: prefixes.


Verdict

Merge as-is. All 4 commits faithfully represent their upstream lore sources with proper BACKPORT: prefixes, correct authorship, complete trailers, and accurate lore links. The series has received subsystem reviewer approval and maintainer sign-off.


Final Summary

  1. Lore link present: Yes — all 4 commits include correct lore.kernel.org links to the v7 series
  2. Lore link matches PR commits: Yes — diff content is faithful to lore; all commits are clean cherry-picks with BACKPORT: prefix added
  3. Upstream patch status: ⏳ Decision Pending — v7 series posted 2026-05-12, received Reviewed-by tags from subsystem reviewers (Dikshita Agarwal, Dmitry Baryshkov, Vikash Garodia) and maintainer sign-off from Bryan O'Donoghue. No explicit "applied" or "queued" message yet, but maintainer engagement indicates acceptance intent. Last activity: 2026-05-13.
  4. PR present in qcom-next/topics: Yes — per integration_presence_report.md: all 4 commits are present (commits 1/4 and 3/4 exact patch-id match in qcom-next; commits 2/4 and 4/4 present in topics with all added lines verified)

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: 07f50dc44eddcf748a99d1a7523a466438bfffa6
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/4 [PATCH 1/4] BACKPORT: media: qcom: iris: Add intra refresh support present - exact patch-id match at 8979728 skipped - not checked because qcom-next already contains the change present
2/4 [PATCH 2/4] BACKPORT: media: qcom: iris: Add Long-Term Reference partial - subject or partial tree evidence found, but full change was not verified present - all checked added lines are present present
3/4 [PATCH 3/4] BACKPORT: media: qcom: iris: Add B frames support for present - exact patch-id match at e4d067d skipped - not checked because qcom-next already contains the change present
4/4 [PATCH 4/4] BACKPORT: media: qcom: iris: Add hierarchical coding partial - subject or partial tree evidence found, but full change was not verified present - all checked added lines are present present

Final Status

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

@qlijarvis

Copy link
Copy Markdown

PR #867 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch Passed
dt-binding-check ⏭️ Skipped (no binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check Passed
check-uapi-headers CI infrastructure failure (Docker image unavailable)
check-patch-compliance b4 fetch failure (network/lore unavailable)
tag-check All commits have valid BACKPORT: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #867 - media: qcom: iris: Add encoder features (intra refresh, LTR, B frames, hierarchical coding)
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/30257226177

Checker Result Summary
checkpatch Passed
dt-binding-check ⏭️ Skipped (no binding changes)
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check Passed
check-uapi-headers CI infrastructure failure (Docker image unavailable)
check-patch-compliance b4 fetch failure (network/lore unavailable)
tag-check All commits have valid BACKPORT: prefix

❌ check-uapi-headers

Root cause: Docker image kmake-image:latest unavailable in CI environment — infrastructure issue, not a patch defect.

Failure details:

Unable to find image 'kmake-image:latest' locally
docker: Error response from daemon: pull access denied for kmake-image, 
  repository does not exist or may require 'docker login': denied: 
  requested access to the resource is denied
cat: uapi_errors.log: No such file or directory
##[error]Process completed with exit code 1.

Analysis:
The check-uapi-headers checker requires the kmake-image Docker container to build the kernel and compare UAPI headers. The CI runner could not pull this image, causing the checker to fail before it could analyze the PR changes. This PR modifies only drivers/media/platform/qcom/iris/ C files — no UAPI headers, sysfs attributes, or module parameters are changed, so the checker would have skipped or passed if the Docker image were available.

Fix: Re-trigger CI after verifying Docker registry access. No patch changes needed.

Reproduce locally:
Not applicable — this is a CI infrastructure issue. If you want to verify UAPI compliance manually:

./scripts/check-uapi.sh -b 3f28a0821dae422e2a380a83c1c5d855480a80c0 \
  -p a350298f0289b9a14c416c20ade1b60ffabf3c11 -l uapi_errors.log

❌ check-patch-compliance

Root cause: b4 tool unable to fetch upstream patches from lore.kernel.org — network connectivity or lore archive issue, not a patch defect.

Failure details:

Checking commit: BACKPORT: media: qcom: iris: Add intra refresh support for gen1 encoder
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-1-4954e3b4df84@oss.qualcomm.com/

Checking commit: BACKPORT: media: qcom: iris: Add Long-Term Reference support for encoder
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-2-4954e3b4df84@oss.qualcomm.com/

Checking commit: BACKPORT: media: qcom: iris: Add B frames support for encoder
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-3-4954e3b4df84@oss.qualcomm.com/

Checking commit: BACKPORT: media: qcom: iris: Add hierarchical coding support for encoder
Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-4-4954e3b4df84@oss.qualcomm.com/

Analysis:
All 4 commits have:

  • ✅ Valid BACKPORT: prefix (required for backported patches)
  • ✅ Valid Link: trailer pointing to lore.kernel.org
  • ✅ Proper lore message-ID format

The checker failed because b4 am could not fetch the patches from lore.kernel.org. This indicates either:

  1. Network connectivity issue in the CI environment
  2. The lore archive doesn't have these messages yet (patches may be very recent or not yet archived)
  3. Transient lore.kernel.org service issue

The Link URLs are correctly formatted and point to a valid v7 patch series (20260512-batch2_features-v7-{1,2,3,4}). The commits are properly attributed with Signed-off-by, Reviewed-by, Tested-by, and upstream maintainer sign-off.

Fix: Re-trigger CI. If the issue persists, verify the patches are archived on lore.kernel.org by visiting the URLs in a browser. No patch changes needed — the commit metadata is correct.

Reproduce locally:

# Test b4 fetch for each commit:
b4 am --single-message -C -l -3 \
  https://lore.kernel.org/linux-arm-msm/20260512-batch2_features-v7-1-4954e3b4df84@oss.qualcomm.com/

# If b4 succeeds, compare the fetched patch to the PR commit:
git format-patch -1 <commit-sha> --stdout > /tmp/pr-commit.patch
diff <(awk '/^diff/,/^--$/' /tmp/pr-commit.patch | grep -E '^[+-][^+-]') \
     <(awk '/^diff/,/^--$/' /tmp/out/*.mbx | grep -E '^[+-][^+-]')

✅ tag-check (manual verification)

Status: PASS

Analysis:
The PR targets a branch other than qcom-next or qcom-next-staging (confirmed by CI logs showing non-qcom-next-staging path), so every commit must have a subject-line prefix tag.

All 4 commits have the BACKPORT: prefix:

  1. BACKPORT: media: qcom: iris: Add intra refresh support for gen1 encoder
  2. BACKPORT: media: qcom: iris: Add Long-Term Reference support for encoder
  3. BACKPORT: media: qcom: iris: Add B frames support for encoder
  4. BACKPORT: media: qcom: iris: Add hierarchical coding support for encoder

BACKPORT: is a valid prefix for upstream patches that have been backported with modifications. ✅


Verdict

2 CI infrastructure failures; 0 patch defects.

The PR is ready to merge from a code quality perspective. Both failures are CI environment issues:

  1. check-uapi-headers — Docker image unavailable (infrastructure)
  2. check-patch-compliance — b4 unable to fetch from lore.kernel.org (network/archive)

All code-level checkers passed:

  • ✅ checkpatch (no style issues)
  • ✅ sparse-check (no static analysis warnings)
  • ✅ tag-check (all commits have valid BACKPORT: prefix)

Recommended action: Re-trigger CI. If check-patch-compliance continues to fail, manually verify the lore.kernel.org URLs are accessible and the patches match the PR commits.

@nyanmisaka

Nyanmisaka (nyanmisaka) commented Jul 28, 2026

Copy link
Copy Markdown

WangaoW Sorry to hijack this thread. I noticed that the encoder implementation in the downstream video-driver references V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10, but it is not yet present in the upstream Iris driver.

The 10-bit decoding was supported recently. Are there any plans to upstream support for 10-bit encoding (HEVC Main10 / P010) to the new Iris driver? This is very useful for HDR10 encoding use cases.

@vgarodia

Copy link
Copy Markdown

WangaoW Sorry to hijack this thread. I noticed that the encoder implementation in the downstream video-driver references V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10, but it is not yet present in the upstream Iris driver.

The 10-bit decoding was supported recently. Are there any plans to upstream support for 10-bit encoding (HEVC Main10 / P010) to the new Iris driver? This is very useful for HDR10 encoding use cases.

Yes, we do plan to support HDR10 for encode as well. Immediate plan is to support ROI (patches posted), followed by HDR10+ decode. Next would be HDR10 encode.
Incase you do have any proposal to enable (HDR10 encode) the same at your end, please post the same for reviews. HDR10 encode is indeed very useful and needed feature.

@nyanmisaka

Nyanmisaka (nyanmisaka) commented Jul 29, 2026

Copy link
Copy Markdown

Yes, we do plan to support HDR10 for encode as well. Immediate plan is to support ROI (patches posted), followed by HDR10+ decode. Next would be HDR10 encode. Incase you do have any proposal to enable (HDR10 encode) the same at your end, please post the same for reviews. HDR10 encode is indeed very useful and needed feature.

vgarodia Thank you for the reply. Based on my overview of the downstream video-driver, not every platform supports 10-bit encoding (I am unsure whether this is due to hardware limitations or a lack of implementation in the firmware). It would be great to have a feature matrix placed somewhere documenting VPU support for 10-bit encoding and similar codec specs across the various platforms. For example, something like https://developer.nvidia.com/video-encode-decode-support-matrix

My primary use case is FFmpeg, including patching it to use 10-bit support when necessary. I am currently running on the QCS6490 and SC8280XP, and might be able to test on the X1E in the future.

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