Skip to content

PENDING: media: iris: add context bank support via iommu-map#918

Open
gouravk-qualcomm wants to merge 5 commits intoqualcomm-linux:tech/mm/videofrom
gouravk-qualcomm:cb-iris-lemans
Open

PENDING: media: iris: add context bank support via iommu-map#918
gouravk-qualcomm wants to merge 5 commits intoqualcomm-linux:tech/mm/videofrom
gouravk-qualcomm:cb-iris-lemans

Conversation

@gouravk-qualcomm
Copy link
Copy Markdown

This series adds context bank support to the Qualcomm iris video codec
driver by migrating from the legacy 'iommus' DT property to 'iommu-map',
enabling per-context-bank IOMMU domain management.

Vikash Garodia and others added 5 commits April 9, 2026 00:38
The iris VPU hardware uses multiple IOMMU context banks (CBs) to
partition its virtual address space. Each CB provides an independent
IOVA range, which allows the driver to support a larger number of
concurrent video sessions without exhausting a single shared IOVA space.

Introduce iris_create_cb_dev() to allocate and register each CB device,
and add an init_cb_devs() hook to iris_platform_data so that per-SoC
platform files can create the appropriate set of CB devices with their
corresponding stream ID arrays.

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>
Depending on the buffer type (input, output and internal), associated
context bank is selected, if available. Fallback to parent device for
backward compatibility.

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>
The H265 decoder line buffer size calculation for iris4 (VPU4) was
previously reusing the iris3 formula. While this works for most
resolutions, certain configurations require a larger buffer size on
iris4, causing firmware errors during decode. This resolves firmware
failures seen with specific test vectors on kaanapali (iris4), and fixes
the following failing fluster tests
- PICSIZE_C_Bossen_1
- WPP_E_ericsson_MAIN_2

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>
…source files

Platform-specific data arrays and structs were defined as 'static' in
header files. When a header is included in more than one place, each
gets its own private copy of the data.
Move all such definitions into dedicated per-platform .c files and
replace the in-header definitions with extern declarations.

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>
Switch the iris video codec node in sm8550 (kailua) and sa8775p (lemans)
DTS from the legacy 'iommus' property to 'iommu-map', assigning named
function IDs (IRIS_NON_PIXEL_VCODEC and IRIS_PIXEL) to each SMMU stream
mapping. This allows the driver to look up and attach the correct IOMMU
domain per context bank instead of sharing a single domain.

Add a new dt-bindings header include/dt-bindings/media/qcom,sm8550-iris.h
that defines the two function identifiers so they can be shared between
device-trees and the driver without hard-coded magic numbers.

Wire up sm8550_init_cb_devs() in iris_platform_gen2.c to register the
two child context-bank platform devices (iris_non_pixel and iris_pixel)
using iris_create_cb_dev(), and hook it into the sm8550_data platform
data via the new .init_cb_devs callback.

Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
@gouravk-qualcomm gouravk-qualcomm force-pushed the cb-iris-lemans branch 2 times, most recently from 75b81a5 to b34fde2 Compare April 8, 2026 20:24
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.

1 participant