Skip to content

media: qcom: Switch iris/venus to generic PAS TZ APIs - #1651

Open
pgujjula-qcom wants to merge 2 commits into
qualcomm-linux:tech/mm/videofrom
pgujjula-qcom:tech/mm/video-generic-pas
Open

media: qcom: Switch iris/venus to generic PAS TZ APIs#1651
pgujjula-qcom wants to merge 2 commits into
qualcomm-linux:tech/mm/videofrom
pgujjula-qcom:tech/mm/video-generic-pas

Conversation

@pgujjula-qcom

Copy link
Copy Markdown

Summary

Switch the Qualcomm media (iris + venus) drivers over to the generic PAS TZ APIs
(qcom_pas_*), picking up the iris/venus-relevant patches from Sumit Garg's series
"firmware: qcom: Add OP-TEE PAS service support" (v9). The remaining patches in that
series (generic PAS service + other subsystem conversions) flow in from a different
branch at merge time.

Commits

  • FROMLIST: media: qcom: Switch to generic PAS TZ APIs
    Rename qcom_scm_pas_* / qcom_scm_set_remote_stateqcom_pas_* /
    qcom_pas_set_remote_state in iris + venus, add
    #include <linux/firmware/qcom/qcom_pas.h>, and select QCOM_PAS in both Kconfigs.
    Extended beyond the upstream posting to also convert the context API
    (qcom_scm_pas_prepare_and_auth_reset, devm_qcom_scm_pas_context_alloc,
    struct qcom_scm_pas_context, qcom_scm_pas_metadata_release,
    qcom_scm_pas_supported) — a downstream secure-PAS addition not present in Sumit's
    upstream base. This is required so the drivers do not reference symbols removed by
    the series' "Remove SCM PAS wrappers" patch.
  • FROMLIST: media: qcom: Pass proper PAS ID to set_remote_state API
    qcom_pas_set_remote_state(resume, 0)(resume, {IRIS,VENUS}_PAS_ID).

Notes for reviewers

  • Files touched: iris/iris_firmware.c, iris/iris_core.h, iris/Kconfig,
    venus/firmware.c, venus/core.h, venus/Kconfig.
  • Build dependency: the qcom_pas_* symbols and QCOM_PAS Kconfig come from the
    generic-PAS series; this compiles only once that series is present in the target
    branch.

Links:

🤖 Generated with Claude Code

Switch qcom media client drivers over to generic PAS TZ APIs. Generic PAS
TZ service allows to support multiple TZ implementation backends like QTEE
based SCM PAS service, OP-TEE based PAS service and any further future TZ
backend service.

Reviewed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Tested-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> # Lemans
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/lkml/20260702115835.167602-10-sumit.garg@kernel.org/
As per testing the SCM backend just ignores it while OP-TEE makes
use of it to for proper book keeping purpose.

Reviewed-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
Tested-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com> # Lemans
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/lkml/20260702115835.167602-11-sumit.garg@kernel.org/
@qcomlnxci
qcomlnxci requested review from a team, dikshita-agarwal and vgarodia and removed request for a team August 6, 2026 08:59
@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1651

PR: #1651
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/31087175636

# Error File:Line PR-introduced? Root Cause
1 Missing header: dt-bindings/media/qcom,sm8550-iris.h arch/arm64/boot/dts/qcom/hamoa.dtsi:20 No Pre-existing DT binding header missing from kernel tree; unrelated to PR's media driver changes

Verdict

0 of 1 errors are introduced by this PR; 1 is pre-existing. The PR only modifies media driver source files (drivers/media/platform/qcom/{iris,venus}/) and does not touch device tree files. The build failure is caused by a missing device tree binding header that hamoa.dtsi attempts to include, which is unrelated to the PR's changes.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

🔨 Build Failure Analysis — PR #1651

PR: #1651
Build run: https://github.com/qualcomm-linux/kernel-config/actions/runs/31087175636

# Error File:Line PR-introduced? Root Cause
1 Missing header file dt-bindings/media/qcom,sm8550-iris.h arch/arm64/boot/dts/qcom/hamoa.dtsi:20 No Pre-existing device tree issue unrelated to PR changes

