From: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Stefan Schmidt <stefan.schmidt@linaro.org>,
Hans Verkuil <hverkuil@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux.dev,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: Re: [PATCH v3 7/7] media: iris: add platform data for kaanapali
Date: Sat, 28 Mar 2026 16:51:51 +0530 [thread overview]
Message-ID: <a0d39848-eae3-4aba-95e1-9df923e8772f@oss.qualcomm.com> (raw)
In-Reply-To: <5t3bke2sjkxahn4pjhdpyznbrdmu67u7cfgdfwqgjcgo7cbg2e@4wr2jadk6b7i>
On 3/13/2026 9:16 PM, Dmitry Baryshkov wrote:
> 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@oss.qualcomm.com>
>> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
>> Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
>> ---
>> .../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?
>
thats correct, to handle this, the soc platform data can be defined in
iris_platform_kaanapali.c, and iris_platform_kaanapali.h can extern the
platform data struct which gets included in gen2.c.
Also would have preferred naming the binding abi header
"qcom,kaanapali-iris.h" to something generic so that it can be included
in other platforms, but it seems like the maintainer does not like that
idea.
>> +
>> +#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.
this logic have changed now given that the handling is now 1:1, rather
than multi map case. Maybe..we can revisit this in v4.
Regards,
Vikash
>
>> + },
>> + {
>> + .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
>>
>
prev parent reply other threads:[~2026-03-28 11:22 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:19 [PATCH v3 0/7] media: iris: add support for kaanapali platform Vikash Garodia
2026-03-13 13:19 ` [PATCH v3 1/7] media: dt-bindings: qcom-kaanapali-iris: Add kaanapali video codec binding Vikash Garodia
2026-03-13 15:02 ` Dmitry Baryshkov
2026-03-13 15:16 ` Vikash Garodia
2026-03-13 15:40 ` Dmitry Baryshkov
2026-03-25 15:10 ` Vikash Garodia
2026-03-13 15:34 ` Rob Herring (Arm)
2026-03-13 15:43 ` Krzysztof Kozlowski
2026-03-25 15:10 ` Vikash Garodia
2026-03-13 13:19 ` [PATCH v3 2/7] media: iris: switch to hardware mode after firmware boot Vikash Garodia
2026-03-13 15:38 ` Dmitry Baryshkov
2026-03-24 5:15 ` Dikshita Agarwal
2026-03-25 15:14 ` Vikash Garodia
2026-03-25 15:16 ` Bryan O'Donoghue
2026-03-13 13:19 ` [PATCH v3 3/7] media: iris: add iris vpu bus support and register it with iommu_buses Vikash Garodia
2026-03-13 15:35 ` Dmitry Baryshkov
2026-03-13 13:19 ` [PATCH v3 4/7] media: iris: add context bank devices using iommu-map Vikash Garodia
2026-03-13 15:33 ` Dmitry Baryshkov
2026-03-13 13:19 ` [PATCH v3 5/7] media: iris: add helper to select context bank device Vikash Garodia
2026-03-13 15:41 ` Dmitry Baryshkov
2026-03-13 13:19 ` [PATCH v3 6/7] media: iris: add iris4 specific H265 line buffer calculation Vikash Garodia
2026-03-13 13:19 ` [PATCH v3 7/7] media: iris: add platform data for kaanapali Vikash Garodia
2026-03-13 15:46 ` Dmitry Baryshkov
2026-03-13 15:55 ` Krzysztof Kozlowski
2026-03-28 11:37 ` Vikash Garodia
2026-03-28 11:21 ` Vikash Garodia [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0d39848-eae3-4aba-95e1-9df923e8772f@oss.qualcomm.com \
--to=vikash.garodia@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=busanna.reddy@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=hverkuil+cisco@kernel.org \
--cc=hverkuil@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=saravanak@kernel.org \
--cc=stefan.schmidt@linaro.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox