Re: [PATCH v4 7/8] media: qcom: iris: split firmware_data from raw platform data
From: Dikshita Agarwal
Date: Fri Mar 13 2026 - 04:57:47 EST
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index d1daef2d874b..1a870fec4f31 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -201,45 +201,16 @@ enum platform_pm_domain_type {
> IRIS_APV_HW_POWER_DOMAIN,
> };
>
> -struct iris_platform_data {
> +struct iris_firmware_data {
> void (*init_hfi_ops)(struct iris_core *core);
> +
> u32 (*get_vpu_buffer_size)(struct iris_inst *inst, enum iris_buffer_type buffer_type);
> - const struct vpu_ops *vpu_ops;
> - const struct icc_info *icc_tbl;
> - unsigned int icc_tbl_size;
> - const struct bw_info *bw_tbl_dec;
> - unsigned int bw_tbl_dec_size;
> - const char * const *pmdomain_tbl;
> - unsigned int pmdomain_tbl_size;
> - const char * const *opp_pd_tbl;
> - unsigned int opp_pd_tbl_size;
> - const struct platform_clk_data *clk_tbl;
> - const char * const *opp_clk_tbl;
> - unsigned int clk_tbl_size;
> - const char * const *clk_rst_tbl;
> - unsigned int clk_rst_tbl_size;
> - const char * const *controller_rst_tbl;
> - unsigned int controller_rst_tbl_size;
> - u64 dma_mask;
> - const char *fwname;
> - struct iris_fmt *inst_iris_fmts;
> - u32 inst_iris_fmts_size;
> - struct platform_inst_caps *inst_caps;
> +
> const struct platform_inst_fw_cap *inst_fw_caps_dec;
> u32 inst_fw_caps_dec_size;
> const struct platform_inst_fw_cap *inst_fw_caps_enc;
Thinking further about this split, I see another potential issue here.
Some of the inst_fw_caps are not purely HFI dependent, but also vary with
the VPU architecture. For example, on AR50LT (Agatti), certain capabilities
such as rotation/flip are not supported, even though these platforms still
use HFI Gen2.
With the current approach, handling this would likely require having the
structure in lets say iris_plaform_agatti.h which would be included in both
iris_hfi_gen2.c and iris_platform_ar50lt.c which would lead to duplicate
inclusion, the same concern you raised in kodiak gen2 patches.
How do we tackle this problem?
Thanks,
Dikshita