Re: [PATCH v3 7/7] media: iris: add platform data for kaanapali
From: Dmitry Baryshkov
Date: Fri Mar 13 2026 - 11:53:32 EST
On Fri, Mar 13, 2026 at 06:49:41PM +0530, Vikash Garodia wrote:
> Add support for the kaanapali platform by re-using the SM8550
> definitions and using the vpu4 ops.
> Move the configurations that differs in a per-SoC platform header, that
> will contain SoC specific data.
>
> Co-developed-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> Signed-off-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
> Signed-off-by: Vikash Garodia <vikash.garodia@xxxxxxxxxxxxxxxx>
> ---
> .../platform/qcom/iris/iris_platform_common.h | 1 +
> .../media/platform/qcom/iris/iris_platform_gen2.c | 90 ++++++++++++++++++++++
> .../platform/qcom/iris/iris_platform_kaanapali.h | 83 ++++++++++++++++++++
> drivers/media/platform/qcom/iris/iris_probe.c | 4 +
> 4 files changed, 178 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_kaanapali.h b/drivers/media/platform/qcom/iris/iris_platform_kaanapali.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..bdca1e5bf673353862c1554fb0420f73b3f519cb
> --- /dev/null
> +++ b/drivers/media/platform/qcom/iris/iris_platform_kaanapali.h
> @@ -0,0 +1,83 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#ifndef __IRIS_PLATFORM_KAANAPALI_H__
> +#define __IRIS_PLATFORM_KAANAPALI_H__
> +
> +#include <dt-bindings/media/qcom,kaanapali-iris.h>
So, you are including the bindings here, from the header, which gets
included from the C source file including headers for all the platforms.
What if Kaanapali+1 (or +3) defines different sets of regions?
> +
> +#define VIDEO_REGION_VM0_SECURE_NP_ID 1
> +#define VIDEO_REGION_VM0_NONSECURE_NP_ID 5
> +
> +static const char *const kaanapali_clk_reset_table[] = {
> + "bus0",
> + "bus1",
> + "core",
> + "vcodec0_core",
> +};
> +
> +static const char *const kaanapali_pmdomain_table[] = {
> + "venus",
> + "vcodec0",
> + "vpp0",
> + "vpp1",
> + "apv",
> +};
> +
> +static const struct platform_clk_data kaanapali_clk_table[] = {
> + { IRIS_AXI_CLK, "iface" },
> + { IRIS_CTRL_CLK, "core" },
> + { IRIS_HW_CLK, "vcodec0_core" },
> + { IRIS_AXI1_CLK, "iface1" },
> + { IRIS_CTRL_FREERUN_CLK, "core_freerun" },
> + { IRIS_HW_FREERUN_CLK, "vcodec0_core_freerun" },
> + { IRIS_BSE_HW_CLK, "vcodec_bse" },
> + { IRIS_VPP0_HW_CLK, "vcodec_vpp0" },
> + { IRIS_VPP1_HW_CLK, "vcodec_vpp1" },
> + { IRIS_APV_HW_CLK, "vcodec_apv" },
> +};
> +
> +static const char *const kaanapali_opp_clk_table[] = {
> + "vcodec0_core",
> + "vcodec_apv",
> + "vcodec_bse",
> + "core",
> + NULL,
> +};
> +
> +static struct tz_cp_config tz_cp_config_kaanapali[] = {
> + {
> + .cp_start = VIDEO_REGION_VM0_SECURE_NP_ID,
> + .cp_size = 0,
> + .cp_nonpixel_start = 0x01000000,
> + .cp_nonpixel_size = 0x24800000,
> + },
> + {
> + .cp_start = VIDEO_REGION_VM0_NONSECURE_NP_ID,
> + .cp_size = 0,
> + .cp_nonpixel_start = 0x25800000,
> + .cp_nonpixel_size = 0xda400000,
> + },
> +};
> +
> +static struct iris_context_bank kaanapali_cb_data[] = {
> + {
> + .name = "iris_bitstream",
> + .f_id = IRIS_BITSTREAM,
> + .region_mask = BIT(IRIS_BITSTREAM_REGION),
I'd say, it's really easy to mix IRIS_BITSTREAM and
IRIS_BITSTREAM_REGION when looking at the code, which might be bad
because they are not equal.
> + },
> + {
> + .name = "iris_non_pixel",
> + .f_id = IRIS_NON_PIXEL,
> + .region_mask = BIT(IRIS_NON_PIXEL_REGION),
> + },
> + {
> + .name = "iris_pixel",
> + .f_id = IRIS_PIXEL,
> + .region_mask = BIT(IRIS_PIXEL_REGION),
> + },
> +};
> +
> +#endif /* __IRIS_PLATFORM_KAANAPALI_H__ */
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index 439e6e0fe8adf8287f81d26257ef2a7e9f21e53d..f6d8761daf0471d3aabec21c708445ee7698487b 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -406,6 +406,10 @@ static const struct dev_pm_ops iris_pm_ops = {
> };
>
> static const struct of_device_id iris_dt_match[] = {
> + {
> + .compatible = "qcom,kaanapali-iris",
> + .data = &kaanapali_data,
> + },
> {
> .compatible = "qcom,qcs8300-iris",
> .data = &qcs8300_data,
>
> --
> 2.34.1
>
--
With best wishes
Dmitry