Verdict

The build failure is NOT caused by this PR. The error is a pre-existing device tree compilation issue where hamoa.dtsi references a missing header file. This PR only modifies media driver source files under drivers/media/platform/qcom/ and does not touch any device tree files.

📎 Detailed analysis: Full report

@qlijarvis

Copy link
Copy Markdown

PR #1651 — validate-patch

PR: #1651

Verdict Issues Detailed Report
0 Full report

Final Summary

  1. Lore link present: Yes — both commits have lore.kernel.org links
  2. Lore link matches PR commits: No — Commit 1/2 links to lore patch 09/14 but contains significantly different code (newer API names, extra struct changes, missing whitespace fix). Commit 2/2 matches its lore link.
  3. Upstream patch status: Patch 09/14 (commit 1) Upstreamed as 94d3305d990b055e1561e3b78275344b1f40c86e on Aug 4, 2026, but the upstream version differs from this PR. Patch 10/14 (commit 2) In review — not yet merged as of Aug 4, 2026.
  4. PR present in qcom-next/topics: Partial - 1/2 commit(s) only have partial integration evidence
Verdict: ❌ — click to expand

🔍 Patch Validation

PR: #1651 - FROMLIST: media: qcom: Switch to generic PAS TZ APIs (2 commits)
Upstream commits:


Commit 1/2: FROMLIST: media: qcom: Switch to generic PAS TZ APIs

Check Status Note
Subject matches upstream Subject identical (with FROMLIST: prefix added)
Body preserves rationale Body text identical
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved ⚠️ FROMLIST: submitter (Priyanka) differs from lore author (Sumit); Sumit's Signed-off-by present ✅
Backport note (if applicable) N/A Not a backport
Trailer order ⚠️ Konrad's Reviewed-by appears after Signed-off-by in PR; should be before

Diff Comparison - Commit 1/2

File Status Notes
iris/Kconfig Whitespace mismatch: lore patch 09/14 converts spaces→tabs; PR keeps spaces
iris/iris_core.h Extra content: PR changes qcom_scm_pas_contextqcom_pas_context; NOT in lore patch 09/14
iris/iris_firmware.c API name mismatch: PR uses qcom_pas_prepare_and_auth_reset, devm_qcom_pas_context_alloc, qcom_pas_metadata_release; lore patch 09/14 uses qcom_pas_auth_and_reset (older API)
venus/Kconfig Identical
venus/core.h Extra content: PR changes qcom_scm_pas_contextqcom_pas_context; NOT in lore patch 09/14
venus/firmware.c API name mismatch: PR uses newer API names; lore patch 09/14 uses older names

Commit 2/2: FROMLIST: media: qcom: Pass proper PAS ID to set_remote_state API

Check Status Note
Subject matches upstream Subject identical (with FROMLIST: prefix added)
Body preserves rationale Body text identical
Fixes tag present/correct N/A No Fixes tag in upstream or PR
Authorship preserved FROMLIST: submitter (Priyanka) differs from lore author (Sumit); Sumit's Signed-off-by present ✅
Backport note (if applicable) N/A Not a backport
Trailer order ⚠️ Konrad's Reviewed-by appears after Signed-off-by; should be before

Diff Comparison - Commit 2/2

File Status Notes
iris/iris_firmware.c Identical - changes 0IRIS_PAS_ID
venus/firmware.c Identical - changes 0VENUS_PAS_ID

Issues

