Re: [PATCH v9 00/11] media: qcom: iris: rework platform data handling
From: Dikshita Agarwal
Date: Thu Mar 26 2026 - 00:38:59 EST
On 3/20/2026 7:24 AM, Dmitry Baryshkov wrote:
> Currently platform data for the iris devices contain a mixture of
> hadware and software description. This seems to work in simple cases,
> but as the driver matures, it leads to strange decisions.
>
> For example, the recent series extending SC7280 support to be able to
> use HFI Gen2 firmware ended up duplicating SC7280 data, using
> SM8550-related structs even though the hardware hasn't changed.
>
> Another example, SM8450 and SM8350 are also simiar cores (and similar to
> the existing SM8250), however SM8450 will have to go to the same file as
> VPU3 cores just because of the firmware interface.
>
> Last, but not least, this leads to a lot of copy-paste duplicates
> between platforms, having similar firmware interfaces. It damages
> readability and complicates adding support for new platforms.
>
> Rework Iris platform data, splitting it into hardware description
> (definied by the GPU core) and HFI Gen-related firmware data.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---
> Changes in v9:
> - Collected missing R-Bs from the previous iterations (sorry, Vikash)
> - Link to v8: https://lore.kernel.org/r/20260319-iris-platform-data-v8-0-55a9566ebf60@xxxxxxxxxxxxxxxx
>
> Changes in v8:
> - Moved core_arch to iris_firmware_data (Dikshita)
> - Made HW_RESPONSE_TIMEOUT_VALUE static (Vikash)
> - Changed firmware name for SM8250
> - Extracted firmware description interface (Dikshita)
> - Link to v7: https://lore.kernel.org/r/20260316-iris-platform-data-v7-0-fc79f003f51c@xxxxxxxxxxxxxxxx
>
> Changes in v7:
> - Fixed build error
> - Link to v6: https://lore.kernel.org/r/20260313-iris-platform-data-v6-0-1763bb837fd2@xxxxxxxxxxxxxxxx
>
> Changes in v6:
> - Moved get_vpu_buffer_size() back to iris_platform_data, it will be
> handled separately, when adding support for Gen2 on Kodiak (Dikshita)
> - Renamed iris_platform_vpu3.c to iris_platform_vpu3x.c (Dikshita)
> - Renamed generic VPU2 and VPU3x constants to stop referencing SM8250
> and SM8550 (Dikshita)
> - Link to v5: https://lore.kernel.org/r/20260313-iris-platform-data-v5-0-180484af4490@xxxxxxxxxxxxxxxx
>
> Changes in v5:
> - Added missing kerneldoc for struct iris_core (Dikshita)
> - Dropped two more unused defines, leftovers from the split
> - Link to v4: https://lore.kernel.org/r/20260313-iris-platform-data-v4-0-14927df4906d@xxxxxxxxxxxxxxxx
>
> Changes in v4:
> - Renamed iris_hfi_gen1_ops instances and related functions to contain
> _sys_ (Dikshita)
> - Link to v3: https://lore.kernel.org/r/20260311-iris-platform-data-v3-0-f02258c4d4ed@xxxxxxxxxxxxxxxx
>
> Changes in v3:
> - Dropped the config_params / subscription_params patches for now,
> let's get more different platforms in first, determining the common
> base and the best way to handle the differences.
> - Dropped set_preset_registers callback, call
> iris_vpu_set_preset_registers() directly (Dikshita)
> - Renamed HFI ops to hfi_sys_ops and hfi_session_ops (Dikshita)
> - Dropped (unused) hfi_response_ops from struct iris_core (Dikshita)
> - Renamed hfi_response_handler and get_instance callbacks to follow
> other hfi_sys_ops callbacks.
> - Link to v2: https://lore.kernel.org/r/20260228-iris-platform-data-v2-0-acf036a3c84c@xxxxxxxxxxxxxxxx
>
> Changes in v2:
> - Fixed build error in the interim patch, the fix sneaked to the wrong
> patch in rebases.
> - Link to v1: https://lore.kernel.org/r/20260228-iris-platform-data-v1-0-c2c53539f948@xxxxxxxxxxxxxxxx
>
> ---
> Dmitry Baryshkov (11):
> media: qcom: iris: drop pas_id from the iris_platform_data struct
> media: qcom: iris: use common set_preset_registers function
> media: qcom: iris: don't use function indirection in gen2-specific code
> media: qcom: iris: split HFI session ops from core ops
> media: qcom: iris: merge hfi_response_ops and hfi_command_ops
> media: qcom: iris: move get_instance to iris_hfi_sys_ops
> media: qcom: iris: drop hw_response_timeout_val from platform data
> media: qcom: iris: split firmware_data from raw platform data
> media: qcom: iris: split platform data from firmware data
> media: qcom: iris: use new firmware name for SM8250
> media: qcom: iris: extract firmware description data
>
> drivers/media/platform/qcom/iris/Makefile | 6 +-
> drivers/media/platform/qcom/iris/iris_buffer.c | 88 ++---
> drivers/media/platform/qcom/iris/iris_common.c | 8 +-
> drivers/media/platform/qcom/iris/iris_core.c | 3 +-
> drivers/media/platform/qcom/iris/iris_core.h | 9 +-
> drivers/media/platform/qcom/iris/iris_ctrls.c | 54 +--
> drivers/media/platform/qcom/iris/iris_firmware.c | 13 +-
> drivers/media/platform/qcom/iris/iris_hfi_common.c | 6 +-
> drivers/media/platform/qcom/iris/iris_hfi_common.h | 13 +-
> .../iris/{iris_platform_gen1.c => iris_hfi_gen1.c} | 168 +--------
> drivers/media/platform/qcom/iris/iris_hfi_gen1.h | 6 +-
> .../platform/qcom/iris/iris_hfi_gen1_command.c | 43 ++-
> .../platform/qcom/iris/iris_hfi_gen1_response.c | 11 +-
> .../iris/{iris_platform_gen2.c => iris_hfi_gen2.c} | 413 +--------------------
> drivers/media/platform/qcom/iris/iris_hfi_gen2.h | 5 +-
> .../platform/qcom/iris/iris_hfi_gen2_command.c | 115 +++---
> .../platform/qcom/iris/iris_hfi_gen2_response.c | 11 +-
> drivers/media/platform/qcom/iris/iris_instance.h | 4 +
> .../platform/qcom/iris/iris_platform_common.h | 95 +++--
> .../platform/qcom/iris/iris_platform_sm8250.h | 29 ++
> .../platform/qcom/iris/iris_platform_sm8550.h | 31 ++
> .../media/platform/qcom/iris/iris_platform_vpu2.c | 132 +++++++
> .../media/platform/qcom/iris/iris_platform_vpu3x.c | 219 +++++++++++
> drivers/media/platform/qcom/iris/iris_probe.c | 5 +-
> drivers/media/platform/qcom/iris/iris_utils.c | 5 +-
> drivers/media/platform/qcom/iris/iris_vb2.c | 2 +-
> drivers/media/platform/qcom/iris/iris_vdec.c | 6 +-
> drivers/media/platform/qcom/iris/iris_venc.c | 4 +-
> drivers/media/platform/qcom/iris/iris_vidc.c | 14 +-
> drivers/media/platform/qcom/iris/iris_vpu_common.c | 11 +-
> drivers/media/platform/qcom/iris/iris_vpu_common.h | 2 +
> 31 files changed, 703 insertions(+), 828 deletions(-)
> ---
> base-commit: 8e5a478b6d6a5bb0a3d52147862b15e4d826af19
> change-id: 20260227-iris-platform-data-c5c80e84d1a7
> prerequisite-change-id: 20251119-venus-iris-flip-switch-d59a3fbc6a4b:v4
> prerequisite-patch-id: 615a763749fdc0c4ee184478bc64120972d8c7a1
> prerequisite-patch-id: 6d85e3db422bc7f16246249288a17b92f6edbc09
> prerequisite-patch-id: 579d712ec3f942ba0c362e242c71361c151092b5
> prerequisite-patch-id: fa4629a3909fbae3917d8c067cce4f673ee857c0
> prerequisite-patch-id: cbbd40736f7a797ff76b0fe2b1ddfb559e14e666
> prerequisite-patch-id: 5b50917dcfef01db13af320cbd1cba15fd5fa16f
> prerequisite-change-id: 20260110-iris-ubwc-06f64cbb31ae:v4
> prerequisite-patch-id: 258496117b2e498200190910a37776be2ced6382
> prerequisite-patch-id: 50f58e5d9c6cd2b520d17a7e7b2e657faa7d0847
> prerequisite-patch-id: af2ff44a7b919da2ee06cc40893fbcd3f65d32f7
> prerequisite-patch-id: f3a2b9ef97be3fa250ea0a6467b2d5a782315aa5
> prerequisite-patch-id: 6bdd2119448e84aacbdc6a54d999d47fc69dac81
> prerequisite-patch-id: 38cc9502c93c71324f1a11a1fd438374fc41ca84
> prerequisite-patch-id: 059d1f35274246575ca4fa9b4ee33cd4801479d1
> prerequisite-patch-id: 1cf4ea774a145cdba617eb8be5c1f7afe5817772
> prerequisite-patch-id: 46375dcd0da4629e6031336351b9cf688691d7c5
> prerequisite-change-id: 20260131-iris-venus-fix-sm8250-f938e29e7497:v5
> prerequisite-patch-id: 6d85e3db422bc7f16246249288a17b92f6edbc09
> prerequisite-patch-id: 579d712ec3f942ba0c362e242c71361c151092b5
> prerequisite-patch-id: fa4629a3909fbae3917d8c067cce4f673ee857c0
> prerequisite-patch-id: cbbd40736f7a797ff76b0fe2b1ddfb559e14e666
> prerequisite-patch-id: 5b50917dcfef01db13af320cbd1cba15fd5fa16f
> prerequisite-patch-id: 8948139735836adb9fbc51d93b969911dc5b38e8
> prerequisite-patch-id: 7ec91bd0149f347c479c906e73cabaa28601ab3d
> prerequisite-patch-id: c711522b63f640b7504767b3af7adc05a0b36cac
> prerequisite-patch-id: 42b9cd5e0fd6fd99eae267c78b239333adff7637
> prerequisite-patch-id: 11c487545e2462ff0a515d689863c3f7f25f9449
>
Could you please fix the depednecies when you send v10 for this?
some patches are not applying cleanly on latest media-committer.
Thanks,
Dikshita
> Best regards,