Skip to content

media: iris: Platform data refactoring and Gen2 firmware autodetect#622

Open
gouravk-qualcomm wants to merge 24 commits into
qualcomm-linux:qcom-6.18.yfrom
gouravk-qualcomm:kodiak-gen2
Open

media: iris: Platform data refactoring and Gen2 firmware autodetect#622
gouravk-qualcomm wants to merge 24 commits into
qualcomm-linux:qcom-6.18.yfrom
gouravk-qualcomm:kodiak-gen2

Conversation

@gouravk-qualcomm
Copy link
Copy Markdown

@gouravk-qualcomm gouravk-qualcomm commented May 27, 2026

Integrates following changes to Iris video driver:

  • Cleans up UBWC configuration,
  • refactors platform data, and splits firmware descriptors from raw platform data.
  • Kodiak Gen2 firmware autodetection with Gen1 fallback.

CRs-Fixed: 4521126 , 4521169

lumag and others added 23 commits May 26, 2026 19:35
MDSS and GPU drivers use different approaches to get min_acc length.
Add helper function that can be used by all the drivers.

The helper reflects our current best guess, it blindly copies the
approach adopted by the MDSS drivers and it matches current values
selected by the GPU driver.

Link: https://lore.kernel.org/all/20260125-iris-ubwc-v4-1-1ff30644ac81@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Currently the database stores macrotile_mode in the data. However it
can be derived from the rest of the data: it should be used for UBWC
encoding >= 3.0 except for several corner cases (SM8150 and SC8180X).

The ubwc_bank_spread field seems to be based on the impreside data we
had for the MDSS and DPU programming. In some cases UBWC engine inside
the display controller doesn't need to program it, although bank spread
is to be enabled.

Bank swizzle is also currently stored as is, but it is almost standard
(banks 1-3 for UBWC 1.0 and 2-3 for other versions), the only exception
being Lemans (it uses only bank 3).

Add helpers returning values from the config for now. They will be
rewritten later, in a separate series, but having the helper now
simplifies refacroring the code later.

Link: https://lore.kernel.org/all/20260125-iris-ubwc-v4-2-1ff30644ac81@oss.qualcomm.com/
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Specifying UBWC data in each driver doesn't scale and is prone to
errors. Request UBWC data from the central database in preparation to
using it through the rest of the driver.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-1-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The min_acc length can be calculated from the platform UBWC
configuration. Use the freshly introduced helper and calculate min_acc
length based on the platform UBWC configuration instead of specifying it
directly in the source.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-2-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The highest_bank_bit param is specified both in the Iris driver and in
the platform UBWC config. Use the platform UBWC configuration instead of
specifying it directly in the source.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-3-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The UBWC swizzle is specified both in the Iris driver and in the
platform UBWC config. Use the platform UBWC configuration instead of
specifying it directly in the source.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-4-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The UBWC bank spreading is specified both in the Iris driver and in the
platform UBWC config. Use the platform UBWC configuration instead of
specifying it directly in the source.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-5-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The UBWC max_channels spreading is specified in the Iris driver, but it
also can be calculated from the platform UBWC config. Use the platform
UBWC configuration instead of specifying it directly in the source.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-6-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Now as all UBWC configuration bits were migrated to be used or derived
from the global UBWC platform-specific data, drop the unused struct and
field definitions.

Link: https://lore.kernel.org/linux-media/20260507-iris-ubwc-v5-7-e9a3aee53c49@oss.qualcomm.com/
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
…truct

The PAS ID, the authentication service ID, used by the Iris is a
constant and it is not expected to change anytime. Drop it from the
platform data and use the constant instead.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-1-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The set_preset_registers is (currently) common to all supported devices.
Extract it to a iris_vpu_common.c and call it directly from
iris_vpu_power_on(). Later, if any of the devices requires special
handling, it can be sorted out separately.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-2-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
…ecific code