Commit 1/2 - Critical:

  1. Wrong lore patch linked: The PR links to lore message-ID 20260702115835.167602-10-sumit.garg@kernel.org (patch 09/14 in the series), but the PR content does NOT match that patch. The lore patch 09/14 uses older API names (qcom_pas_auth_and_reset) while the PR uses newer API names (qcom_pas_prepare_and_auth_reset) introduced in earlier patches of the series (01-08/14).

  2. Extra content not in linked lore patch: The PR includes changes to iris_core.h and venus/core.h (struct member type changes) that are NOT present in lore patch 09/14. These changes appear to be from an earlier patch in the series (likely patch 02/14 "firmware: qcom_scm: Migrate to generic PAS service").

  3. Missing whitespace cleanup: Lore patch 09/14 includes a whitespace fix in iris/Kconfig (spaces → tabs) that is absent from the PR.

  4. Root cause: The PR appears to be cherry-picked from a tree that already has patches 01-08/14 applied, making it incompatible with the linked lore patch 09/14. The PR should either:

    • Link to a later revision of the patch series that reflects the current API, OR
    • Be split into multiple commits matching the original patch series structure (patches 01-09/14), OR
    • Link to the actual upstream commit SHA 94d3305d990b055e1561e3b78275344b1f40c86e and use UPSTREAM: prefix instead of FROMLIST:

Commit 2/2 - Minor:

  1. Trailer order: Both commits place Reviewed-by: Konrad Dybcio after Signed-off-by: instead of before. Per kernel convention, review tags should precede sign-offs.

Upstream Patch Status

Commit Community Verdict
Patch 09/14 (linked by PR commit 1) ACKed — merged as 94d3305d990b055e1561e3b78275344b1f40c86e by Bjorn Andersson on Aug 4, 2026 into qcom tree
Patch 10/14 (linked by PR commit 2) Decision Pending — not in the Aug 4, 2026 merge; no explicit NAK found; likely awaiting media maintainer ack or will be picked in next cycle

Note: Patch 09/14 was accepted and merged upstream, but the merged version uses the older API names (qcom_pas_auth_and_reset) that match the lore posting, NOT the newer API names in this PR. This confirms the PR is based on a different tree state than what was actually merged upstream.


Integration Presence (from integration_presence_report.md)

Commit qcom-next topics Final
1/2 missing partial partial
2/2 missing present present

Overall: Partial - commit 1/2 has only partial integration evidence; commit 2/2 is present in topics.


Verdict

❌ FAIL — Do not merge without correction.

Required fixes:

  1. Commit 1/2: The lore link is incorrect. The PR content does not match lore patch 09/14. Options:

    • Option A (Recommended): Change prefix to UPSTREAM: and link to the actual merged commit: Link: https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=94d3305d990b055e1561e3b78275344b1f40c86e
    • Option B: Split this commit to match the original patch series structure (patches 01-09/14), each with correct lore links
    • Option C: Find and link to a later revision of the patch series (if one exists) that uses the newer API names
  2. Commit 1/2: Add the missing whitespace cleanup in iris/Kconfig (spaces → tabs) to match the upstream commit 94d3305d990b055e1561e3b78275344b1f40c86e

  3. Both commits: Reorder trailers - move Reviewed-by: Konrad Dybcio before Signed-off-by: lines

  4. Commit 2/2: Verify this patch is still needed if commit 1 is updated to match the actual upstream commit (the upstream commit may already include this change or a different version of it)


Final Summary

  1. Lore link present: Yes — both commits have lore.kernel.org links
  2. Lore link matches PR commits: No — Commit 1/2 links to lore patch 09/14 but contains significantly different code (newer API names, extra struct changes, missing whitespace fix). Commit 2/2 matches its lore link.
  3. Upstream patch status: Patch 09/14 (commit 1) Upstreamed as 94d3305d990b055e1561e3b78275344b1f40c86e on Aug 4, 2026, but the upstream version differs from this PR. Patch 10/14 (commit 2) In review — not yet merged as of Aug 4, 2026.
  4. PR present in qcom-next/topics: Partial — commit 1/2 has partial evidence; commit 2/2 is present in topics branch

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

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] FROMLIST: media: qcom: Switch to generic PAS TZ APIs missing - no subject, patch-id, or full tree-content match found partial - subject or partial tree evidence found, but full change was not verified partial
2/2 [PATCH 2/2] FROMLIST: media: qcom: Pass proper PAS ID to missing - no subject, patch-id, or full tree-content match found present - all checked added lines are present present

Final Status

overall_status: PARTIAL
present_commits: 1/2
partial_commits: 1/2
missing_commits: 0/2
topics_checked_for_commits: 2/2
final_summary: PR present in qcom-next/topics: Partial - 1/2 commit(s) only have partial integration evidence

