Re: [PATCH 08/11] media: iris: don't specify max_channels in the source code

From: Konrad Dybcio

Date: Mon Jan 12 2026 - 06:06:02 EST


On 1/10/26 8:38 PM, Dmitry Baryshkov wrote:
> The UBWC max_channels spreading is specified in the Iris driver, but it
> also can be calculated from the platform UBWC config. Use the platform
> UBWC configuration instead of specifying it directly in the source.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---
> drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 2 +-
> drivers/media/platform/qcom/iris/iris_platform_common.h | 1 -
> drivers/media/platform/qcom/iris/iris_platform_gen2.c | 1 -
> 3 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> index 9945c939cd29..91dbea4c6664 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> @@ -139,7 +139,7 @@ void iris_hfi_gen2_packet_sys_init(struct iris_core *core, struct iris_hfi_heade
> &payload,
> sizeof(u32));
>
> - payload = core->iris_platform_data->ubwc_config->max_channels;
> + payload = ubwc->macrotile_mode ? 8 : 4;

With the hope that this never changes from a boolean

Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>

Konrad