]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: iris: don't specify max_channels in the source code
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sun, 25 Jan 2026 11:30:10 +0000 (13:30 +0200)
committerBryan O'Donoghue <bod@kernel.org>
Sun, 10 May 2026 10:16:54 +0000 (11:16 +0100)
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.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Tested-by: Wangao Wang <wangao.wang@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
drivers/media/platform/qcom/iris/iris_platform_common.h
drivers/media/platform/qcom/iris/iris_platform_gen2.c

index a49394b927685d033d13fe979a4cb216b2ec3eed..0d05dd2afc07d830cc8502ab5f28001312991ba8 100644 (file)
@@ -140,7 +140,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 = qcom_ubwc_macrotile_mode(ubwc) ? 8 : 4;
        iris_hfi_gen2_create_packet(hdr,
                                    HFI_PROP_UBWC_MAX_CHANNELS,
                                    HFI_HOST_FLAGS_NONE,
index 07c58cf3a14a2084f619ce51d3ed996aad21466d..e8b5446dce76f441653ac3132dba122f78ed3cc6 100644 (file)
@@ -76,7 +76,6 @@ struct tz_cp_config {
 };
 
 struct ubwc_config_data {
-       u32     max_channels;
 };
 
 struct platform_inst_caps {
index 4e617176dee4271d3bd331b5e02220b15f0586af..05b1dd11abceb79277a3b0fece0262f95847105d 100644 (file)
@@ -791,7 +791,6 @@ static const char * const sm8550_opp_clk_table[] = {
 };
 
 static struct ubwc_config_data ubwc_config_sm8550 = {
-       .max_channels = 8,
 };
 
 static const struct tz_cp_config tz_cp_config_sm8550[] = {