From: Neil Armstrong <neil.armstrong@linaro.org>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Vikash Garodia <quic_vgarodia@quicinc.com>,
Dikshita Agarwal <quic_dikshita@quicinc.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC v5 1/8] media: qcom: iris: move sm8250 to gen1 catalog
Date: Fri, 11 Apr 2025 15:18:20 +0200 [thread overview]
Message-ID: <9bc74360-a74c-47f4-b8ad-3153bf47ea06@linaro.org> (raw)
In-Reply-To: <a7f41eaa-74d0-42f6-ba80-afa62a521b7e@linaro.org>
On 11/04/2025 13:50, Bryan O'Donoghue wrote:
> On 10/04/2025 17:30, Neil Armstrong wrote:
>> Re-organize the platform support core into a gen1 catalog C file
>> declaring common platform structure and include platform headers
>> containing platform specific entries and iris_platform_data
>> structure.
>>
>> The goal is to share most of the structure while having
>> clear and separate per-SoC catalog files.
>>
>> The organization is based on the current drm/msm dpu1 catalog
>> entries.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>> drivers/media/platform/qcom/iris/Makefile | 2 +-
>> .../media/platform/qcom/iris/iris_catalog_gen1.c | 83 ++++++++++++++++++++++
>> ...ris_platform_sm8250.c => iris_catalog_sm8250.h} | 80 ++-------------------
>> 3 files changed, 89 insertions(+), 76 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/platform/qcom/iris/Makefile
>> index 35390534534e93f4617c1036a05ca0921567ba1d..7e7bc5ca81e0f0119846ccaff7f79fd17b8298ca 100644
>> --- a/drivers/media/platform/qcom/iris/Makefile
>> +++ b/drivers/media/platform/qcom/iris/Makefile
>> @@ -25,7 +25,7 @@ qcom-iris-objs += \
>> iris_vpu_common.o \
>>
>> ifeq ($(CONFIG_VIDEO_QCOM_VENUS),)
>> -qcom-iris-objs += iris_platform_sm8250.o
>> +qcom-iris-objs += iris_catalog_gen1.o
>> endif
>>
>> obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o
>> diff --git a/drivers/media/platform/qcom/iris/iris_catalog_gen1.c b/drivers/media/platform/qcom/iris/iris_catalog_gen1.c
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..c4590f8996431eb5103d45f01c6bee2b38b848c2
>> --- /dev/null
>> +++ b/drivers/media/platform/qcom/iris/iris_catalog_gen1.c
>> @@ -0,0 +1,83 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#include "iris_core.h"
>> +#include "iris_ctrls.h"
>> +#include "iris_platform_common.h"
>> +#include "iris_resources.h"
>> +#include "iris_hfi_gen1.h"
>> +#include "iris_hfi_gen1_defines.h"
>> +#include "iris_vpu_common.h"
>
> Any reason why these aren't alphabetised ?
Copied as-is, I guess the order can be important, especially the iris_core must be first.
Neil
>
> Please do so unless there's some technical reason to have in this order.
>
>> +
>> +/* Common SM8250 & variants */
>> +static struct platform_inst_fw_cap inst_fw_cap_sm8250[] = {
>> + {
>> + .cap_id = PIPE,
>> + .min = PIPE_1,
>> + .max = PIPE_4,
>> + .step_or_mask = 1,
>> + .value = PIPE_4,
>> + .hfi_id = HFI_PROPERTY_PARAM_WORK_ROUTE,
>> + .set = iris_set_pipe,
>> + },
>> + {
>> + .cap_id = STAGE,
>> + .min = STAGE_1,
>> + .max = STAGE_2,
>> + .step_or_mask = 1,
>> + .value = STAGE_2,
>> + .hfi_id = HFI_PROPERTY_PARAM_WORK_MODE,
>> + .set = iris_set_stage,
>> + },
>> + {
>> + .cap_id = DEBLOCK,
>> + .min = 0,
>> + .max = 1,
>> + .step_or_mask = 1,
>> + .value = 0,
>> + .hfi_id = HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER,
>> + .set = iris_set_u32,
>> + },
>> +};
>> +
>> +static struct platform_inst_caps platform_inst_cap_sm8250 = {
>> + .min_frame_width = 128,
>> + .max_frame_width = 8192,
>> + .min_frame_height = 128,
>> + .max_frame_height = 8192,
>> + .max_mbpf = 138240,
>> + .mb_cycles_vsp = 25,
>> + .mb_cycles_vpp = 200,
>> +};
>> +
>> +static struct tz_cp_config tz_cp_config_sm8250 = {
>> + .cp_start = 0,
>> + .cp_size = 0x25800000,
>> + .cp_nonpixel_start = 0x01000000,
>> + .cp_nonpixel_size = 0x24800000,
>> +};
>> +
>> +static const u32 sm8250_vdec_input_config_param_default[] = {
>> + HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE,
>> + HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SELECT,
>> + HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO,
>> + HFI_PROPERTY_PARAM_BUFFER_COUNT_ACTUAL,
>> + HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM,
>> + HFI_PROPERTY_PARAM_FRAME_SIZE,
>> + HFI_PROPERTY_PARAM_BUFFER_SIZE_ACTUAL,
>> + HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE,
>> +};
>> +
>> +static const u32 sm8250_dec_ip_int_buf_tbl[] = {
>> + BUF_BIN,
>> + BUF_SCRATCH_1,
>> +};
>> +
>> +static const u32 sm8250_dec_op_int_buf_tbl[] = {
>> + BUF_DPB,
>> +};
>> +
>> +/* platforms catalogs */
>> +#include "iris_catalog_sm8250.h"
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8250.c b/drivers/media/platform/qcom/iris/iris_catalog_sm8250.h
>> similarity index 59%
>> rename from drivers/media/platform/qcom/iris/iris_platform_sm8250.c
>> rename to drivers/media/platform/qcom/iris/iris_catalog_sm8250.h
>> index 5c86fd7b7b6fd36dc2d57a1705d915308b4c0f92..4d2df669b3e1df2ef2b0d2f88fc5f309b27546db 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_sm8250.c
>> +++ b/drivers/media/platform/qcom/iris/iris_catalog_sm8250.h
>> @@ -1,55 +1,10 @@
>> -// SPDX-License-Identifier: GPL-2.0-only
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> /*
>> * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> */
>>
>> -#include "iris_core.h"
>> -#include "iris_ctrls.h"
>> -#include "iris_platform_common.h"
>> -#include "iris_resources.h"
>> -#include "iris_hfi_gen1.h"
>> -#include "iris_hfi_gen1_defines.h"
>> -#include "iris_vpu_common.h"
>> -
>> -static struct platform_inst_fw_cap inst_fw_cap_sm8250[] = {
>> - {
>> - .cap_id = PIPE,
>> - .min = PIPE_1,
>> - .max = PIPE_4,
>> - .step_or_mask = 1,
>> - .value = PIPE_4,
>> - .hfi_id = HFI_PROPERTY_PARAM_WORK_ROUTE,
>> - .set = iris_set_pipe,
>> - },
>> - {
>> - .cap_id = STAGE,
>> - .min = STAGE_1,
>> - .max = STAGE_2,
>> - .step_or_mask = 1,
>> - .value = STAGE_2,
>> - .hfi_id = HFI_PROPERTY_PARAM_WORK_MODE,
>> - .set = iris_set_stage,
>> - },
>> - {
>> - .cap_id = DEBLOCK,
>> - .min = 0,
>> - .max = 1,
>> - .step_or_mask = 1,
>> - .value = 0,
>> - .hfi_id = HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER,
>> - .set = iris_set_u32,
>> - },
>> -};
>> -
>> -static struct platform_inst_caps platform_inst_cap_sm8250 = {
>> - .min_frame_width = 128,
>> - .max_frame_width = 8192,
>> - .min_frame_height = 128,
>> - .max_frame_height = 8192,
>> - .max_mbpf = 138240,
>> - .mb_cycles_vsp = 25,
>> - .mb_cycles_vpp = 200,
>> -};
>> +#ifndef _IRIS_CATALOG_SM8250_H
>> +#define _IRIS_CATALOG_SM8250_H
>
> __IRIS_CATALOG_SM8250_H__ as with other header guards.
>
>>
>> static void iris_set_sm8250_preset_registers(struct iris_core *core)
>> {
>> @@ -80,33 +35,6 @@ static const struct platform_clk_data sm8250_clk_table[] = {
>> {IRIS_HW_CLK, "vcodec0_core" },
>> };
>>
>> -static struct tz_cp_config tz_cp_config_sm8250 = {
>> - .cp_start = 0,
>> - .cp_size = 0x25800000,
>> - .cp_nonpixel_start = 0x01000000,
>> - .cp_nonpixel_size = 0x24800000,
>> -};
>> -
>> -static const u32 sm8250_vdec_input_config_param_default[] = {
>> - HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE,
>> - HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SELECT,
>> - HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO,
>> - HFI_PROPERTY_PARAM_BUFFER_COUNT_ACTUAL,
>> - HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM,
>> - HFI_PROPERTY_PARAM_FRAME_SIZE,
>> - HFI_PROPERTY_PARAM_BUFFER_SIZE_ACTUAL,
>> - HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE,
>> -};
>> -
>> -static const u32 sm8250_dec_ip_int_buf_tbl[] = {
>> - BUF_BIN,
>> - BUF_SCRATCH_1,
>> -};
>> -
>> -static const u32 sm8250_dec_op_int_buf_tbl[] = {
>> - BUF_DPB,
>> -};
>> -
>> struct iris_platform_data sm8250_data = {
>> .get_instance = iris_hfi_gen1_get_instance,
>> .init_hfi_command_ops = &iris_hfi_gen1_command_ops_init,
>> @@ -147,3 +75,5 @@ struct iris_platform_data sm8250_data = {
>> .dec_op_int_buf_tbl = sm8250_dec_op_int_buf_tbl,
>> .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8250_dec_op_int_buf_tbl),
>> };
>> +
>> +#endif
>>
>> --
>> 2.34.1
>>
>>
> Once done.
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
next prev parent reply other threads:[~2025-04-11 13:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <sSGjuqPKGTjE9al-J0RHMuA3Rk7hIh9x9RMWNefg93pJOOacQodM38LE11xl4vmO1I0OgSZFYR2sblISUxkPeg==@protonmail.internalid>
2025-04-10 16:29 ` [PATCH RFC v5 0/8] media: qcom: iris: re-organize catalog & add support for SM8650 Neil Armstrong
2025-04-10 16:30 ` [PATCH RFC v5 1/8] media: qcom: iris: move sm8250 to gen1 catalog Neil Armstrong
2025-04-10 19:44 ` Dmitry Baryshkov
2025-04-11 8:14 ` Neil Armstrong
2025-04-14 7:39 ` Dmitry Baryshkov
2025-04-14 9:07 ` Neil Armstrong
2025-04-14 9:28 ` Dmitry Baryshkov
2025-04-11 11:50 ` Bryan O'Donoghue
2025-04-11 13:18 ` Neil Armstrong [this message]
2025-04-10 16:30 ` [PATCH RFC v5 2/8] media: qcom: iris: move sm8550 to gen2 catalog Neil Armstrong
2025-04-11 11:52 ` Bryan O'Donoghue
2025-04-10 16:30 ` [PATCH RFC v5 3/8] dt-bindings: media: qcom,sm8550-iris: document SM8650 IRIS accelerator Neil Armstrong
2025-04-10 16:30 ` [PATCH RFC v5 4/8] media: platform: qcom/iris: add power_off_controller to vpu_ops Neil Armstrong
2025-04-10 16:30 ` [PATCH RFC v5 5/8] media: platform: qcom/iris: introduce optional controller_rst_tbl Neil Armstrong
2025-04-10 16:30 ` [PATCH RFC v5 6/8] media: platform: qcom/iris: rename iris_vpu3 to iris_vpu3x Neil Armstrong
2025-04-10 16:30 ` [PATCH RFC v5 7/8] media: platform: qcom/iris: add support for vpu33 Neil Armstrong
2025-04-10 16:30 ` [PATCH RFC v5 8/8] media: platform: qcom/iris: add sm8650 support Neil Armstrong
2025-04-10 19:20 ` Bryan O'Donoghue
2025-04-11 8:11 ` Neil Armstrong
2025-04-11 11:29 ` Bryan O'Donoghue
2025-04-11 11:55 ` [PATCH RFC v5 0/8] media: qcom: iris: re-organize catalog & add support for SM8650 Bryan O'Donoghue
2025-04-11 15:35 ` Bryan O'Donoghue
2025-04-14 7:35 ` Neil Armstrong
2025-04-14 10:54 ` Vikash Garodia
2025-04-14 12:09 ` neil.armstrong
2025-04-14 19:48 ` Vikash Garodia
2025-04-15 8:24 ` neil.armstrong
2025-04-15 11:26 ` Vikash Garodia
2025-04-15 11:55 ` neil.armstrong
2025-04-15 12:02 ` Vikash Garodia
2025-04-14 12:10 ` Dmitry Baryshkov
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=9bc74360-a74c-47f4-b8ad-3153bf47ea06@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.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=p.zabel@pengutronix.de \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
--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
all inboxes | Powered by JetHome®