@qlijarvis

Copy link
Copy Markdown

PR #1651 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 2 commits missing Signed-off-by line
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance Author mismatch on both commits
tag-check Both commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1651 - FROMLIST: media: qcom: Switch to generic PAS TZ APIs
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/31087175640

Checker Result Summary
checkpatch 2 commits missing Signed-off-by line
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance Author mismatch on both commits
tag-check Both commits have valid FROMLIST: prefix

❌ checkpatch

Root cause: Both commits are missing the Signed-off-by: line for the nominal patch author (Priyanka Gujjula).

Failure details:

Commit 47b828760a73 ("FROMLIST: media: qcom: Switch to generic PAS TZ APIs")
ERROR: Missing Signed-off-by: line by nominal patch author 'Priyanka Gujjula <pgujjula@qti.qualcomm.com>'
47b828760a73d13b104c95e3e281f5ed5abd17c3 total: 1 errors, 0 warnings, 0 checks, 149 lines checked

Commit 0e120b58e5cf ("FROMLIST: media: qcom: Pass proper PAS ID to set_remote_state API")
ERROR: Missing Signed-off-by: line by nominal patch author 'Priyanka Gujjula <pgujjula@qti.qualcomm.com>'
0e120b58e5cf78f68a6a53265ac8c39dd5aa4e9f total: 1 errors, 0 warnings, 0 checks, 14 lines checked

Fix: Add Signed-off-by: Priyanka Gujjula <pgujjula@qti.qualcomm.com> to both commits. The commits already have Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com> (the original author), but the person who committed them (Priyanka) must also sign off.

git rebase -i 08795ed36bdc   # mark both commits as 'edit'
# For each commit:
git commit --amend --signoff --no-edit
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 08795ed36bdc..0e120b58e5cf

❌ check-patch-compliance

Root cause: Author mismatch between the original upstream patch author (Sumit Garg) and the commit author in this PR (Priyanka Gujjula).

Failure details:

Checking commit: FROMLIST: media: qcom: Switch to generic PAS TZ APIs
Author mismatch:
  Original author: Sumit Garg <sumit.garg@oss.qualcomm.com>
  Commit author : Priyanka Gujjula <pgujjula@qti.qualcomm.com>

Checking commit: FROMLIST: media: qcom: Pass proper PAS ID to set_remote_state API
Author mismatch:
  Original author: Sumit Garg <sumit.garg@oss.qualcomm.com>
  Commit author : Priyanka Gujjula <pgujjula@qti.qualcomm.com>

Fix: Change the commit author to match the original upstream author. When cherry-picking or applying patches from upstream, preserve the original author.

git rebase -i 08795ed36bdc   # mark both commits as 'edit'
# For each commit:
git commit --amend --author="Sumit Garg <sumit.garg@oss.qualcomm.com>" --no-edit
git rebase --continue

After fixing the author, Priyanka's Signed-off-by: line (added in the checkpatch fix above) will correctly indicate that she applied/committed the patches, while Sumit remains the author.

Reproduce locally:

# Fetch the upstream patch and compare
b4 am --single-message -C -l -3 https://lore.kernel.org/lkml/20260702115835.167602-10-sumit.garg@kernel.org/ -o /tmp/patch1
b4 am --single-message -C -l -3 https://lore.kernel.org/lkml/20260702115835.167602-11-sumit.garg@kernel.org/ -o /tmp/patch2
# Check author field in the mbox files

Verdict

2 blockers must be fixed before merge:

  1. Missing Signed-off-by — Add Priyanka's sign-off to both commits
  2. Author mismatch — Change commit author to Sumit Garg (original upstream author)

Combined fix workflow:

git rebase -i 08795ed36bdc   # mark both commits as 'edit'
# For each commit:
git commit --amend --author="Sumit Garg <sumit.garg@oss.qualcomm.com>" --signoff --no-edit
git rebase --continue

This will:

  • Set the correct author (Sumit Garg)
  • Add Priyanka's Signed-off-by line (indicating she applied the patch)
  • Preserve all existing trailers (Reviewed-by, Tested-by, Link)

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.

2 participants