]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: iris: don't specify min_acc_length in the source code
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Sun, 25 Jan 2026 11:30:06 +0000 (13:30 +0200)
committerBryan O'Donoghue <bod@kernel.org>
Sun, 10 May 2026 10:16:54 +0000 (11:16 +0100)
The min_acc length can be calculated from the platform UBWC
configuration. Use the freshly introduced helper and calculate min_acc
length based on the platform UBWC configuration instead of specifying it
directly in the source.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 d77fa29f44fc64e0e69551d7343d3342a1480c5e..aa4520b277391666f01338facfb060fdbf63d112 100644 (file)
@@ -3,6 +3,9 @@
  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
+#include <linux/printk.h>
+#include <linux/soc/qcom/ubwc.h>
+
 #include "iris_hfi_common.h"
 #include "iris_hfi_gen2.h"
 #include "iris_hfi_gen2_packet.h"
@@ -120,6 +123,7 @@ static void iris_hfi_gen2_create_packet(struct iris_hfi_header *hdr, u32 pkt_typ
 
 void iris_hfi_gen2_packet_sys_init(struct iris_core *core, struct iris_hfi_header *hdr)
 {
+       const struct qcom_ubwc_cfg_data *ubwc = core->ubwc_cfg;
        u32 payload = 0;
 
        iris_hfi_gen2_create_header(hdr, 0, core->header_id++);
@@ -146,7 +150,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->mal_length;
+       payload = qcom_ubwc_min_acc_length_64b(ubwc) ? 64 : 32;
        iris_hfi_gen2_create_packet(hdr,
                                    HFI_PROP_UBWC_MAL_LENGTH,
                                    HFI_HOST_FLAGS_NONE,
index 5a489917580eb10022fdcb52f7321a915e8b239d..08a9529e599b011abae002935a83935a7f085028 100644 (file)
@@ -77,7 +77,6 @@ struct tz_cp_config {
 
 struct ubwc_config_data {
        u32     max_channels;
-       u32     mal_length;
        u32     highest_bank_bit;
        u32     bank_swzl_level;
        u32     bank_swz2_level;
index 5da90d47f9c6eab4a7e6b17841fdc0e599397bf7..01c6ffa7e084d3e309d0118ee6677b6bca0ec5d2 100644 (file)
@@ -792,7 +792,6 @@ static const char * const sm8550_opp_clk_table[] = {
 
 static struct ubwc_config_data ubwc_config_sm8550 = {
        .max_channels = 8,
-       .mal_length = 32,
        .highest_bank_bit = 16,
        .bank_swzl_level = 0,
        .bank_swz2_level = 1,