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>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Subject: Re: [RFC PATCH 06/11] media: iris: Add hooks for pixel and non-pixel context banks
Date: Fri, 10 Jul 2026 12:02:46 +0530 [thread overview]
Message-ID: <409c36d5-d445-4ce3-aa39-34bcb859f74f@oss.qualcomm.com> (raw)
In-Reply-To: <osurkrrhqgkxtgv6lkose2n7ll5f3ofydl2gnjenogtyxaohvm@7ccuyiaeg2nm>
On 7/9/2026 6:44 PM, Dmitry Baryshkov wrote:
> On Thu, Jul 09, 2026 at 06:05:52PM +0530, Vikash Garodia wrote:
>> Iris platforms use separate context-bank devices for the pixel and
>> non-pixel domains. Add platform hooks to create and destroy those
>> subdevices, and wire them up for the affected platforms.
>>
>> 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>
>> ---
>> drivers/media/platform/qcom/iris/Makefile | 1 +
>> .../platform/qcom/iris/iris_platform_sm8550.c | 71 ++++++++++++++++++++++
>> .../platform/qcom/iris/iris_platform_sm8550.h | 24 ++------
>> .../media/platform/qcom/iris/iris_platform_vpu3x.c | 4 ++
>> 4 files changed, 80 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/platform/qcom/iris/Makefile
>> index 48e415cbc4390bc596f6239fefa2a2ad2cd3a2bb..fd6bfe7e786be3f8a4885296fb11ba430ded6fd1 100644
>> --- a/drivers/media/platform/qcom/iris/Makefile
>> +++ b/drivers/media/platform/qcom/iris/Makefile
>> @@ -12,6 +12,7 @@ qcom-iris-objs += iris_buffer.o \
>> iris_hfi_gen2_packet.o \
>> iris_hfi_gen2_response.o \
>> iris_hfi_queue.o \
>> + iris_platform_sm8550.o \
>
> No, it's not a separate platform.
This will be dropped, given that the callback would be made generic for
vpu3x and would be implemented in iris_platform_vpu3x.c
>
>> iris_platform_vpu2.o \
>> iris_platform_vpu3x.o \
>> iris_power.o \
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.c b/drivers/media/platform/qcom/iris/iris_platform_sm8550.c
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..bea904a9249bafe1dfa11ff39155d1930402bf7c
>> --- /dev/null
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.c
>> @@ -0,0 +1,71 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#include "iris_core.h"
>> +#include "iris_platform_common.h"
>> +#include "iris_platform_sm8550.h"
>> +
>> +const char * const sm8550_clk_reset_table[] = { "bus" };
>> +
>> +const struct platform_clk_data sm8550_clk_table[] = {
>> + {IRIS_AXI_CLK, "iface" },
>> + {IRIS_CTRL_CLK, "core" },
>> + {IRIS_HW_CLK, "vcodec0_core" },
>> +};
>> +
>> +struct platform_inst_caps platform_inst_cap_sm8550 = {
>> + .min_frame_width = 96,
>> + .max_frame_width = 8192,
>> + .min_frame_height = 96,
>> + .max_frame_height = 8192,
>> + .max_mbpf = (8192 * 4352) / 256,
>> + .mb_cycles_vpp = 200,
>> + .mb_cycles_fw = 489583,
>> + .mb_cycles_fw_vpp = 66234,
>> + .max_frame_rate = MAXIMUM_FPS,
>> + .max_operating_rate = MAXIMUM_FPS,
>> +};
>> +
>> +static int sm8550_init_cb_devs(struct iris_core *core)
>> +{
>> + struct device *dev;
>> +
>> + dev = iris_create_cb_dev(core, "non-pixel");
>> + if (IS_ERR(dev))
>> + return PTR_ERR(dev);
>> +
>> + core->np_dev = dev;
>> +
>> + dev = iris_create_cb_dev(core, "pixel");
>> + if (IS_ERR(dev))
>> + goto unreg_np_dev;
>> +
>> + core->p_dev = dev;
>> +
>> + return 0;
>> +
>> +unreg_np_dev:
>> + if (core->np_dev)
>> + platform_device_unregister(to_platform_device(core->np_dev));
>> + core->np_dev = NULL;
>> +
>> + return PTR_ERR(dev);
>> +}
>> +
>> +static void sm8550_deinit_cb_devs(struct iris_core *core)
>> +{
>> + if (core->p_dev)
>> + platform_device_unregister(to_platform_device(core->p_dev));
>> + if (core->np_dev)
>> + platform_device_unregister(to_platform_device(core->np_dev));
>> +
>> + core->p_dev = NULL;
>> + core->np_dev = NULL;
>> +}
>> +
>> +const struct iris_context_bank_ops sm8550_cb_ops = {
>
> For a long time I have been asking to fix name prefixes. Now you are
> adding one more. No. Please write it as a rule of thumb. All new symbols
> in the iris driver should start with iris_.
Ack
>
> Moreover, there is nothing sm8550-specific in these hooks. Enable them
> for all VPU3.x platforms uniformly.
Good observation, will change this something like below;
.cb_ops = &vpu3x_cb_ops,
and the callbacks can be added in iris_platform_vpu3x.c
>
>> + .init = sm8550_init_cb_devs,
>> + .deinit = sm8550_deinit_cb_devs,
>> +};
>
Regards,
Vikash
next prev parent reply other threads:[~2026-07-10 6:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7GAZnP6jPoRrcDnaVzeaB98cONLhtvbiEXV1yD5MJJrA9pCnC9lmlSiCGA8vlDezSXADjmFiqo3ZdClO5SxCFA==@protonmail.internalid>
2026-07-09 12:35 ` [RFC PATCH 00/11] : media: iris: Migrate iommus to iris sub nodes Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 01/11] dt-bindings: media: qcom,sm8550-iris: Add vpu " Vikash Garodia
2026-07-09 12:50 ` Dmitry Baryshkov
2026-07-10 6:02 ` Vikash Garodia
2026-07-10 15:53 ` Dmitry Baryshkov
2026-07-11 5:46 ` Vikash Garodia
2026-07-10 22:02 ` Bryan O'Donoghue
2026-07-09 12:35 ` [RFC PATCH 02/11] media: iris: Add hooks to initialize and tear down context banks Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 03/11] media: iris: Add helper to create a context bank device Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 04/11] media: iris: Add helper to select relevant " Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 05/11] media: iris: Skip DMA mask setting to core device when IOMMU is not mapped Vikash Garodia
2026-07-09 13:10 ` Dmitry Baryshkov
2026-07-09 12:35 ` [RFC PATCH 06/11] media: iris: Add hooks for pixel and non-pixel context banks Vikash Garodia
2026-07-09 13:14 ` Dmitry Baryshkov
2026-07-10 6:32 ` Vikash Garodia [this message]
2026-07-10 16:03 ` Dmitry Baryshkov
2026-07-09 12:35 ` [RFC PATCH 07/11] arm64: dts: qcom: hamoa: Move Iris IOMMUs to sub nodes Vikash Garodia
2026-07-09 13:03 ` Dmitry Baryshkov
2026-07-10 6:05 ` Vikash Garodia
2026-07-10 21:05 ` Dmitry Baryshkov
2026-07-10 10:48 ` Bryan O'Donoghue
2026-07-10 22:46 ` Bryan O'Donoghue
2026-07-09 12:35 ` [RFC PATCH 08/11] arm64: dts: qcom: sm8550: Move Iris IOMMUs to child nodes Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 09/11] arm64: dts: qcom: lemans: " Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 10/11] arm64: dts: qcom: monaco: " Vikash Garodia
2026-07-09 12:35 ` [RFC PATCH 11/11] arm64: dts: qcom: sm8650: " Vikash Garodia
2026-07-10 10:35 ` [RFC PATCH 00/11] : media: iris: Migrate iommus to iris sub nodes Bryan O'Donoghue
2026-07-10 13:36 ` Vikash Garodia
2026-07-10 13:38 ` Bryan O'Donoghue
2026-07-10 14:02 ` Vikash Garodia
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=409c36d5-d445-4ce3-aa39-34bcb859f74f@oss.qualcomm.com \
--to=vikash.garodia@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=andersson@kernel.org \
--cc=bod@kernel.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=konradybcio@kernel.org \
--cc=krzk+dt@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 \
/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