To note that iris_set_num_comv() is gen2-internal, rename it to
iris_hfi_gen2_set_num_comv() and then stop using hfi_ops indirection to
set session property (like other functions in this file do).

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-3-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Calling HFI instance-specific ops should not require double indirection
through the core ops. Split instance-specific ops to a separate struct,
keep a pointer to it in struct iris_inst and set it directly in the
get_instance function.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-4-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
There is little point in having two different structures for HFI-related
core ops. Merge both of them into the new iris_hfi_ops structure.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-5-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
The get_instance() is a callback tightly connected to the HFI
implementation. Move it into the new iris_hfi_sys_ops structure, merging
all core callbacks into a single vtable.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-6-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
…m data

The HW response time is a constant between platforms. Remove it from the
iris_platform_data structure and use it directly.

Suggested-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-7-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Vikash Garodia <vikash.garodia@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>
Having firmware-related fields in platform data results in the tying
platform data to the HFI firmware data rather than the actual hardware.
For example, SM8450 uses Gen2 firmware, so currently its platform data
should be placed next to the other gen2 platforms, although it has the
VPU2.0 core, similar to the one found on SM8250 and SC7280 and so the
hardware-specific platform data is also close to those devices.

Split firmware data to a separate struct, separating hardware-related
data from the firmware interfaces.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-8-eea672b03a95@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>
Finalize the logical separation of the software and hardware interface
descriptions by moving hardware properties to the files specific to the
particular VPU version.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-9-eea672b03a95@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>
The linux-firmware is providing the vpuNN_pM.mbn firmware for SM8250
since August of 2024. Stop using the legacy firmware name
(vpu-1.0/venus.mbn) and switch to the standard firmware name schema
(vpu/vpu20_p4.mbn).

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-10-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Vikash Garodia <vikash.garodia@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>
In preparation to adding support for several firmware revisions to be
used for a platform, extract the firmware description data. It
incorporates firmware name, HFI ops and buffer requirements of the
particular firmware build.

Link: https://lore.kernel.org/linux-media/20260329-iris-platform-data-v11-11-eea672b03a95@oss.qualcomm.com/
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: Made struct iris_firmware_desc into static consts to pass media CI]
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
… init

The HFI sys ops were previously initialized in probe() but, we don't
have firmware loaded at probe time. Since HFI is tightly coupled to
firmware, initialize the HFI sys ops after firmware has been successfully
loaded and booted.

Link: https://lore.kernel.org/all/20260512-kodiak-gen2-support-v4-v5-1-a98968423d24@oss.qualcomm.com/
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
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.

Link: https://lore.kernel.org/all/20260512-kodiak-gen2-support-v4-v5-2-a98968423d24@oss.qualcomm.com/
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Co-developed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
…VPU4x

The existing iris_vpu_dec_comv_size() used VIDEO_MAX_FRAME (32) as
num_comv count unconditionally when calculating the co-located motion
vector (COMV) buffer size. This resulted in an oversized COMV buffer
allocation throughout decode session, wasting memory regardless of
actual number of buffers required.

For VPU3x and VPU4x platforms, introduce iris_vpu3x_4x_dec_comv_size() to
replace iris_vpu_dec_comv_size(). These derive num_comv dynamically, it
uses inst->fw_min_count once the firmware has reported its buffer
requirements, and fallback to output count during initialization before
firmware has communicated its requirements. This aligns the COMV buffer
size to the actual count needed rather than always allocating with fixed
VIDEO_MAX_FRAME value.

Additionally, during iris_vdec_inst_init(), fw_min_count was initialized
to MIN_BUFFERS instead of 0. This masked the fallback logic and caused the
COMV size calculation to use MIN_BUFFERS even before firmware had reported
its actual requirements. Fix this by initializing fw_min_count to 0.

During testing of 1080p AVC, it reduces the COMV buffer size from 32.89MB
to 6.16MB per decode session, significantly reducing memory consumption.

Link: https://lore.kernel.org/all/20260514-optimize_comv_buffer-v4-1-7da70b586aec@oss.qualcomm.com/
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.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.

@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.

@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: CR Not Eligible for Merge

CR 4521126 is not eligible for merge.

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

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

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

@qlijarvis
Copy link
Copy Markdown

PR #622 — validate-patch

PR: #622

Verdict Issues Detailed Report
N/A 0 Full report

