mbox series

[v6,0/7] media: qcom: iris: add support for SM8650

Message ID 20250415-topic-sm8x50-iris-v10-v6-0-8ad319094055@linaro.org
Headers show
Series media: qcom: iris: add support for SM8650 | expand

Message

Neil Armstrong April 15, 2025, 1:47 p.m. UTC
Add support for the IRIS accelerator for the SM8650
platform, which uses the iris33 hardware.

Sm sm8650 SoC support also reorganizes slighly by renaming
the sm8550 plaform file to gen2, and move soc specific data
into headers.

The vpu33 requires a different reset & poweroff sequence
in order to properly get out of runtime suspend.

Based on the downstream implementation at:
- https://git.codelinaro.org/clo/la/platform/vendor/opensource/video-driver/
  branch video-kernel.lnx.4.0.r4-rel

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v6:
- Removed catalog files, renamed sm8550 soc file to gen2 platform file
- Moved SoC specific into soc specific headers when adding sm8650
- Rebased on next, fixed bindings
- Fixed errors reported by CI
- Link to v5: https://lore.kernel.org/all/20250410-topic-sm8x50-upstream-iris-catalog-v5-0-44a431574c25@linaro.org

Changes in v5:
- Reorganized into catalog, rebased sm8650 support on top
- Link to v4: https://lore.kernel.org/r/20250409-topic-sm8x50-iris-v10-v4-0-40e411594285@linaro.org

Changes in v4:
- collected tags
- un-split power_off in vpu3x
- removed useless function defines
- added back vpu3x disappeared rename commit
- Link to v3: https://lore.kernel.org/r/20250407-topic-sm8x50-iris-v10-v3-0-63569f6d04aa@linaro.org

Changes in v3:
- Collected review tags
- Removed bulky reset_controller ops
- Removed iris_vpu_power_off_controller split
- Link to v2: https://lore.kernel.org/r/20250305-topic-sm8x50-iris-v10-v2-0-bd65a3fc099e@linaro.org

Changes in v2:
- Collected bindings review
- Reworked rest handling by adding a secondary optional table to be used by controller poweroff
- Reworked power_off_controller to be reused and extended by vpu33 support
- Removed useless and unneeded vpu33 init
- Moved vpu33 into vpu3x files to reuse code from vpu3
- Moved sm8650 data table into sm8550
- Link to v1: https://lore.kernel.org/r/20250225-topic-sm8x50-iris-v10-v1-0-128ef05d9665@linaro.org

---
Neil Armstrong (7):
      dt-bindings: media: qcom,sm8550-iris: document SM8650 IRIS accelerator
      media: platform: qcom/iris: add power_off_controller to vpu_ops
      media: platform: qcom/iris: introduce optional controller_rst_tbl
      media: platform: qcom/iris: rename iris_vpu3 to iris_vpu3x
      media: platform: qcom/iris: add support for vpu33
      media: platform: qcom/iris: rename platform_sm8550 to platform_gen2
      media: platform: qcom/iris: add sm8650 support

 .../bindings/media/qcom,sm8550-iris.yaml           |  33 ++-
 drivers/media/platform/qcom/iris/Makefile          |   4 +-
 drivers/media/platform/qcom/iris/iris_core.h       |   2 +
 .../platform/qcom/iris/iris_platform_common.h      |   3 +
 ...iris_platform_sm8550.c => iris_platform_gen2.c} |  65 ++++-
 .../platform/qcom/iris/iris_platform_sm8550.h      |  11 +
 .../platform/qcom/iris/iris_platform_sm8650.h      |  13 +
 drivers/media/platform/qcom/iris/iris_probe.c      |  43 +++-
 drivers/media/platform/qcom/iris/iris_vpu2.c       |   1 +
 drivers/media/platform/qcom/iris/iris_vpu3.c       | 122 ---------
 drivers/media/platform/qcom/iris/iris_vpu3x.c      | 275 +++++++++++++++++++++
 drivers/media/platform/qcom/iris/iris_vpu_common.c |   4 +-
 drivers/media/platform/qcom/iris/iris_vpu_common.h |   3 +
 13 files changed, 434 insertions(+), 145 deletions(-)
---
base-commit: 84e171e5991bc3cb4a71a7755ba93391da22e838
change-id: 20250225-topic-sm8x50-iris-v10-a219b8a8b477

Best regards,

Comments

