]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: iris: don't specify ubwc_swizzle in the source code
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sun, 25 Jan 2026 11:30:08 +0000 (13:30 +0200)
committerBryan O'Donoghue <bod@kernel.org>
Sun, 10 May 2026 10:16:54 +0000 (11:16 +0100)
The UBWC swizzle is specified both in the Iris driver and in 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 6dc0cbaa9c1938c9267c03d8a5a660ed97683d7d..a4d9efdbb43bc5ac39bf9af23c82e1ff85fcb1e1 100644 (file)
@@ -170,7 +170,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->bank_swzl_level;
+       payload = !!(qcom_ubwc_swizzle(ubwc) & UBWC_SWIZZLE_ENABLE_LVL1);
        iris_hfi_gen2_create_packet(hdr,
                                    HFI_PROP_UBWC_BANK_SWZL_LEVEL1,
                                    HFI_HOST_FLAGS_NONE,
@@ -180,7 +180,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->bank_swz2_level;
+       payload = !!(qcom_ubwc_swizzle(ubwc) & UBWC_SWIZZLE_ENABLE_LVL2);
        iris_hfi_gen2_create_packet(hdr,
                                    HFI_PROP_UBWC_BANK_SWZL_LEVEL2,
                                    HFI_HOST_FLAGS_NONE,
@@ -190,7 +190,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->bank_swz3_level;
+       payload = !!(qcom_ubwc_swizzle(ubwc) & UBWC_SWIZZLE_ENABLE_LVL3);
        iris_hfi_gen2_create_packet(hdr,
                                    HFI_PROP_UBWC_BANK_SWZL_LEVEL3,
                                    HFI_HOST_FLAGS_NONE,
index 5639eb5a75b6a34fa24aca80f7ad806c9463da93..e217f15ef02864c976f39b6a9d4240143bb3be16 100644 (file)
@@ -77,9 +77,6 @@ struct tz_cp_config {
 
 struct ubwc_config_data {
        u32     max_channels;
-       u32     bank_swzl_level;
-       u32     bank_swz2_level;
-       u32     bank_swz3_level;
        u32     bank_spreading;
 };
 
index bdeb92e0b7bc2334d16c6c452445a59bda5558b4..8072f430bd268a37e0093bb3fe23652a36824d33 100644 (file)
@@ -792,9 +792,6 @@ static const char * const sm8550_opp_clk_table[] = {
 
 static struct ubwc_config_data ubwc_config_sm8550 = {
        .max_channels = 8,
-       .bank_swzl_level = 0,
-       .bank_swz2_level = 1,
-       .bank_swz3_level = 1,
        .bank_spreading = 1,
 };