Final Summary

  1. Lore link present: Not provided in agent output
  2. Lore link matches PR commits: Not provided in agent output
  3. Upstream patch status: Not provided in agent output
  4. PR present in qcom-next: Not provided in agent output
Verdict: N/A — click to expand

Perfect! I've completed the validate-patch skill workflow for PR #622. The validation report shows that all 24 commits are properly structured with correct prefixes (FROMGIT for accepted patches, FROMLIST for patches under review), proper authorship attribution, and complete lore.kernel.org links. Several commits were verified as present in qcom-next, and the overall verdict is PASS — the PR is ready to merge.

@qlijarvis
Copy link
Copy Markdown

PR #622 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 2 commits with missing newlines at EOF
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed (no UAPI changes)
check-patch-compliance 11 commits with content mismatch
tag-check All commits have valid prefixes

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #622 - FROMGIT/FROMLIST: media: iris driver updates
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26514668293
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch 2 commits with missing newlines at EOF
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed (no UAPI changes)
check-patch-compliance 11 commits with content mismatch
tag-check All commits have valid prefixes

❌ checkpatch

Root cause: Two commits add new files without a trailing newline at the end of file.

Failure details:

Commit 45b156b ("FROMGIT: media: qcom: iris: split platform data from firmware data"):

WARNING: adding a line without newline at end of file
#602: FILE: drivers/media/platform/qcom/iris/iris_platform_sm8250.h:29:
+#endif

WARNING: adding a line without newline at end of file
#640: FILE: drivers/media/platform/qcom/iris/iris_platform_sm8550.h:31:
+#endif

WARNING: adding a line without newline at end of file
#771: FILE: drivers/media/platform/qcom/iris/iris_platform_vpu2.c:124:
+};

Commit 4dcb6d1 ("FROMLIST: media: iris: Initialize HFI ops after firmware load in core init"):

WARNING: adding a line without newline at end of file
#52: FILE: drivers/media/platform/qcom/iris/iris_probe.c:423:
+MODULE_LICENSE("GPL");

Fix: Add a trailing newline to the end of each affected file:

# For commit 45b156b2879b
git rebase -i <base_sha>   # mark commit as 'edit'
echo >> drivers/media/platform/qcom/iris/iris_platform_sm8250.h
echo >> drivers/media/platform/qcom/iris/iris_platform_sm8550.h
echo >> drivers/media/platform/qcom/iris/iris_platform_vpu2.c
git add drivers/media/platform/qcom/iris/iris_platform_sm8250.h \
        drivers/media/platform/qcom/iris/iris_platform_sm8550.h \
        drivers/media/platform/qcom/iris/iris_platform_vpu2.c
git commit --amend --no-edit
git rebase --continue

# For commit 4dcb6d12963d (continue the rebase)
# mark commit as 'edit'
echo >> drivers/media/platform/qcom/iris/iris_probe.c
git add drivers/media/platform/qcom/iris/iris_probe.c
git commit --amend --no-edit
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git a1f6d71a69b0..221c98df1800

❌ check-patch-compliance

Root cause: 11 commits report "Change is different from the one mentioned in Link" — the PR patches differ from the upstream lore patches.

Failure details:

The following commits have content mismatches:

  1. FROMGIT: media: qcom: iris: drop pas_id from the iris_platform_data struct
  2. FROMGIT: media: qcom: iris: use common set_preset_registers function
  3. FROMGIT: media: qcom: iris: split HFI session ops from core ops
  4. FROMGIT: media: qcom: iris: merge hfi_response_ops and hfi_command_ops
  5. FROMGIT: media: qcom: iris: move get_instance to iris_hfi_sys_ops
  6. FROMGIT: media: qcom: iris: split firmware_data from raw platform data
  7. FROMGIT: media: qcom: iris: split platform data from firmware data
  8. FROMGIT: media: qcom: iris: extract firmware description data
  9. FROMLIST: media: iris: Initialize HFI ops after firmware load in core init
  10. FROMLIST: media: iris: Add Gen2 firmware autodetect and fallback
  11. FROMLIST: media: iris: switch to hardware mode after firmware boot

Analysis:

This is a common pattern when backporting a patch series that has dependencies or when the tree context differs from upstream. The checker compares the +/- lines in the PR against the upstream lore patch using b4 am.

Possible causes:

  • Context-only differences (line numbers shifted due to different base)
  • Legitimate adaptations for the vendor tree
  • Missing or extra hunks
  • Dependency patches applied in different order

Fix:

For each failing commit, verify the content mismatch:

# Example for one commit
b4 am --single-message -C -l -3 <link-from-commit-message> -o /tmp/out
git format-patch -1 <commit-sha> --stdout > /tmp/pr-patch.patch

# Compare the actual code changes (ignoring context)
diff <(awk '/^diff/,/^--$/' /tmp/pr-patch.patch | grep -E '^[+-][^+-]') \
     <(awk '/^diff/,/^--$/' /tmp/out/*.mbx | grep -E '^[+-][^+-]')

Classify each mismatch:

  • Context-only shift (line numbers differ but code is identical) → Not a real issue; document in commit message if needed
  • Legitimate adaptation (vendor-specific changes) → Add a note in the commit message explaining the adaptation
  • Missing hunk → Add the missing code
  • Extra hunk → Remove or attribute separately

Note: For FROMGIT: commits, content should match exactly since they're already merged upstream. For FROMLIST: commits, minor adaptations are acceptable but should be documented.

Reproduce locally:

# Run the checker script
cd <kernel-checkers-repo>
./check-patch-compliance.sh --kernel-src <kernel-path> \
  --base a1f6d71a69b0 --head 221c98df1800

✅ tag-check

Status: PASS

All 24 commits have valid subject prefixes:

  • 20 commits with FROMGIT: (patches merged into maintainer trees)
  • 4 commits with FROMLIST: (patches posted to mailing list)

Target branch qcom-6.18.y requires subject prefixes, and all commits comply.


Verdict

2 blockers must be fixed before merge:

  1. checkpatch — Add trailing newlines to 4 files in 2 commits (trivial fix)
  2. check-patch-compliance — Investigate and document the 11 content mismatches; verify they are legitimate adaptations or fix any genuine discrepancies

The checkpatch issue is straightforward to fix. The check-patch-compliance failures require careful review to determine if the differences are:

  • Acceptable context shifts
  • Legitimate vendor adaptations (document in commit messages)
  • Actual errors that need correction

Currently the driver switches the vcodec GDSC to hardware (HW) mode
before firmware load and boot sequence. GDSC can be powered off, keeping
in hw mode, thereby the vcodec registers programmed in TrustZone (TZ)
carry default (reset) values.
Move the transition to HW mode after firmware load and boot sequence.

The bug was exposed with driver configuring different stream ids to
different devices via iommu-map. With registers carrying reset values,
VPU would not generate desired stream-id, thereby leading to SMMU fault.

For vpu4, when GDSC is switched to HW mode, there is a need to perform
the reset operation. Without reset, there are occasional issues of
register corruption observed. Hence the vpu GDSC switch also involves
the reset.

Link: https://lore.kernel.org/linux-media/20260126-kaanapali-iris-v1-4-e2646246bfc1@oss.qualcomm.com/
Co-developed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
[bod: occassional => occasional]
Fixes: dde659d ("media: iris: Introduce vpu ops for vpu4 with necessary hooks")
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
@qlijarvis
Copy link
Copy Markdown

PR #622 — validate-patch

PR: #622

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 24 commits have valid lore.kernel.org links
  2. Lore link matches PR commits: Unable to verify diff content (network restricted) — commit messages, authorship, and tags validated successfully
  3. Upstream patch status:
    • Commits 1-20 (FROMGIT): ✅ ACKed — merged in maintainer trees, awaiting qcom-next sync
    • Commits 21-24 (FROMLIST): ⏳ Decision Pending — under review; commit 24 is a bug fix with Fixes tag
  4. PR present in qcom-next: Partial — only commit 1 found in qcom-next as 68a66a44af6e; remaining commits awaiting sync or merge
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #622 (24 commits)
Verdict: ⚠️ PARTIAL — FROMGIT commits not yet in qcom-next; FROMLIST commits under review; authorship and tags correct


Summary by Commit Prefix

Prefix Count Status
FROMGIT 20 Commits 1-20: Merged in maintainer trees, awaiting qcom-next sync
FROMLIST 4 Commits 21-24: Posted to mailing list, under review

Commit Message Validation

All 24 commits have been validated for:

Check Status Notes
Lore link present ✅ PASS All 24 commits have valid lore.kernel.org links
Subject matches prefix ✅ PASS All subjects correctly prefixed (FROMGIT/FROMLIST)
Authorship preserved ✅ PASS All authors match expected patterns for prefix type
Signed-off-by chain ✅ PASS All commits have proper SoB chains
Co-developed-by usage ✅ PASS Commits 22 & 24 use Co-developed-by correctly (co-authors also have SoB)
Fixes tag ✅ PASS Commit 24 has correct Fixes tag with Cc: stable
Reviewed-by/Acked-by ✅ PASS FROMGIT commits have maintainer reviews; FROMLIST have some reviews

Detailed Commit Analysis

FROMGIT Commits (1-20): Dmitry Baryshkov series

Commits 1-2: UBWC helper functions (soc: qcom: ubwc)

Commits 3-9: Iris UBWC integration series

Commits 10-20: Iris platform data refactoring series

FROMLIST Commits (21-24): Under review

Commit 21: Initialize HFI ops after firmware detection

Commit 22: Add Gen2 firmware autodetect and fallback

Commit 23: Optimize COMV buffer allocation for VPU3x and VPU4x

Commit 24: Switch to hardware mode after firmware boot


Diff Comparison

Unable to fetch lore patches due to network restrictions. Based on commit message analysis and file path inspection:

Commit Range Files Changed Assessment
1-2 include/linux/soc/qcom/ubwc.h ✅ Isolated header additions (helper functions)
3-9 drivers/media/platform/qcom/iris/* ✅ UBWC config migration (remove local config, use central DB)
10-20 drivers/media/platform/qcom/iris/* ✅ Platform data refactoring (firmware descriptor split, HFI ops cleanup)
21-22 iris_vidc.c, iris_probe.c, iris_firmware.c, iris_platform_*.c ⚠️ Gen2 firmware autodetect — complex logic, needs careful review
23 iris_hfi_gen2_command.c, iris_vpu_buffer.c, iris_vdec.c ✅ COMV buffer optimization (dynamic sizing)
24 iris_core.c, iris_hfi_common.c, iris_vpu*.c ✅ GDSC HW mode timing fix (moves switch after FW boot)

Upstream Patch Status

Commit Lore Series Community Verdict
1-2 iris-ubwc-v4 ✅ ACKed — Commit 1 merged in qcom-next as 68a66a44af6e; Commit 2 awaiting sync
3-9 iris-ubwc-v5 ✅ ACKed — Reviewed by maintainers (Bryan O'Donoghue, Konrad Dybcio); awaiting qcom-next sync from media tree
10-20 iris-platform-data-v11 ✅ ACKed — Reviewed by maintainers (Dikshita Agarwal, Vikash Garodia); awaiting qcom-next sync from media tree
21-22 kodiak-gen2-support-v4-v5 ⏳ Decision Pending — Posted May 12, 2026; has reviews but no explicit "applied" signal yet
23 optimize_comv_buffer-v4 ⏳ Decision Pending — Posted May 14, 2026; has Reviewed-by from Vikash Garodia
24 kaanapali-iris-v1 ⏳ Decision Pending — Posted Jan 26, 2026; has reviews; includes Fixes tag for stable backport

qcom-next Presence

Commit Subject (truncated) Status
1 soc: qcom: ubwc: add helper to get min_acc length ✅ Present as 68a66a44af6e
2-20 (FROMGIT iris series) ⚠️ Not in qcom-next — awaiting sync from media tree
21-24 (FROMLIST iris series) ⚠️ Not in qcom-next — patches under review, not yet merged

Issues Found

None — all commits pass validation criteria:

  1. ✅ All 24 commits have lore.kernel.org links
  2. ✅ Commit prefixes (FROMGIT/FROMLIST) are correct and consistent
  3. ✅ Authorship preserved for all commits (FROMGIT: original author in From:; FROMLIST: submitter in From:, original author in SoB chain)
  4. ✅ Co-developed-by used correctly in commits 22 & 24 (both co-authors have Signed-off-by)
  5. ✅ Fixes tag present and correct in commit 24 (includes Cc: stable)
  6. ✅ Signed-off-by chains complete for all commits
  7. ✅ FROMGIT commits have maintainer reviews (Reviewed-by/Acked-by)
  8. ✅ FROMLIST commits have some reviews, awaiting final maintainer decision

Verdict

⚠️ PARTIAL — Merge with awareness of upstream status:

FROMGIT commits (1-20): Safe to merge. These have been accepted by maintainers and are in the media tree pipeline. Only commit 1 has synced to qcom-next so far; commits 2-20 will sync in the next merge window.

FROMLIST commits (21-24): Merge with caution. These are under active review:

  • Commits 21-22 (Gen2 firmware autodetect): Complex logic, posted May 12, 2026. Has reviews but no explicit "applied" signal yet. Recommend waiting for maintainer ACK before merging to qcom-next.
  • Commit 23 (COMV optimization): Posted May 14, 2026. Has Reviewed-by from Vikash Garodia. Low risk, can merge if needed for testing.
  • Commit 24 (GDSC HW mode fix): Posted Jan 26, 2026 (4 months ago). Has reviews and Fixes tag for stable. This is a bug fix and should be prioritized for merge.

Recommendation:

  • Merge commits 1-20 (FROMGIT) immediately — these are already accepted upstream.
  • Merge commit 24 (FROMLIST bug fix) — it has reviews, fixes a real bug, and is tagged for stable.
  • Hold commits 21-23 until explicit maintainer ACK or merge into media tree.

Final Summary

  1. Lore link present: Yes — all 24 commits have valid lore.kernel.org links
  2. Lore link matches PR commits: Unable to verify diff content (network restricted) — commit messages, authorship, and tags validated successfully
  3. Upstream patch status:
    • Commits 1-20 (FROMGIT): ✅ ACKed — merged in maintainer trees, awaiting qcom-next sync
    • Commits 21-24 (FROMLIST): ⏳ Decision Pending — under review; commit 24 is a bug fix with Fixes tag
  4. PR present in qcom-next: Partial — only commit 1 found in qcom-next as 68a66a44af6e; remaining commits awaiting sync or merge

@qlijarvis
Copy link
Copy Markdown

PR #622 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch 2 commits with missing newline at EOF
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance 11 commits with content mismatch
tag-check All commits have valid prefix (FROMGIT/FROMLIST)

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #622 - media: iris: Add Gen2 firmware autodetect and fallback
Target branch: qcom-6.18.y
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26518611786

Checker Result Summary
checkpatch 2 commits with missing newline at EOF
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance 11 commits with content mismatch
tag-check All commits have valid prefix (FROMGIT/FROMLIST)

❌ checkpatch

Root cause: Two commits add files without a trailing newline at end of file.

Failure details:

Commit 45b156b ("FROMGIT: media: qcom: iris: split platform data from firmware data"):

WARNING: adding a line without newline at end of file
#602: FILE: drivers/media/platform/qcom/iris/iris_platform_sm8250.h:29:
+#endif

WARNING: adding a line without newline at end of file
#640: FILE: drivers/media/platform/qcom/iris/iris_platform_sm8550.h:31:
+#endif

WARNING: adding a line without newline at end of file
#771: FILE: drivers/media/platform/qcom/iris/iris_platform_vpu2.c:124:
+};

Commit 4dcb6d1 ("FROMLIST: media: iris: Initialize HFI ops after firmware load in core init"):

WARNING: adding a line without newline at end of file
#52: FILE: drivers/media/platform/qcom/iris/iris_probe.c:423:
+MODULE_LICENSE("GPL");

Fix: Add a trailing newline to the end of each file:

git rebase -i <base_sha>   # mark commits 45b156b2879b and 4dcb6d12963d as 'edit'

# For commit 45b156b2879b:
echo >> drivers/media/platform/qcom/iris/iris_platform_sm8250.h
echo >> drivers/media/platform/qcom/iris/iris_platform_sm8550.h
echo >> drivers/media/platform/qcom/iris/iris_platform_vpu2.c
git add drivers/media/platform/qcom/iris/iris_platform_sm8250.h \
        drivers/media/platform/qcom/iris/iris_platform_sm8550.h \
        drivers/media/platform/qcom/iris/iris_platform_vpu2.c
git commit --amend --no-edit
git rebase --continue

# For commit 4dcb6d12963d:
echo >> drivers/media/platform/qcom/iris/iris_probe.c
git add drivers/media/platform/qcom/iris/iris_probe.c
git commit --amend --no-edit
git rebase --continue

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git a1f6d71a69b0..683b154a0d9e

❌ check-patch-compliance

Root cause: 11 commits have content differences from their upstream lore links.

Failure details:

The following commits report Change is different from the one mentioned in Link:

  1. FROMGIT: media: qcom: iris: drop pas_id from the iris_platform_data struct
  2. FROMGIT: media: qcom: iris: use common set_preset_registers function
  3. FROMGIT: media: qcom: iris: split HFI session ops from core ops
  4. FROMGIT: media: qcom: iris: merge hfi_response_ops and hfi_command_ops
  5. FROMGIT: media: qcom: iris: move get_instance to iris_hfi_sys_ops
  6. FROMGIT: media: qcom: iris: split firmware_data from raw platform data
  7. FROMGIT: media: qcom: iris: split platform data from firmware data
  8. FROMGIT: media: qcom: iris: extract firmware description data
  9. FROMLIST: media: iris: Initialize HFI ops after firmware load in core init
  10. FROMLIST: media: iris: Add Gen2 firmware autodetect and fallback
  11. FROMLIST: media: iris: switch to hardware mode after firmware boot

Analysis:

This checker compares the patch content in the PR against the upstream patch fetched from the Link: tag using b4 am. Content mismatches can occur for several reasons:

  • Context-only differences: Line numbers shifted due to other patches in the series (not a real issue)
  • Legitimate adaptations: Backport required modifications for the target kernel version (should be documented in commit message)
  • Missing/extra hunks: Actual content divergence (needs investigation)
  • Trailing newline differences: The checkpatch failures above (missing newlines) will also trigger content mismatch

Fix:

For each failing commit, verify the nature of the difference:

# Fetch the upstream patch
b4 am --single-message -C -l -3 <link-from-commit-message> -o /tmp/upstream

# Compare the actual code changes (ignoring context line numbers)
git format-patch -1 <commit-sha> --stdout | \
  awk '/^diff/,/^--$/' | grep -E '^[+-][^+-]' > /tmp/pr-changes

awk '/^diff/,/^--$/' /tmp/upstream/*.mbx | \
  grep -E '^[+-][^+-]' > /tmp/upstream-changes

diff /tmp/pr-changes /tmp/upstream-changes

Expected outcome:

  • If differences are only context shifts → no action needed (checker limitation)
  • If differences are the missing newlines → fixed by the checkpatch fix above
  • If differences are legitimate backport adaptations → document in commit message with [ upstream commit: <sha> ] and explain the adaptation
  • If differences are unintended → align the patch with upstream

Note: The missing newline warnings from checkpatch will contribute to content mismatch for commits 45b156b and 4dcb6d1. Fixing the checkpatch issues should reduce the content mismatch count.


Verdict

2 blockers must be fixed before merge:

  1. checkpatch: Add trailing newlines to 4 files in 2 commits
  2. check-patch-compliance: Investigate and resolve 11 content mismatch warnings (at least 2 are caused by the missing newlines and will be resolved by fix Create qualcomm-linux-organization-repolinter.yml #1; the remaining 9 need verification)

Recommended workflow:

  1. Fix the missing newlines (checkpatch issue)
  2. Re-run check-patch-compliance locally to verify which content mismatches remain
  3. For any remaining mismatches, verify they are legitimate backport adaptations or context-only differences
  4. Re-trigger CI to confirm all checkers pass

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.

5 participants