Dikshita Agarwal April 16, 2025, 10:25 a.m. UTC | #1
On 4/15/2025 7:17 PM, Neil Armstrong wrote:
> Add support for the SM8650 platform by re-using the SM8550
> definitions and using the vpu33 ops.
> 
> Move the reset tables that diffes in a per-SoC platform
> header, that will contain mode SoC specific data when
> more codecs are introduced.
> 
> The SM8650/vpu33 requires more reset lines, but the H.264
> decoder capabilities are identical.
> 
> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e Dell
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
>  .../platform/qcom/iris/iris_platform_common.h      |  1 +
>  .../media/platform/qcom/iris/iris_platform_gen2.c  | 65 +++++++++++++++++++++-
>  .../platform/qcom/iris/iris_platform_sm8550.h      | 11 ++++
>  .../platform/qcom/iris/iris_platform_sm8650.h      | 13 +++++
>  drivers/media/platform/qcom/iris/iris_probe.c      |  4 ++
>  5 files changed, 92 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index fdd40fd80178c4c66b37e392d07a0a62f492f108..6bc3a7975b04d612f6c89206eae95dac678695fc 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -35,6 +35,7 @@ enum pipe_type {
>  
>  extern struct iris_platform_data sm8250_data;
>  extern struct iris_platform_data sm8550_data;
> +extern struct iris_platform_data sm8650_data;
>  
>  enum platform_clk_type {
>  	IRIS_AXI_CLK,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index 35d278996c430f2856d0fe59586930061a271c3e..6d1771bd68689d96b5b9087b0ad32b934f7295ee 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -10,6 +10,9 @@
>  #include "iris_platform_common.h"
>  #include "iris_vpu_common.h"
>  
> +#include "iris_platform_sm8550.h"
> +#include "iris_platform_sm8650.h"
> +
>  #define VIDEO_ARCH_LX 1
>  
>  static struct platform_inst_fw_cap inst_fw_cap_sm8550[] = {
> @@ -142,8 +145,6 @@ static const struct icc_info sm8550_icc_table[] = {
>  	{ "video-mem",  1000, 15000000 },
>  };
>  
> -static const char * const sm8550_clk_reset_table[] = { "bus" };
> -
>  static const struct bw_info sm8550_bw_table_dec[] = {
>  	{ ((4096 * 2160) / 256) * 60, 1608000 },
>  	{ ((4096 * 2160) / 256) * 30,  826000 },
> @@ -264,3 +265,63 @@ struct iris_platform_data sm8550_data = {
>  	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>  	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>  };
> +
> +/*
> + * Shares most of SM8550 data except:
> + * - vpu_ops to iris_vpu33_ops
> + * - clk_rst_tbl to sm8650_clk_reset_table
> + * - controller_rst_tbl to sm8650_controller_reset_table
> + * - fwname to "qcom/vpu/vpu33_p4.mbn"
> + */
> +struct iris_platform_data sm8650_data = {
> +	.get_instance = iris_hfi_gen2_get_instance,
> +	.init_hfi_command_ops = iris_hfi_gen2_command_ops_init,
> +	.init_hfi_response_ops = iris_hfi_gen2_response_ops_init,
> +	.vpu_ops = &iris_vpu33_ops,
> +	.set_preset_registers = iris_set_sm8550_preset_registers,
> +	.icc_tbl = sm8550_icc_table,
> +	.icc_tbl_size = ARRAY_SIZE(sm8550_icc_table),
> +	.clk_rst_tbl = sm8650_clk_reset_table,
> +	.clk_rst_tbl_size = ARRAY_SIZE(sm8650_clk_reset_table),
> +	.controller_rst_tbl = sm8650_controller_reset_table,
> +	.controller_rst_tbl_size = ARRAY_SIZE(sm8650_controller_reset_table),
> +	.bw_tbl_dec = sm8550_bw_table_dec,
> +	.bw_tbl_dec_size = ARRAY_SIZE(sm8550_bw_table_dec),
> +	.pmdomain_tbl = sm8550_pmdomain_table,
> +	.pmdomain_tbl_size = ARRAY_SIZE(sm8550_pmdomain_table),
> +	.opp_pd_tbl = sm8550_opp_pd_table,
> +	.opp_pd_tbl_size = ARRAY_SIZE(sm8550_opp_pd_table),
> +	.clk_tbl = sm8550_clk_table,
> +	.clk_tbl_size = ARRAY_SIZE(sm8550_clk_table),
> +	/* Upper bound of DMA address range */
> +	.dma_mask = 0xe0000000 - 1,
> +	.fwname = "qcom/vpu/vpu33_p4.mbn",
> +	.pas_id = IRIS_PAS_ID,
> +	.inst_caps = &platform_inst_cap_sm8550,
> +	.inst_fw_caps = inst_fw_cap_sm8550,
> +	.inst_fw_caps_size = ARRAY_SIZE(inst_fw_cap_sm8550),
> +	.tz_cp_config_data = &tz_cp_config_sm8550,
> +	.core_arch = VIDEO_ARCH_LX,
> +	.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
> +	.ubwc_config = &ubwc_config_sm8550,
> +	.num_vpp_pipe = 4,
> +	.max_session_count = 16,
> +	.max_core_mbpf = ((8192 * 4352) / 256) * 2,
> +	.input_config_params =
> +		sm8550_vdec_input_config_params,
> +	.input_config_params_size =
> +		ARRAY_SIZE(sm8550_vdec_input_config_params),
> +	.output_config_params =
> +		sm8550_vdec_output_config_params,
> +	.output_config_params_size =
> +		ARRAY_SIZE(sm8550_vdec_output_config_params),
> +	.dec_input_prop = sm8550_vdec_subscribe_input_properties,
> +	.dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties),
> +	.dec_output_prop = sm8550_vdec_subscribe_output_properties,
> +	.dec_output_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_output_properties),
> +
> +	.dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl,
> +	.dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl),
> +	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
> +	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
> +};
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..ac8847edb585e4a9ce6b669a3a5988e7809972af
> --- /dev/null
> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#ifndef __IRIS_PLATFORM_SM8550_H__
> +#define __IRIS_PLATFORM_SM8550_H__
> +
> +static const char * const sm8550_clk_reset_table[] = { "bus" };
> +
> +#endif
There is no need of iris_platform_sm8550.h, you can keep this entry in
gen2.c file itself. As we are making that our base.
You can just have iris_platform_sm8650.h which overrides this entry with
SOC specific reset requirements for SM8650.

Thanks,
Dikshita
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8650.h b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..75e9d572e788de043a56cf85a4cb634bd02226b9
> --- /dev/null
> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
> @@ -0,0 +1,13 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + */
> +
> +#ifndef __IRIS_PLATFORM_SM8650_H__
> +#define __IRIS_PLATFORM_SM8650_H__
> +
> +static const char * const sm8650_clk_reset_table[] = { "bus", "core" };
> +
> +static const char * const sm8650_controller_reset_table[] = { "xo" };
> +
> +#endif
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index 4f8bce6e2002bffee4c93dcaaf6e52bf4e40992e..7cd8650fbe9c09598670530103e3d5edf32953e7 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -345,6 +345,10 @@ static const struct of_device_id iris_dt_match[] = {
>  			.data = &sm8250_data,
>  		},
>  #endif
> +	{
> +		.compatible = "qcom,sm8650-iris",
> +		.data = &sm8650_data,
> +	},
>  	{ },
>  };
>  MODULE_DEVICE_TABLE(of, iris_dt_match);
>
Dmitry Baryshkov April 16, 2025, 11:23 a.m. UTC | #2
On Wed, Apr 16, 2025 at 03:55:35PM +0530, Dikshita Agarwal wrote:
> 
> 
> On 4/15/2025 7:17 PM, Neil Armstrong wrote:
> > Add support for the SM8650 platform by re-using the SM8550
> > definitions and using the vpu33 ops.
> > 
> > Move the reset tables that diffes in a per-SoC platform
> > header, that will contain mode SoC specific data when
> > more codecs are introduced.
> > 
> > The SM8650/vpu33 requires more reset lines, but the H.264
> > decoder capabilities are identical.
> > 
> > Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e Dell
> > Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> > ---
> >  .../platform/qcom/iris/iris_platform_common.h      |  1 +
> >  .../media/platform/qcom/iris/iris_platform_gen2.c  | 65 +++++++++++++++++++++-
> >  .../platform/qcom/iris/iris_platform_sm8550.h      | 11 ++++
> >  .../platform/qcom/iris/iris_platform_sm8650.h      | 13 +++++
> >  drivers/media/platform/qcom/iris/iris_probe.c      |  4 ++
> >  5 files changed, 92 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> > index fdd40fd80178c4c66b37e392d07a0a62f492f108..6bc3a7975b04d612f6c89206eae95dac678695fc 100644
> > --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> > +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> > @@ -35,6 +35,7 @@ enum pipe_type {
> >  
> >  extern struct iris_platform_data sm8250_data;
> >  extern struct iris_platform_data sm8550_data;
> > +extern struct iris_platform_data sm8650_data;
> >  
> >  enum platform_clk_type {
> >  	IRIS_AXI_CLK,
> > diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> > index 35d278996c430f2856d0fe59586930061a271c3e..6d1771bd68689d96b5b9087b0ad32b934f7295ee 100644
> > --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> > +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> > @@ -10,6 +10,9 @@
> >  #include "iris_platform_common.h"
> >  #include "iris_vpu_common.h"
> >  
> > +#include "iris_platform_sm8550.h"
> > +#include "iris_platform_sm8650.h"
> > +
> >  #define VIDEO_ARCH_LX 1
> >  
> >  static struct platform_inst_fw_cap inst_fw_cap_sm8550[] = {
> > @@ -142,8 +145,6 @@ static const struct icc_info sm8550_icc_table[] = {
> >  	{ "video-mem",  1000, 15000000 },
> >  };
> >  
> > -static const char * const sm8550_clk_reset_table[] = { "bus" };
> > -
> >  static const struct bw_info sm8550_bw_table_dec[] = {
> >  	{ ((4096 * 2160) / 256) * 60, 1608000 },
> >  	{ ((4096 * 2160) / 256) * 30,  826000 },
> > @@ -264,3 +265,63 @@ struct iris_platform_data sm8550_data = {
> >  	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
> >  	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
> >  };
> > +
> > +/*
> > + * Shares most of SM8550 data except:
> > + * - vpu_ops to iris_vpu33_ops
> > + * - clk_rst_tbl to sm8650_clk_reset_table
> > + * - controller_rst_tbl to sm8650_controller_reset_table
> > + * - fwname to "qcom/vpu/vpu33_p4.mbn"
> > + */
> > +struct iris_platform_data sm8650_data = {
> > +	.get_instance = iris_hfi_gen2_get_instance,
> > +	.init_hfi_command_ops = iris_hfi_gen2_command_ops_init,
> > +	.init_hfi_response_ops = iris_hfi_gen2_response_ops_init,
> > +	.vpu_ops = &iris_vpu33_ops,
> > +	.set_preset_registers = iris_set_sm8550_preset_registers,
> > +	.icc_tbl = sm8550_icc_table,
> > +	.icc_tbl_size = ARRAY_SIZE(sm8550_icc_table),
> > +	.clk_rst_tbl = sm8650_clk_reset_table,
> > +	.clk_rst_tbl_size = ARRAY_SIZE(sm8650_clk_reset_table),
> > +	.controller_rst_tbl = sm8650_controller_reset_table,
> > +	.controller_rst_tbl_size = ARRAY_SIZE(sm8650_controller_reset_table),
> > +	.bw_tbl_dec = sm8550_bw_table_dec,
> > +	.bw_tbl_dec_size = ARRAY_SIZE(sm8550_bw_table_dec),
> > +	.pmdomain_tbl = sm8550_pmdomain_table,
> > +	.pmdomain_tbl_size = ARRAY_SIZE(sm8550_pmdomain_table),
> > +	.opp_pd_tbl = sm8550_opp_pd_table,
> > +	.opp_pd_tbl_size = ARRAY_SIZE(sm8550_opp_pd_table),
> > +	.clk_tbl = sm8550_clk_table,
> > +	.clk_tbl_size = ARRAY_SIZE(sm8550_clk_table),
> > +	/* Upper bound of DMA address range */
> > +	.dma_mask = 0xe0000000 - 1,
> > +	.fwname = "qcom/vpu/vpu33_p4.mbn",
> > +	.pas_id = IRIS_PAS_ID,
> > +	.inst_caps = &platform_inst_cap_sm8550,
> > +	.inst_fw_caps = inst_fw_cap_sm8550,
> > +	.inst_fw_caps_size = ARRAY_SIZE(inst_fw_cap_sm8550),
> > +	.tz_cp_config_data = &tz_cp_config_sm8550,
> > +	.core_arch = VIDEO_ARCH_LX,
> > +	.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
> > +	.ubwc_config = &ubwc_config_sm8550,
> > +	.num_vpp_pipe = 4,
> > +	.max_session_count = 16,
> > +	.max_core_mbpf = ((8192 * 4352) / 256) * 2,
> > +	.input_config_params =
> > +		sm8550_vdec_input_config_params,
> > +	.input_config_params_size =
> > +		ARRAY_SIZE(sm8550_vdec_input_config_params),
> > +	.output_config_params =
> > +		sm8550_vdec_output_config_params,
> > +	.output_config_params_size =
> > +		ARRAY_SIZE(sm8550_vdec_output_config_params),
> > +	.dec_input_prop = sm8550_vdec_subscribe_input_properties,
> > +	.dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties),
> > +	.dec_output_prop = sm8550_vdec_subscribe_output_properties,
> > +	.dec_output_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_output_properties),
> > +
> > +	.dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl,
> > +	.dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl),
> > +	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
> > +	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
> > +};
> > diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..ac8847edb585e4a9ce6b669a3a5988e7809972af
> > --- /dev/null
> > +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
> > @@ -0,0 +1,11 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> > + */
> > +
> > +#ifndef __IRIS_PLATFORM_SM8550_H__
> > +#define __IRIS_PLATFORM_SM8550_H__
> > +
> > +static const char * const sm8550_clk_reset_table[] = { "bus" };
> > +
> > +#endif
> There is no need of iris_platform_sm8550.h, you can keep this entry in
> gen2.c file itself. As we are making that our base.

That would make it unsymmetrical. I think having a separate header is a
better option.

> You can just have iris_platform_sm8650.h which overrides this entry with
> SOC specific reset requirements for SM8650.
> 
> Thanks,
> Dikshita
> > diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8650.h b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..75e9d572e788de043a56cf85a4cb634bd02226b9
> > --- /dev/null
> > +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
> > @@ -0,0 +1,13 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> > + */
> > +
> > +#ifndef __IRIS_PLATFORM_SM8650_H__
> > +#define __IRIS_PLATFORM_SM8650_H__
> > +
> > +static const char * const sm8650_clk_reset_table[] = { "bus", "core" };
> > +
> > +static const char * const sm8650_controller_reset_table[] = { "xo" };
> > +
> > +#endif
> > diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> > index 4f8bce6e2002bffee4c93dcaaf6e52bf4e40992e..7cd8650fbe9c09598670530103e3d5edf32953e7 100644
> > --- a/drivers/media/platform/qcom/iris/iris_probe.c
> > +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> > @@ -345,6 +345,10 @@ static const struct of_device_id iris_dt_match[] = {
> >  			.data = &sm8250_data,
> >  		},
> >  #endif
> > +	{
> > +		.compatible = "qcom,sm8650-iris",
> > +		.data = &sm8650_data,
> > +	},
> >  	{ },
> >  };
> >  MODULE_DEVICE_TABLE(of, iris_dt_match);
> >
Dikshita Agarwal April 16, 2025, 12:03 p.m. UTC | #3
On 4/16/2025 4:53 PM, Dmitry Baryshkov wrote:
> On Wed, Apr 16, 2025 at 03:55:35PM +0530, Dikshita Agarwal wrote:
>>
>>
>> On 4/15/2025 7:17 PM, Neil Armstrong wrote:
>>> Add support for the SM8650 platform by re-using the SM8550
>>> definitions and using the vpu33 ops.
>>>
>>> Move the reset tables that diffes in a per-SoC platform
>>> header, that will contain mode SoC specific data when
>>> more codecs are introduced.
>>>
>>> The SM8650/vpu33 requires more reset lines, but the H.264
>>> decoder capabilities are identical.
>>>
>>> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e Dell
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>>  .../platform/qcom/iris/iris_platform_common.h      |  1 +
>>>  .../media/platform/qcom/iris/iris_platform_gen2.c  | 65 +++++++++++++++++++++-
>>>  .../platform/qcom/iris/iris_platform_sm8550.h      | 11 ++++
>>>  .../platform/qcom/iris/iris_platform_sm8650.h      | 13 +++++
>>>  drivers/media/platform/qcom/iris/iris_probe.c      |  4 ++
>>>  5 files changed, 92 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> index fdd40fd80178c4c66b37e392d07a0a62f492f108..6bc3a7975b04d612f6c89206eae95dac678695fc 100644
>>> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> @@ -35,6 +35,7 @@ enum pipe_type {
>>>  
>>>  extern struct iris_platform_data sm8250_data;
>>>  extern struct iris_platform_data sm8550_data;
>>> +extern struct iris_platform_data sm8650_data;
>>>  
>>>  enum platform_clk_type {
>>>  	IRIS_AXI_CLK,
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> index 35d278996c430f2856d0fe59586930061a271c3e..6d1771bd68689d96b5b9087b0ad32b934f7295ee 100644
>>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> @@ -10,6 +10,9 @@
>>>  #include "iris_platform_common.h"
>>>  #include "iris_vpu_common.h"
>>>  
>>> +#include "iris_platform_sm8550.h"
>>> +#include "iris_platform_sm8650.h"
>>> +
>>>  #define VIDEO_ARCH_LX 1
>>>  
>>>  static struct platform_inst_fw_cap inst_fw_cap_sm8550[] = {
>>> @@ -142,8 +145,6 @@ static const struct icc_info sm8550_icc_table[] = {
>>>  	{ "video-mem",  1000, 15000000 },
>>>  };
>>>  
>>> -static const char * const sm8550_clk_reset_table[] = { "bus" };
>>> -
>>>  static const struct bw_info sm8550_bw_table_dec[] = {
>>>  	{ ((4096 * 2160) / 256) * 60, 1608000 },
>>>  	{ ((4096 * 2160) / 256) * 30,  826000 },
>>> @@ -264,3 +265,63 @@ struct iris_platform_data sm8550_data = {
>>>  	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>>>  	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>>>  };
>>> +
>>> +/*
>>> + * Shares most of SM8550 data except:
>>> + * - vpu_ops to iris_vpu33_ops
>>> + * - clk_rst_tbl to sm8650_clk_reset_table
>>> + * - controller_rst_tbl to sm8650_controller_reset_table
>>> + * - fwname to "qcom/vpu/vpu33_p4.mbn"
>>> + */
>>> +struct iris_platform_data sm8650_data = {
>>> +	.get_instance = iris_hfi_gen2_get_instance,
>>> +	.init_hfi_command_ops = iris_hfi_gen2_command_ops_init,
>>> +	.init_hfi_response_ops = iris_hfi_gen2_response_ops_init,
>>> +	.vpu_ops = &iris_vpu33_ops,
>>> +	.set_preset_registers = iris_set_sm8550_preset_registers,
>>> +	.icc_tbl = sm8550_icc_table,
>>> +	.icc_tbl_size = ARRAY_SIZE(sm8550_icc_table),
>>> +	.clk_rst_tbl = sm8650_clk_reset_table,
>>> +	.clk_rst_tbl_size = ARRAY_SIZE(sm8650_clk_reset_table),
>>> +	.controller_rst_tbl = sm8650_controller_reset_table,
>>> +	.controller_rst_tbl_size = ARRAY_SIZE(sm8650_controller_reset_table),
>>> +	.bw_tbl_dec = sm8550_bw_table_dec,
>>> +	.bw_tbl_dec_size = ARRAY_SIZE(sm8550_bw_table_dec),
>>> +	.pmdomain_tbl = sm8550_pmdomain_table,
>>> +	.pmdomain_tbl_size = ARRAY_SIZE(sm8550_pmdomain_table),
>>> +	.opp_pd_tbl = sm8550_opp_pd_table,
>>> +	.opp_pd_tbl_size = ARRAY_SIZE(sm8550_opp_pd_table),
>>> +	.clk_tbl = sm8550_clk_table,
>>> +	.clk_tbl_size = ARRAY_SIZE(sm8550_clk_table),
>>> +	/* Upper bound of DMA address range */
>>> +	.dma_mask = 0xe0000000 - 1,
>>> +	.fwname = "qcom/vpu/vpu33_p4.mbn",
>>> +	.pas_id = IRIS_PAS_ID,
>>> +	.inst_caps = &platform_inst_cap_sm8550,
>>> +	.inst_fw_caps = inst_fw_cap_sm8550,
>>> +	.inst_fw_caps_size = ARRAY_SIZE(inst_fw_cap_sm8550),
>>> +	.tz_cp_config_data = &tz_cp_config_sm8550,
>>> +	.core_arch = VIDEO_ARCH_LX,
>>> +	.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
>>> +	.ubwc_config = &ubwc_config_sm8550,
>>> +	.num_vpp_pipe = 4,
>>> +	.max_session_count = 16,
>>> +	.max_core_mbpf = ((8192 * 4352) / 256) * 2,
>>> +	.input_config_params =
>>> +		sm8550_vdec_input_config_params,
>>> +	.input_config_params_size =
>>> +		ARRAY_SIZE(sm8550_vdec_input_config_params),
>>> +	.output_config_params =
>>> +		sm8550_vdec_output_config_params,
>>> +	.output_config_params_size =
>>> +		ARRAY_SIZE(sm8550_vdec_output_config_params),
>>> +	.dec_input_prop = sm8550_vdec_subscribe_input_properties,
>>> +	.dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties),
>>> +	.dec_output_prop = sm8550_vdec_subscribe_output_properties,
>>> +	.dec_output_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_output_properties),
>>> +
>>> +	.dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl,
>>> +	.dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl),
>>> +	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>>> +	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>>> +};
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>>> new file mode 100644
>>> index 0000000000000000000000000000000000000000..ac8847edb585e4a9ce6b669a3a5988e7809972af
>>> --- /dev/null
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>>> @@ -0,0 +1,11 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +/*
>>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +#ifndef __IRIS_PLATFORM_SM8550_H__
>>> +#define __IRIS_PLATFORM_SM8550_H__
>>> +
>>> +static const char * const sm8550_clk_reset_table[] = { "bus" };
>>> +
>>> +#endif
>> There is no need of iris_platform_sm8550.h, you can keep this entry in
>> gen2.c file itself. As we are making that our base.
> 
> That would make it unsymmetrical. I think having a separate header is a
> better option.
> 
It can never by symmetrical anyways.
As we add new SOCs, Some other platform data might differ for that SOC. And
then SOC specific file will have that entry only. We won't be taking out
that table from common and have it in all SOC platform files to make it
symmetrical again.

Thanks,
Dikshita
>> You can just have iris_platform_sm8650.h which overrides this entry with
>> SOC specific reset requirements for SM8650.
>>
>> Thanks,
>> Dikshita
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8650.h b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>>> new file mode 100644
>>> index 0000000000000000000000000000000000000000..75e9d572e788de043a56cf85a4cb634bd02226b9
>>> --- /dev/null
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>>> @@ -0,0 +1,13 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +/*
>>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>>> + */
>>> +
>>> +#ifndef __IRIS_PLATFORM_SM8650_H__
>>> +#define __IRIS_PLATFORM_SM8650_H__
>>> +
>>> +static const char * const sm8650_clk_reset_table[] = { "bus", "core" };
>>> +
>>> +static const char * const sm8650_controller_reset_table[] = { "xo" };
>>> +
>>> +#endif
>>> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
>>> index 4f8bce6e2002bffee4c93dcaaf6e52bf4e40992e..7cd8650fbe9c09598670530103e3d5edf32953e7 100644
>>> --- a/drivers/media/platform/qcom/iris/iris_probe.c
>>> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
>>> @@ -345,6 +345,10 @@ static const struct of_device_id iris_dt_match[] = {
>>>  			.data = &sm8250_data,
>>>  		},
>>>  #endif
>>> +	{
>>> +		.compatible = "qcom,sm8650-iris",
>>> +		.data = &sm8650_data,
>>> +	},
>>>  	{ },
>>>  };
>>>  MODULE_DEVICE_TABLE(of, iris_dt_match);
>>>
>
Neil Armstrong April 17, 2025, 8:50 a.m. UTC | #4
On 16/04/2025 12:25, Dikshita Agarwal wrote:
> 
> 
> On 4/15/2025 7:17 PM, Neil Armstrong wrote:
>> Add support for the SM8650 platform by re-using the SM8550
>> definitions and using the vpu33 ops.
>>
>> Move the reset tables that diffes in a per-SoC platform
>> header, that will contain mode SoC specific data when
>> more codecs are introduced.
>>
>> The SM8650/vpu33 requires more reset lines, but the H.264
>> decoder capabilities are identical.
>>
>> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e Dell
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>>   .../platform/qcom/iris/iris_platform_common.h      |  1 +
>>   .../media/platform/qcom/iris/iris_platform_gen2.c  | 65 +++++++++++++++++++++-
>>   .../platform/qcom/iris/iris_platform_sm8550.h      | 11 ++++
>>   .../platform/qcom/iris/iris_platform_sm8650.h      | 13 +++++
>>   drivers/media/platform/qcom/iris/iris_probe.c      |  4 ++
>>   5 files changed, 92 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
>> index fdd40fd80178c4c66b37e392d07a0a62f492f108..6bc3a7975b04d612f6c89206eae95dac678695fc 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
>> @@ -35,6 +35,7 @@ enum pipe_type {
>>   
>>   extern struct iris_platform_data sm8250_data;
>>   extern struct iris_platform_data sm8550_data;
>> +extern struct iris_platform_data sm8650_data;
>>   
>>   enum platform_clk_type {
>>   	IRIS_AXI_CLK,
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> index 35d278996c430f2856d0fe59586930061a271c3e..6d1771bd68689d96b5b9087b0ad32b934f7295ee 100644
>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>> @@ -10,6 +10,9 @@
>>   #include "iris_platform_common.h"
>>   #include "iris_vpu_common.h"
>>   
>> +#include "iris_platform_sm8550.h"
>> +#include "iris_platform_sm8650.h"
>> +
>>   #define VIDEO_ARCH_LX 1
>>   
>>   static struct platform_inst_fw_cap inst_fw_cap_sm8550[] = {
>> @@ -142,8 +145,6 @@ static const struct icc_info sm8550_icc_table[] = {
>>   	{ "video-mem",  1000, 15000000 },
>>   };
>>   
>> -static const char * const sm8550_clk_reset_table[] = { "bus" };
>> -
>>   static const struct bw_info sm8550_bw_table_dec[] = {
>>   	{ ((4096 * 2160) / 256) * 60, 1608000 },
>>   	{ ((4096 * 2160) / 256) * 30,  826000 },
>> @@ -264,3 +265,63 @@ struct iris_platform_data sm8550_data = {
>>   	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>>   	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>>   };
>> +
>> +/*
>> + * Shares most of SM8550 data except:
>> + * - vpu_ops to iris_vpu33_ops
>> + * - clk_rst_tbl to sm8650_clk_reset_table
>> + * - controller_rst_tbl to sm8650_controller_reset_table
>> + * - fwname to "qcom/vpu/vpu33_p4.mbn"
>> + */
>> +struct iris_platform_data sm8650_data = {
>> +	.get_instance = iris_hfi_gen2_get_instance,
>> +	.init_hfi_command_ops = iris_hfi_gen2_command_ops_init,
>> +	.init_hfi_response_ops = iris_hfi_gen2_response_ops_init,
>> +	.vpu_ops = &iris_vpu33_ops,
>> +	.set_preset_registers = iris_set_sm8550_preset_registers,
>> +	.icc_tbl = sm8550_icc_table,
>> +	.icc_tbl_size = ARRAY_SIZE(sm8550_icc_table),
>> +	.clk_rst_tbl = sm8650_clk_reset_table,
>> +	.clk_rst_tbl_size = ARRAY_SIZE(sm8650_clk_reset_table),
>> +	.controller_rst_tbl = sm8650_controller_reset_table,
>> +	.controller_rst_tbl_size = ARRAY_SIZE(sm8650_controller_reset_table),
>> +	.bw_tbl_dec = sm8550_bw_table_dec,
>> +	.bw_tbl_dec_size = ARRAY_SIZE(sm8550_bw_table_dec),
>> +	.pmdomain_tbl = sm8550_pmdomain_table,
>> +	.pmdomain_tbl_size = ARRAY_SIZE(sm8550_pmdomain_table),
>> +	.opp_pd_tbl = sm8550_opp_pd_table,
>> +	.opp_pd_tbl_size = ARRAY_SIZE(sm8550_opp_pd_table),
>> +	.clk_tbl = sm8550_clk_table,
>> +	.clk_tbl_size = ARRAY_SIZE(sm8550_clk_table),
>> +	/* Upper bound of DMA address range */
>> +	.dma_mask = 0xe0000000 - 1,
>> +	.fwname = "qcom/vpu/vpu33_p4.mbn",
>> +	.pas_id = IRIS_PAS_ID,
>> +	.inst_caps = &platform_inst_cap_sm8550,
>> +	.inst_fw_caps = inst_fw_cap_sm8550,
>> +	.inst_fw_caps_size = ARRAY_SIZE(inst_fw_cap_sm8550),
>> +	.tz_cp_config_data = &tz_cp_config_sm8550,
>> +	.core_arch = VIDEO_ARCH_LX,
>> +	.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
>> +	.ubwc_config = &ubwc_config_sm8550,
>> +	.num_vpp_pipe = 4,
>> +	.max_session_count = 16,
>> +	.max_core_mbpf = ((8192 * 4352) / 256) * 2,
>> +	.input_config_params =
>> +		sm8550_vdec_input_config_params,
>> +	.input_config_params_size =
>> +		ARRAY_SIZE(sm8550_vdec_input_config_params),
>> +	.output_config_params =
>> +		sm8550_vdec_output_config_params,
>> +	.output_config_params_size =
>> +		ARRAY_SIZE(sm8550_vdec_output_config_params),
>> +	.dec_input_prop = sm8550_vdec_subscribe_input_properties,
>> +	.dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties),
>> +	.dec_output_prop = sm8550_vdec_subscribe_output_properties,
>> +	.dec_output_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_output_properties),
>> +
>> +	.dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl,
>> +	.dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl),
>> +	.dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>> +	.dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>> +};
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..ac8847edb585e4a9ce6b669a3a5988e7809972af
>> --- /dev/null
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>> @@ -0,0 +1,11 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +/*
>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#ifndef __IRIS_PLATFORM_SM8550_H__
>> +#define __IRIS_PLATFORM_SM8550_H__
>> +
>> +static const char * const sm8550_clk_reset_table[] = { "bus" };
>> +
>> +#endif
> There is no need of iris_platform_sm8550.h, you can keep this entry in
> gen2.c file itself. As we are making that our base.
> You can just have iris_platform_sm8650.h which overrides this entry with
> SOC specific reset requirements for SM8650.

Ok, so this was requested by Vikash, but it seemed weird, but as Dmitry sais
kind of symmetrical and ok in fact.

But I'll respin without this file if you request it.

neil

> 
> Thanks,
> Dikshita
>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8650.h b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..75e9d572e788de043a56cf85a4cb634bd02226b9
>> --- /dev/null
>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>> @@ -0,0 +1,13 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +/*
>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
>> + */
>> +
>> +#ifndef __IRIS_PLATFORM_SM8650_H__
>> +#define __IRIS_PLATFORM_SM8650_H__
>> +
>> +static const char * const sm8650_clk_reset_table[] = { "bus", "core" };
>> +
>> +static const char * const sm8650_controller_reset_table[] = { "xo" };
>> +
>> +#endif
>> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
>> index 4f8bce6e2002bffee4c93dcaaf6e52bf4e40992e..7cd8650fbe9c09598670530103e3d5edf32953e7 100644
>> --- a/drivers/media/platform/qcom/iris/iris_probe.c
>> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
>> @@ -345,6 +345,10 @@ static const struct of_device_id iris_dt_match[] = {
>>   			.data = &sm8250_data,
>>   		},
>>   #endif
>> +	{
>> +		.compatible = "qcom,sm8650-iris",
>> +		.data = &sm8650_data,
>> +	},
>>   	{ },
>>   };
>>   MODULE_DEVICE_TABLE(of, iris_dt_match);
>>
Vikash Garodia April 17, 2025, 2:06 p.m. UTC | #5
On 4/17/2025 2:20 PM, Neil Armstrong wrote:
> On 16/04/2025 12:25, Dikshita Agarwal wrote:
>>
>>
>> On 4/15/2025 7:17 PM, Neil Armstrong wrote:
>>> Add support for the SM8650 platform by re-using the SM8550
>>> definitions and using the vpu33 ops.
>>>
>>> Move the reset tables that diffes in a per-SoC platform
>>> header, that will contain mode SoC specific data when
>>> more codecs are introduced.
>>>
>>> The SM8650/vpu33 requires more reset lines, but the H.264
>>> decoder capabilities are identical.
>>>
>>> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e Dell
>>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>>> ---
>>>   .../platform/qcom/iris/iris_platform_common.h      |  1 +
>>>   .../media/platform/qcom/iris/iris_platform_gen2.c  | 65 +++++++++++++++++++++-
>>>   .../platform/qcom/iris/iris_platform_sm8550.h      | 11 ++++
>>>   .../platform/qcom/iris/iris_platform_sm8650.h      | 13 +++++
>>>   drivers/media/platform/qcom/iris/iris_probe.c      |  4 ++
>>>   5 files changed, 92 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> b/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> index
>>> fdd40fd80178c4c66b37e392d07a0a62f492f108..6bc3a7975b04d612f6c89206eae95dac678695fc 100644
>>> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
>>> @@ -35,6 +35,7 @@ enum pipe_type {
>>>     extern struct iris_platform_data sm8250_data;
>>>   extern struct iris_platform_data sm8550_data;
>>> +extern struct iris_platform_data sm8650_data;
>>>     enum platform_clk_type {
>>>       IRIS_AXI_CLK,
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> index
>>> 35d278996c430f2856d0fe59586930061a271c3e..6d1771bd68689d96b5b9087b0ad32b934f7295ee 100644
>>> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
>>> @@ -10,6 +10,9 @@
>>>   #include "iris_platform_common.h"
>>>   #include "iris_vpu_common.h"
>>>   +#include "iris_platform_sm8550.h"
>>> +#include "iris_platform_sm8650.h"
>>> +
>>>   #define VIDEO_ARCH_LX 1
>>>     static struct platform_inst_fw_cap inst_fw_cap_sm8550[] = {
>>> @@ -142,8 +145,6 @@ static const struct icc_info sm8550_icc_table[] = {
>>>       { "video-mem",  1000, 15000000 },
>>>   };
>>>   -static const char * const sm8550_clk_reset_table[] = { "bus" };
>>> -
>>>   static const struct bw_info sm8550_bw_table_dec[] = {
>>>       { ((4096 * 2160) / 256) * 60, 1608000 },
>>>       { ((4096 * 2160) / 256) * 30,  826000 },
>>> @@ -264,3 +265,63 @@ struct iris_platform_data sm8550_data = {
>>>       .dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>>>       .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>>>   };
>>> +
>>> +/*
>>> + * Shares most of SM8550 data except:
>>> + * - vpu_ops to iris_vpu33_ops
>>> + * - clk_rst_tbl to sm8650_clk_reset_table
>>> + * - controller_rst_tbl to sm8650_controller_reset_table
>>> + * - fwname to "qcom/vpu/vpu33_p4.mbn"
>>> + */
>>> +struct iris_platform_data sm8650_data = {
>>> +    .get_instance = iris_hfi_gen2_get_instance,
>>> +    .init_hfi_command_ops = iris_hfi_gen2_command_ops_init,
>>> +    .init_hfi_response_ops = iris_hfi_gen2_response_ops_init,
>>> +    .vpu_ops = &iris_vpu33_ops,
>>> +    .set_preset_registers = iris_set_sm8550_preset_registers,
>>> +    .icc_tbl = sm8550_icc_table,
>>> +    .icc_tbl_size = ARRAY_SIZE(sm8550_icc_table),
>>> +    .clk_rst_tbl = sm8650_clk_reset_table,
>>> +    .clk_rst_tbl_size = ARRAY_SIZE(sm8650_clk_reset_table),
>>> +    .controller_rst_tbl = sm8650_controller_reset_table,
>>> +    .controller_rst_tbl_size = ARRAY_SIZE(sm8650_controller_reset_table),
>>> +    .bw_tbl_dec = sm8550_bw_table_dec,
>>> +    .bw_tbl_dec_size = ARRAY_SIZE(sm8550_bw_table_dec),
>>> +    .pmdomain_tbl = sm8550_pmdomain_table,
>>> +    .pmdomain_tbl_size = ARRAY_SIZE(sm8550_pmdomain_table),
>>> +    .opp_pd_tbl = sm8550_opp_pd_table,
>>> +    .opp_pd_tbl_size = ARRAY_SIZE(sm8550_opp_pd_table),
>>> +    .clk_tbl = sm8550_clk_table,
>>> +    .clk_tbl_size = ARRAY_SIZE(sm8550_clk_table),
>>> +    /* Upper bound of DMA address range */
>>> +    .dma_mask = 0xe0000000 - 1,
>>> +    .fwname = "qcom/vpu/vpu33_p4.mbn",
>>> +    .pas_id = IRIS_PAS_ID,
>>> +    .inst_caps = &platform_inst_cap_sm8550,
>>> +    .inst_fw_caps = inst_fw_cap_sm8550,
>>> +    .inst_fw_caps_size = ARRAY_SIZE(inst_fw_cap_sm8550),
>>> +    .tz_cp_config_data = &tz_cp_config_sm8550,
>>> +    .core_arch = VIDEO_ARCH_LX,
>>> +    .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
>>> +    .ubwc_config = &ubwc_config_sm8550,
>>> +    .num_vpp_pipe = 4,
>>> +    .max_session_count = 16,
>>> +    .max_core_mbpf = ((8192 * 4352) / 256) * 2,
>>> +    .input_config_params =
>>> +        sm8550_vdec_input_config_params,
>>> +    .input_config_params_size =
>>> +        ARRAY_SIZE(sm8550_vdec_input_config_params),
>>> +    .output_config_params =
>>> +        sm8550_vdec_output_config_params,
>>> +    .output_config_params_size =
>>> +        ARRAY_SIZE(sm8550_vdec_output_config_params),
>>> +    .dec_input_prop = sm8550_vdec_subscribe_input_properties,
>>> +    .dec_input_prop_size = ARRAY_SIZE(sm8550_vdec_subscribe_input_properties),
>>> +    .dec_output_prop = sm8550_vdec_subscribe_output_properties,
>>> +    .dec_output_prop_size =
>>> ARRAY_SIZE(sm8550_vdec_subscribe_output_properties),
>>> +
>>> +    .dec_ip_int_buf_tbl = sm8550_dec_ip_int_buf_tbl,
>>> +    .dec_ip_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_ip_int_buf_tbl),
>>> +    .dec_op_int_buf_tbl = sm8550_dec_op_int_buf_tbl,
>>> +    .dec_op_int_buf_tbl_size = ARRAY_SIZE(sm8550_dec_op_int_buf_tbl),
>>> +};
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>>> b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>>> new file mode 100644
>>> index
>>> 0000000000000000000000000000000000000000..ac8847edb585e4a9ce6b669a3a5988e7809972af
>>> --- /dev/null
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8550.h
>>> @@ -0,0 +1,11 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +/*
>>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights
>>> reserved.
>>> + */
>>> +
>>> +#ifndef __IRIS_PLATFORM_SM8550_H__
>>> +#define __IRIS_PLATFORM_SM8550_H__
>>> +
>>> +static const char * const sm8550_clk_reset_table[] = { "bus" };
>>> +
>>> +#endif
>> There is no need of iris_platform_sm8550.h, you can keep this entry in
>> gen2.c file itself. As we are making that our base.
>> You can just have iris_platform_sm8650.h which overrides this entry with
>> SOC specific reset requirements for SM8650.
> 
> Ok, so this was requested by Vikash, but it seemed weird, but as Dmitry sais
> kind of symmetrical and ok in fact.
My point was to introduce an header for 8650, never was the plan to introduce
for 8550. We wanted to keep that as base and any other SOC, bringing in delta
would introduce the delta via SOC header.
> 
> But I'll respin without this file if you request it.
Thank you.

Regards,
Vikash
> 
> neil
> 
>>
>> Thanks,
>> Dikshita
>>> diff --git a/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>>> b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>>> new file mode 100644
>>> index
>>> 0000000000000000000000000000000000000000..75e9d572e788de043a56cf85a4cb634bd02226b9
>>> --- /dev/null
>>> +++ b/drivers/media/platform/qcom/iris/iris_platform_sm8650.h
>>> @@ -0,0 +1,13 @@
>>> +/* SPDX-License-Identifier: GPL-2.0-only */
>>> +/*
>>> + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights
>>> reserved.
>>> + */
>>> +
>>> +#ifndef __IRIS_PLATFORM_SM8650_H__
>>> +#define __IRIS_PLATFORM_SM8650_H__
>>> +
>>> +static const char * const sm8650_clk_reset_table[] = { "bus", "core" };
>>> +
>>> +static const char * const sm8650_controller_reset_table[] = { "xo" };
>>> +
>>> +#endif
>>> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c
>>> b/drivers/media/platform/qcom/iris/iris_probe.c
>>> index
>>> 4f8bce6e2002bffee4c93dcaaf6e52bf4e40992e..7cd8650fbe9c09598670530103e3d5edf32953e7 100644
>>> --- a/drivers/media/platform/qcom/iris/iris_probe.c
>>> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
>>> @@ -345,6 +345,10 @@ static const struct of_device_id iris_dt_match[] = {
>>>               .data = &sm8250_data,
>>>           },
>>>   #endif
>>> +    {
>>> +        .compatible = "qcom,sm8650-iris",
>>> +        .data = &sm8650_data,
>>> +    },
>>>       { },
>>>   };
>>>   MODULE_DEVICE_TABLE(of, iris_dt_match);
>>>
>