* [PATCH 00/11] media: iris: migrate to using global UBWC config
@ 2026-01-10 19:37 Dmitry Baryshkov
2026-01-10 19:37 ` [PATCH 01/11] soc: qcom: ubwc: add missing include Dmitry Baryshkov
` (11 more replies)
0 siblings, 12 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
Having UBWC configuration in the driver is error prone. For example, the
driver specifies fixed values for HBB, while the actual value might
depend on the DDR type. Stop defining UBWC data in the iris driver and
use the global UBWC configuration registry.
Merge strategy: either merge SoC bits directly through the media tree
(with Bjorn's ack) or merge to the media tree through the immutable tag.
The drm patches will follow depending on the way the SoC patches are
merged.
Note: the patches are compile-tested only because of the lack of the
Gen2 hardware at hand.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
Dmitry Baryshkov (11):
soc: qcom: ubwc: add missing include
soc: qcom: ubwc: add helper to get min_acc length
media: iris: retrieve UBWC platform configuration
media: iris: don't specify min_acc_length in the source code
media: iris: don't specify highest_bank_bit in the source code
media: iris: don't specify ubwc_swizzle in the source code
media: iris: don't specify bank_spreading in the source code
media: iris: don't specify max_channels in the source code
media: iris: drop remnants of UBWC configuration
drm/msm/mdss: use new helper to set min_acc length
drm/msm/a6xx: use new helper to set min_acc length
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++---
drivers/gpu/drm/msm/msm_mdss.c | 6 ++----
drivers/media/platform/qcom/iris/Kconfig | 1 +
drivers/media/platform/qcom/iris/iris_core.h | 4 ++++
drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 17 ++++++++++-------
drivers/media/platform/qcom/iris/iris_platform_common.h | 11 -----------
drivers/media/platform/qcom/iris/iris_platform_gen2.c | 14 --------------
drivers/media/platform/qcom/iris/iris_probe.c | 5 +++++
include/linux/soc/qcom/ubwc.h | 8 ++++++++
9 files changed, 32 insertions(+), 39 deletions(-)
---
base-commit: fc4e91c639c0af93d63c3d5bc0ee45515dd7504a
change-id: 20260110-iris-ubwc-06f64cbb31ae
Best regards,
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 37+ messages in thread
* [PATCH 01/11] soc: qcom: ubwc: add missing include
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 20:58 ` Bryan O'Donoghue
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
` (10 subsequent siblings)
11 siblings, 1 reply; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
The header has a function which calls pr_err(). Don't require users of
the header to include <linux/printk.h> and include it here.
Fixes: 87cfc79dcd60 ("drm/msm/a6xx: Resolve the meaning of UBWC_MODE")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
include/linux/soc/qcom/ubwc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index 0a4edfe3d96d..f052e241736c 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -8,6 +8,7 @@
#define __QCOM_UBWC_H__
#include <linux/bits.h>
+#include <linux/printk.h>
#include <linux/types.h>
struct qcom_ubwc_cfg_data {
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
2026-01-10 19:37 ` [PATCH 01/11] soc: qcom: ubwc: add missing include Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 21:03 ` Bryan O'Donoghue
` (3 more replies)
2026-01-10 19:37 ` [PATCH 03/11] media: iris: retrieve UBWC platform configuration Dmitry Baryshkov
` (9 subsequent siblings)
11 siblings, 4 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
MDSS and GPU drivers use different approaches to get min_acc length.
Add helper function that can be used by all the drivers.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
include/linux/soc/qcom/ubwc.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
index f052e241736c..50d891493ac8 100644
--- a/include/linux/soc/qcom/ubwc.h
+++ b/include/linux/soc/qcom/ubwc.h
@@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
return ret;
}
+static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
+{
+ return cfg->ubwc_enc_version == UBWC_1_0 &&
+ (cfg->ubwc_dec_version == UBWC_2_0 ||
+ cfg->ubwc_dec_version == UBWC_3_0);
+}
+
#endif /* __QCOM_UBWC_H__ */
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 03/11] media: iris: retrieve UBWC platform configuration
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
2026-01-10 19:37 ` [PATCH 01/11] soc: qcom: ubwc: add missing include Dmitry Baryshkov
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 21:01 ` Bryan O'Donoghue
2026-01-10 19:37 ` [PATCH 04/11] media: iris: don't specify min_acc_length in the source code Dmitry Baryshkov
` (8 subsequent siblings)
11 siblings, 1 reply; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
Specifying UBWC data in each driver doesn't scale and is prone to
errors. Request UBWC data from the central database in preparation to
using it through the rest of the driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/Kconfig | 1 +
drivers/media/platform/qcom/iris/iris_core.h | 4 ++++
drivers/media/platform/qcom/iris/iris_probe.c | 5 +++++
3 files changed, 10 insertions(+)
diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platform/qcom/iris/Kconfig
index 3c803a05305a..39b06de6c3e6 100644
--- a/drivers/media/platform/qcom/iris/Kconfig
+++ b/drivers/media/platform/qcom/iris/Kconfig
@@ -5,6 +5,7 @@ config VIDEO_QCOM_IRIS
select V4L2_MEM2MEM_DEV
select QCOM_MDT_LOADER if ARCH_QCOM
select QCOM_SCM
+ select QCOM_UBWC_CONFIG
select VIDEOBUF2_DMA_CONTIG
help
This is a V4L2 driver for Qualcomm iris video accelerator
diff --git a/drivers/media/platform/qcom/iris/iris_core.h b/drivers/media/platform/qcom/iris/iris_core.h
index fb194c967ad4..d10a03aa5685 100644
--- a/drivers/media/platform/qcom/iris/iris_core.h
+++ b/drivers/media/platform/qcom/iris/iris_core.h
@@ -30,6 +30,8 @@ enum domain_type {
DECODER = BIT(1),
};
+struct qcom_ubwc_cfg_data;
+
/**
* struct iris_core - holds core parameters valid for all instances
*
@@ -52,6 +54,7 @@ enum domain_type {
* @resets: table of iris reset clocks
* @controller_resets: table of controller reset clocks
* @iris_platform_data: a structure for platform data
+ * @ubwc_cfg: UBWC configuration for the platform
* @state: current state of core
* @iface_q_table_daddr: device address for interface queue table memory
* @sfr_daddr: device address for SFR (Sub System Failure Reason) register memory
@@ -95,6 +98,7 @@ struct iris_core {
struct reset_control_bulk_data *resets;
struct reset_control_bulk_data *controller_resets;
const struct iris_platform_data *iris_platform_data;
+ const struct qcom_ubwc_cfg_data *ubwc_cfg;
enum iris_core_state state;
dma_addr_t iface_q_table_daddr;
dma_addr_t sfr_daddr;
diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
index 9bc9b34c2576..85e531b35ecf 100644
--- a/drivers/media/platform/qcom/iris/iris_probe.c
+++ b/drivers/media/platform/qcom/iris/iris_probe.c
@@ -10,6 +10,7 @@
#include <linux/pm_opp.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
+#include <linux/soc/qcom/ubwc.h>
#include "iris_core.h"
#include "iris_ctrls.h"
@@ -248,6 +249,10 @@ static int iris_probe(struct platform_device *pdev)
core->iris_platform_data = of_device_get_match_data(core->dev);
+ core->ubwc_cfg = qcom_ubwc_config_get_data();
+ if (IS_ERR(core->ubwc_cfg))
+ return PTR_ERR(core->ubwc_cfg);
+
ret = devm_request_threaded_irq(core->dev, core->irq, iris_hfi_isr,
iris_hfi_isr_handler, IRQF_TRIGGER_HIGH, "iris", core);
if (ret)
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 04/11] media: iris: don't specify min_acc_length in the source code
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (2 preceding siblings ...)
2026-01-10 19:37 ` [PATCH 03/11] media: iris: retrieve UBWC platform configuration Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 21:06 ` Bryan O'Donoghue
2026-01-10 19:37 ` [PATCH 05/11] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
` (7 subsequent siblings)
11 siblings, 1 reply; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
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.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 5 ++++-
drivers/media/platform/qcom/iris/iris_platform_common.h | 1 -
drivers/media/platform/qcom/iris/iris_platform_gen2.c | 1 -
3 files changed, 4 insertions(+), 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 d77fa29f44fc..878e61aa77c3 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
@@ -3,6 +3,8 @@
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
+#include <linux/soc/qcom/ubwc.h>
+
#include "iris_hfi_common.h"
#include "iris_hfi_gen2.h"
#include "iris_hfi_gen2_packet.h"
@@ -120,6 +122,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 +149,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,
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index 8d8cdb56a3c7..3c5f3f68b722 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -73,7 +73,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;
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index c1989240c248..c70cfc2fc553 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -633,7 +633,6 @@ static const struct platform_clk_data sm8550_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,
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 05/11] media: iris: don't specify highest_bank_bit in the source code
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (3 preceding siblings ...)
2026-01-10 19:37 ` [PATCH 04/11] media: iris: don't specify min_acc_length in the source code Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 21:07 ` Bryan O'Donoghue
2026-01-12 11:02 ` Konrad Dybcio
2026-01-10 19:37 ` [PATCH 06/11] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
` (6 subsequent siblings)
11 siblings, 2 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
The highest_bank_bit param 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.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
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 878e61aa77c3..a4e60e9d32a4 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
@@ -159,7 +159,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->highest_bank_bit;
+ payload = ubwc->highest_bank_bit;
iris_hfi_gen2_create_packet(hdr,
HFI_PROP_UBWC_HBB,
HFI_HOST_FLAGS_NONE,
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index 3c5f3f68b722..8421711dbe60 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -73,7 +73,6 @@ struct tz_cp_config {
struct ubwc_config_data {
u32 max_channels;
- u32 highest_bank_bit;
u32 bank_swzl_level;
u32 bank_swz2_level;
u32 bank_swz3_level;
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index c70cfc2fc553..5ae996d19ffd 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -633,7 +633,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
static struct ubwc_config_data ubwc_config_sm8550 = {
.max_channels = 8,
- .highest_bank_bit = 16,
.bank_swzl_level = 0,
.bank_swz2_level = 1,
.bank_swz3_level = 1,
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 06/11] media: iris: don't specify ubwc_swizzle in the source code
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (4 preceding siblings ...)
2026-01-10 19:37 ` [PATCH 05/11] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 21:08 ` Bryan O'Donoghue
2026-01-12 11:03 ` Konrad Dybcio
2026-01-10 19:37 ` [PATCH 07/11] media: iris: don't specify bank_spreading " Dmitry Baryshkov
` (5 subsequent siblings)
11 siblings, 2 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
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.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 6 +++---
drivers/media/platform/qcom/iris/iris_platform_common.h | 3 ---
drivers/media/platform/qcom/iris/iris_platform_gen2.c | 3 ---
3 files changed, 3 insertions(+), 9 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 a4e60e9d32a4..a880751107c7 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
@@ -169,7 +169,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 = !!(ubwc->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL1);
iris_hfi_gen2_create_packet(hdr,
HFI_PROP_UBWC_BANK_SWZL_LEVEL1,
HFI_HOST_FLAGS_NONE,
@@ -179,7 +179,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 = !!(ubwc->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL2);
iris_hfi_gen2_create_packet(hdr,
HFI_PROP_UBWC_BANK_SWZL_LEVEL2,
HFI_HOST_FLAGS_NONE,
@@ -189,7 +189,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 = !!(ubwc->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL3);
iris_hfi_gen2_create_packet(hdr,
HFI_PROP_UBWC_BANK_SWZL_LEVEL3,
HFI_HOST_FLAGS_NONE,
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index 8421711dbe60..9f9ee67e4732 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -73,9 +73,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;
};
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index 5ae996d19ffd..0f06066d814a 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -633,9 +633,6 @@ static const struct platform_clk_data sm8550_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,
};
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 07/11] media: iris: don't specify bank_spreading in the source code
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (5 preceding siblings ...)
2026-01-10 19:37 ` [PATCH 06/11] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
@ 2026-01-10 19:37 ` Dmitry Baryshkov
2026-01-11 21:09 ` Bryan O'Donoghue
2026-01-12 11:03 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 08/11] media: iris: don't specify max_channels " Dmitry Baryshkov
` (4 subsequent siblings)
11 siblings, 2 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:37 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
The UBWC bank spreading 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.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
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 a880751107c7..9945c939cd29 100644
--- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
+++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
@@ -199,7 +199,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_spreading;
+ payload = ubwc->ubwc_bank_spread;
iris_hfi_gen2_create_packet(hdr,
HFI_PROP_UBWC_BANK_SPREADING,
HFI_HOST_FLAGS_NONE,
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index 9f9ee67e4732..f99fcbb8fced 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -73,7 +73,6 @@ struct tz_cp_config {
struct ubwc_config_data {
u32 max_channels;
- u32 bank_spreading;
};
struct platform_inst_caps {
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index 0f06066d814a..c967db452dec 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -633,7 +633,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
static struct ubwc_config_data ubwc_config_sm8550 = {
.max_channels = 8,
- .bank_spreading = 1,
};
static struct tz_cp_config tz_cp_config_sm8550 = {
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 08/11] media: iris: don't specify max_channels in the source code
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (6 preceding siblings ...)
2026-01-10 19:37 ` [PATCH 07/11] media: iris: don't specify bank_spreading " Dmitry Baryshkov
@ 2026-01-10 19:38 ` Dmitry Baryshkov
2026-01-11 21:09 ` Bryan O'Donoghue
2026-01-12 11:05 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 09/11] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
` (3 subsequent siblings)
11 siblings, 2 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:38 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
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@oss.qualcomm.com>
---
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;
iris_hfi_gen2_create_packet(hdr,
HFI_PROP_UBWC_MAX_CHANNELS,
HFI_HOST_FLAGS_NONE,
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index f99fcbb8fced..4abaf4615cea 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -72,7 +72,6 @@ struct tz_cp_config {
};
struct ubwc_config_data {
- u32 max_channels;
};
struct platform_inst_caps {
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index c967db452dec..e78cda7e307d 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -632,7 +632,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
};
static struct ubwc_config_data ubwc_config_sm8550 = {
- .max_channels = 8,
};
static struct tz_cp_config tz_cp_config_sm8550 = {
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 09/11] media: iris: drop remnants of UBWC configuration
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (7 preceding siblings ...)
2026-01-10 19:38 ` [PATCH 08/11] media: iris: don't specify max_channels " Dmitry Baryshkov
@ 2026-01-10 19:38 ` Dmitry Baryshkov
2026-01-11 21:10 ` Bryan O'Donoghue
2026-01-12 11:06 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 10/11] drm/msm/mdss: use new helper to set min_acc length Dmitry Baryshkov
` (2 subsequent siblings)
11 siblings, 2 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:38 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
Now as all UBWC configuration bits were migrated to be used or derived
from the global UBWC platform-specific data, drop the unused struct and
field definitions.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/media/platform/qcom/iris/iris_platform_common.h | 4 ----
drivers/media/platform/qcom/iris/iris_platform_gen2.c | 7 -------
2 files changed, 11 deletions(-)
diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
index 4abaf4615cea..3b0e9e3cfecb 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_common.h
+++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
@@ -71,9 +71,6 @@ struct tz_cp_config {
u32 cp_nonpixel_size;
};
-struct ubwc_config_data {
-};
-
struct platform_inst_caps {
u32 min_frame_width;
u32 max_frame_width;
@@ -218,7 +215,6 @@ struct iris_platform_data {
struct tz_cp_config *tz_cp_config_data;
u32 core_arch;
u32 hw_response_timeout;
- struct ubwc_config_data *ubwc_config;
u32 num_vpp_pipe;
bool no_aon;
u32 max_session_count;
diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
index e78cda7e307d..5c4f108c14a2 100644
--- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
+++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
@@ -631,9 +631,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
{IRIS_HW_CLK, "vcodec0_core" },
};
-static struct ubwc_config_data ubwc_config_sm8550 = {
-};
-
static struct tz_cp_config tz_cp_config_sm8550 = {
.cp_start = 0,
.cp_size = 0x25800000,
@@ -760,7 +757,6 @@ const struct iris_platform_data sm8550_data = {
.tz_cp_config_data = &tz_cp_config_sm8550,
.core_arch = VIDEO_ARCH_LX,
.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
- .ubwc_config = &ubwc_config_sm8550,
.num_vpp_pipe = 4,
.max_session_count = 16,
.max_core_mbpf = NUM_MBS_8K * 2,
@@ -852,7 +848,6 @@ const struct iris_platform_data sm8650_data = {
.tz_cp_config_data = &tz_cp_config_sm8550,
.core_arch = VIDEO_ARCH_LX,
.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
- .ubwc_config = &ubwc_config_sm8550,
.num_vpp_pipe = 4,
.max_session_count = 16,
.max_core_mbpf = NUM_MBS_8K * 2,
@@ -934,7 +929,6 @@ const struct iris_platform_data sm8750_data = {
.tz_cp_config_data = &tz_cp_config_sm8550,
.core_arch = VIDEO_ARCH_LX,
.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
- .ubwc_config = &ubwc_config_sm8550,
.num_vpp_pipe = 4,
.max_session_count = 16,
.max_core_mbpf = NUM_MBS_8K * 2,
@@ -1020,7 +1014,6 @@ const struct iris_platform_data qcs8300_data = {
.tz_cp_config_data = &tz_cp_config_sm8550,
.core_arch = VIDEO_ARCH_LX,
.hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
- .ubwc_config = &ubwc_config_sm8550,
.num_vpp_pipe = 2,
.max_session_count = 16,
.max_core_mbpf = ((4096 * 2176) / 256) * 4,
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 10/11] drm/msm/mdss: use new helper to set min_acc length
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (8 preceding siblings ...)
2026-01-10 19:38 ` [PATCH 09/11] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
@ 2026-01-10 19:38 ` Dmitry Baryshkov
2026-01-12 11:08 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 11/11] drm/msm/a6xx: " Dmitry Baryshkov
2026-01-15 3:00 ` (subset) [PATCH 00/11] media: iris: migrate to using global UBWC config Bjorn Andersson
11 siblings, 1 reply; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:38 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
Use freshly defined helper instead of hardcoding the checks in the
driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/gpu/drm/msm/msm_mdss.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c
index bf9a33e925ac..da266753df69 100644
--- a/drivers/gpu/drm/msm/msm_mdss.c
+++ b/drivers/gpu/drm/msm/msm_mdss.c
@@ -175,8 +175,7 @@ static void msm_mdss_setup_ubwc_dec_20(struct msm_mdss *msm_mdss)
if (data->ubwc_bank_spread)
value |= MDSS_UBWC_STATIC_UBWC_BANK_SPREAD;
- if (data->ubwc_enc_version == UBWC_1_0)
- value |= MDSS_UBWC_STATIC_UBWC_MIN_ACC_LEN(1);
+ value |= MDSS_UBWC_STATIC_UBWC_MIN_ACC_LEN(qcom_ubwc_min_acc_length_64b(data));
writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC);
}
@@ -193,8 +192,7 @@ static void msm_mdss_setup_ubwc_dec_30(struct msm_mdss *msm_mdss)
if (data->ubwc_enc_version == UBWC_3_0)
value |= MDSS_UBWC_STATIC_UBWC_AMSBC;
- if (data->ubwc_enc_version == UBWC_1_0)
- value |= MDSS_UBWC_STATIC_UBWC_MIN_ACC_LEN(1);
+ value |= MDSS_UBWC_STATIC_UBWC_MIN_ACC_LEN(qcom_ubwc_min_acc_length_64b(data));
writel_relaxed(value, msm_mdss->mmio + REG_MDSS_UBWC_STATIC);
}
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* [PATCH 11/11] drm/msm/a6xx: use new helper to set min_acc length
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (9 preceding siblings ...)
2026-01-10 19:38 ` [PATCH 10/11] drm/msm/mdss: use new helper to set min_acc length Dmitry Baryshkov
@ 2026-01-10 19:38 ` Dmitry Baryshkov
2026-01-12 11:07 ` Konrad Dybcio
2026-01-15 3:00 ` (subset) [PATCH 00/11] media: iris: migrate to using global UBWC config Bjorn Andersson
11 siblings, 1 reply; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-10 19:38 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
Use freshly defined helper instead of hardcoding the checks in the
driver.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 2129d230a92b..04de4d598da0 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -820,7 +820,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
u32 level2_swizzling_dis = !(cfg->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL2);
bool ubwc_mode = qcom_ubwc_get_ubwc_mode(cfg);
bool amsbc = cfg->ubwc_enc_version >= UBWC_3_0;
- bool min_acc_len_64b = false;
+ bool min_acc_len_64b;
u8 uavflagprd_inv = 0;
u32 hbb_hi = hbb >> 2;
u32 hbb_lo = hbb & 3;
@@ -828,8 +828,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)
if (adreno_is_a650_family(adreno_gpu) || adreno_is_a7xx(adreno_gpu))
uavflagprd_inv = 2;
- if (adreno_is_a610(adreno_gpu) || adreno_is_a702(adreno_gpu))
- min_acc_len_64b = true;
+ min_acc_len_64b = qcom_ubwc_min_acc_length_64b(cfg);
gpu_write(gpu, REG_A6XX_RB_NC_MODE_CNTL,
level2_swizzling_dis << 12 |
--
2.47.3
^ permalink raw reply related [flat|nested] 37+ messages in thread
* Re: [PATCH 01/11] soc: qcom: ubwc: add missing include
2026-01-10 19:37 ` [PATCH 01/11] soc: qcom: ubwc: add missing include Dmitry Baryshkov
@ 2026-01-11 20:58 ` Bryan O'Donoghue
0 siblings, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 20:58 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> The header has a function which calls pr_err(). Don't require users of
> the header to include <linux/printk.h> and include it here.
>
> Fixes: 87cfc79dcd60 ("drm/msm/a6xx: Resolve the meaning of UBWC_MODE")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> include/linux/soc/qcom/ubwc.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index 0a4edfe3d96d..f052e241736c 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -8,6 +8,7 @@
> #define __QCOM_UBWC_H__
>
> #include <linux/bits.h>
> +#include <linux/printk.h>
> #include <linux/types.h>
>
> struct qcom_ubwc_cfg_data {
>
> --
> 2.47.3
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 03/11] media: iris: retrieve UBWC platform configuration
2026-01-10 19:37 ` [PATCH 03/11] media: iris: retrieve UBWC platform configuration Dmitry Baryshkov
@ 2026-01-11 21:01 ` Bryan O'Donoghue
0 siblings, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:01 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> Specifying UBWC data in each driver doesn't scale and is prone to
> errors. Request UBWC data from the central database in preparation to
> using it through the rest of the driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/Kconfig | 1 +
> drivers/media/platform/qcom/iris/iris_core.h | 4 ++++
> drivers/media/platform/qcom/iris/iris_probe.c | 5 +++++
> 3 files changed, 10 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/Kconfig b/drivers/media/platform/qcom/iris/Kconfig
> index 3c803a05305a..39b06de6c3e6 100644
> --- a/drivers/media/platform/qcom/iris/Kconfig
> +++ b/drivers/media/platform/qcom/iris/Kconfig
> @@ -5,6 +5,7 @@ config VIDEO_QCOM_IRIS
> select V4L2_MEM2MEM_DEV
> select QCOM_MDT_LOADER if ARCH_QCOM
> select QCOM_SCM
> + select QCOM_UBWC_CONFIG
> select VIDEOBUF2_DMA_CONTIG
> help
> This is a V4L2 driver for Qualcomm iris video accelerator
> diff --git a/drivers/media/platform/qcom/iris/iris_core.h b/drivers/media/platform/qcom/iris/iris_core.h
> index fb194c967ad4..d10a03aa5685 100644
> --- a/drivers/media/platform/qcom/iris/iris_core.h
> +++ b/drivers/media/platform/qcom/iris/iris_core.h
> @@ -30,6 +30,8 @@ enum domain_type {
> DECODER = BIT(1),
> };
>
> +struct qcom_ubwc_cfg_data;
> +
> /**
> * struct iris_core - holds core parameters valid for all instances
> *
> @@ -52,6 +54,7 @@ enum domain_type {
> * @resets: table of iris reset clocks
> * @controller_resets: table of controller reset clocks
> * @iris_platform_data: a structure for platform data
> + * @ubwc_cfg: UBWC configuration for the platform
> * @state: current state of core
> * @iface_q_table_daddr: device address for interface queue table memory
> * @sfr_daddr: device address for SFR (Sub System Failure Reason) register memory
> @@ -95,6 +98,7 @@ struct iris_core {
> struct reset_control_bulk_data *resets;
> struct reset_control_bulk_data *controller_resets;
> const struct iris_platform_data *iris_platform_data;
> + const struct qcom_ubwc_cfg_data *ubwc_cfg;
> enum iris_core_state state;
> dma_addr_t iface_q_table_daddr;
> dma_addr_t sfr_daddr;
> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
> index 9bc9b34c2576..85e531b35ecf 100644
> --- a/drivers/media/platform/qcom/iris/iris_probe.c
> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
> @@ -10,6 +10,7 @@
> #include <linux/pm_opp.h>
> #include <linux/pm_runtime.h>
> #include <linux/reset.h>
> +#include <linux/soc/qcom/ubwc.h>
>
> #include "iris_core.h"
> #include "iris_ctrls.h"
> @@ -248,6 +249,10 @@ static int iris_probe(struct platform_device *pdev)
>
> core->iris_platform_data = of_device_get_match_data(core->dev);
>
> + core->ubwc_cfg = qcom_ubwc_config_get_data();
> + if (IS_ERR(core->ubwc_cfg))
> + return PTR_ERR(core->ubwc_cfg);
> +
> ret = devm_request_threaded_irq(core->dev, core->irq, iris_hfi_isr,
> iris_hfi_isr_handler, IRQF_TRIGGER_HIGH, "iris", core);
> if (ret)
>
> --
> 2.47.3
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
@ 2026-01-11 21:03 ` Bryan O'Donoghue
2026-01-11 21:05 ` Bryan O'Donoghue
` (2 subsequent siblings)
3 siblings, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:03 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> MDSS and GPU drivers use different approaches to get min_acc length.
> Add helper function that can be used by all the drivers.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> include/linux/soc/qcom/ubwc.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index f052e241736c..50d891493ac8 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> return ret;
> }
>
> +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> +{
> + return cfg->ubwc_enc_version == UBWC_1_0 &&
> + (cfg->ubwc_dec_version == UBWC_2_0 ||
> + cfg->ubwc_dec_version == UBWC_3_0);
> +}
> +
Does that indentation pass checkpatch ?
I assume so but, please check.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
2026-01-11 21:03 ` Bryan O'Donoghue
@ 2026-01-11 21:05 ` Bryan O'Donoghue
2026-01-11 22:39 ` Dmitry Baryshkov
2026-01-12 11:08 ` Konrad Dybcio
2026-01-14 22:22 ` Bjorn Andersson
3 siblings, 1 reply; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:05 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> MDSS and GPU drivers use different approaches to get min_acc length.
> Add helper function that can be used by all the drivers.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> include/linux/soc/qcom/ubwc.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index f052e241736c..50d891493ac8 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> return ret;
> }
>
> +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> +{
> + return cfg->ubwc_enc_version == UBWC_1_0 &&
> + (cfg->ubwc_dec_version == UBWC_2_0 ||
> + cfg->ubwc_dec_version == UBWC_3_0);
> +}
> +
> #endif /* __QCOM_UBWC_H__ */
>
> --
> 2.47.3
>
>
Why not have this function return either 64 if the above is true or 32
if not, then rename to qcom_ubwc_min_acc_length() ?
You could imagine some function SoC having a 128b length for argument's
sake, it would make more sense just to modify this function then instead
of all of the callsites.
---
bod
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 04/11] media: iris: don't specify min_acc_length in the source code
2026-01-10 19:37 ` [PATCH 04/11] media: iris: don't specify min_acc_length in the source code Dmitry Baryshkov
@ 2026-01-11 21:06 ` Bryan O'Donoghue
2026-01-11 22:43 ` Dmitry Baryshkov
0 siblings, 1 reply; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:06 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 5 ++++-
> drivers/media/platform/qcom/iris/iris_platform_common.h | 1 -
> drivers/media/platform/qcom/iris/iris_platform_gen2.c | 1 -
> 3 files changed, 4 insertions(+), 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 d77fa29f44fc..878e61aa77c3 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> @@ -3,6 +3,8 @@
> * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> +#include <linux/soc/qcom/ubwc.h>
> +
> #include "iris_hfi_common.h"
> #include "iris_hfi_gen2.h"
> #include "iris_hfi_gen2_packet.h"
> @@ -120,6 +122,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 +149,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,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index 8d8cdb56a3c7..3c5f3f68b722 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -73,7 +73,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;
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index c1989240c248..c70cfc2fc553 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -633,7 +633,6 @@ static const struct platform_clk_data sm8550_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,
>
> --
> 2.47.3
>
>
This code is fine but, I still suggest changing the 64b postfix in
qcom_ubwc_min_acc_length_64b and just having the function return the
size for the platform as _that_ is the more sustainable way.
Up to you.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
bod
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 05/11] media: iris: don't specify highest_bank_bit in the source code
2026-01-10 19:37 ` [PATCH 05/11] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
@ 2026-01-11 21:07 ` Bryan O'Donoghue
2026-01-12 11:02 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:07 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> The highest_bank_bit param 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> 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 878e61aa77c3..a4e60e9d32a4 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> @@ -159,7 +159,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->highest_bank_bit;
> + payload = ubwc->highest_bank_bit;
> iris_hfi_gen2_create_packet(hdr,
> HFI_PROP_UBWC_HBB,
> HFI_HOST_FLAGS_NONE,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index 3c5f3f68b722..8421711dbe60 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -73,7 +73,6 @@ struct tz_cp_config {
>
> struct ubwc_config_data {
> u32 max_channels;
> - u32 highest_bank_bit;
> u32 bank_swzl_level;
> u32 bank_swz2_level;
> u32 bank_swz3_level;
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index c70cfc2fc553..5ae996d19ffd 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -633,7 +633,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
>
> static struct ubwc_config_data ubwc_config_sm8550 = {
> .max_channels = 8,
> - .highest_bank_bit = 16,
> .bank_swzl_level = 0,
> .bank_swz2_level = 1,
> .bank_swz3_level = 1,
>
> --
> 2.47.3
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 06/11] media: iris: don't specify ubwc_swizzle in the source code
2026-01-10 19:37 ` [PATCH 06/11] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
@ 2026-01-11 21:08 ` Bryan O'Donoghue
2026-01-12 11:03 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:08 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 6 +++---
> drivers/media/platform/qcom/iris/iris_platform_common.h | 3 ---
> drivers/media/platform/qcom/iris/iris_platform_gen2.c | 3 ---
> 3 files changed, 3 insertions(+), 9 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 a4e60e9d32a4..a880751107c7 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> @@ -169,7 +169,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 = !!(ubwc->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL1);
> iris_hfi_gen2_create_packet(hdr,
> HFI_PROP_UBWC_BANK_SWZL_LEVEL1,
> HFI_HOST_FLAGS_NONE,
> @@ -179,7 +179,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 = !!(ubwc->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL2);
> iris_hfi_gen2_create_packet(hdr,
> HFI_PROP_UBWC_BANK_SWZL_LEVEL2,
> HFI_HOST_FLAGS_NONE,
> @@ -189,7 +189,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 = !!(ubwc->ubwc_swizzle & UBWC_SWIZZLE_ENABLE_LVL3);
> iris_hfi_gen2_create_packet(hdr,
> HFI_PROP_UBWC_BANK_SWZL_LEVEL3,
> HFI_HOST_FLAGS_NONE,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index 8421711dbe60..9f9ee67e4732 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -73,9 +73,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;
> };
>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index 5ae996d19ffd..0f06066d814a 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -633,9 +633,6 @@ static const struct platform_clk_data sm8550_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,
> };
>
>
> --
> 2.47.3
>
>
Nice.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 07/11] media: iris: don't specify bank_spreading in the source code
2026-01-10 19:37 ` [PATCH 07/11] media: iris: don't specify bank_spreading " Dmitry Baryshkov
@ 2026-01-11 21:09 ` Bryan O'Donoghue
2026-01-12 11:03 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:09 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> The UBWC bank spreading 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> 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 a880751107c7..9945c939cd29 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c
> @@ -199,7 +199,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_spreading;
> + payload = ubwc->ubwc_bank_spread;
> iris_hfi_gen2_create_packet(hdr,
> HFI_PROP_UBWC_BANK_SPREADING,
> HFI_HOST_FLAGS_NONE,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index 9f9ee67e4732..f99fcbb8fced 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -73,7 +73,6 @@ struct tz_cp_config {
>
> struct ubwc_config_data {
> u32 max_channels;
> - u32 bank_spreading;
> };
>
> struct platform_inst_caps {
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index 0f06066d814a..c967db452dec 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -633,7 +633,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
>
> static struct ubwc_config_data ubwc_config_sm8550 = {
> .max_channels = 8,
> - .bank_spreading = 1,
> };
>
> static struct tz_cp_config tz_cp_config_sm8550 = {
>
> --
> 2.47.3
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 08/11] media: iris: don't specify max_channels in the source code
2026-01-10 19:38 ` [PATCH 08/11] media: iris: don't specify max_channels " Dmitry Baryshkov
@ 2026-01-11 21:09 ` Bryan O'Donoghue
2026-01-12 11:05 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:09 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:38, 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@oss.qualcomm.com>
> ---
> 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;
> iris_hfi_gen2_create_packet(hdr,
> HFI_PROP_UBWC_MAX_CHANNELS,
> HFI_HOST_FLAGS_NONE,
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index f99fcbb8fced..4abaf4615cea 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -72,7 +72,6 @@ struct tz_cp_config {
> };
>
> struct ubwc_config_data {
> - u32 max_channels;
> };
>
> struct platform_inst_caps {
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index c967db452dec..e78cda7e307d 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -632,7 +632,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
> };
>
> static struct ubwc_config_data ubwc_config_sm8550 = {
> - .max_channels = 8,
> };
>
> static struct tz_cp_config tz_cp_config_sm8550 = {
>
> --
> 2.47.3
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 09/11] media: iris: drop remnants of UBWC configuration
2026-01-10 19:38 ` [PATCH 09/11] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
@ 2026-01-11 21:10 ` Bryan O'Donoghue
2026-01-12 11:06 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Bryan O'Donoghue @ 2026-01-11 21:10 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Mauro Carvalho Chehab
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On 10/01/2026 19:38, Dmitry Baryshkov wrote:
> Now as all UBWC configuration bits were migrated to be used or derived
> from the global UBWC platform-specific data, drop the unused struct and
> field definitions.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/media/platform/qcom/iris/iris_platform_common.h | 4 ----
> drivers/media/platform/qcom/iris/iris_platform_gen2.c | 7 -------
> 2 files changed, 11 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_common.h b/drivers/media/platform/qcom/iris/iris_platform_common.h
> index 4abaf4615cea..3b0e9e3cfecb 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_common.h
> +++ b/drivers/media/platform/qcom/iris/iris_platform_common.h
> @@ -71,9 +71,6 @@ struct tz_cp_config {
> u32 cp_nonpixel_size;
> };
>
> -struct ubwc_config_data {
> -};
> -
> struct platform_inst_caps {
> u32 min_frame_width;
> u32 max_frame_width;
> @@ -218,7 +215,6 @@ struct iris_platform_data {
> struct tz_cp_config *tz_cp_config_data;
> u32 core_arch;
> u32 hw_response_timeout;
> - struct ubwc_config_data *ubwc_config;
> u32 num_vpp_pipe;
> bool no_aon;
> u32 max_session_count;
> diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> index e78cda7e307d..5c4f108c14a2 100644
> --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c
> @@ -631,9 +631,6 @@ static const struct platform_clk_data sm8550_clk_table[] = {
> {IRIS_HW_CLK, "vcodec0_core" },
> };
>
> -static struct ubwc_config_data ubwc_config_sm8550 = {
> -};
> -
> static struct tz_cp_config tz_cp_config_sm8550 = {
> .cp_start = 0,
> .cp_size = 0x25800000,
> @@ -760,7 +757,6 @@ const struct iris_platform_data sm8550_data = {
> .tz_cp_config_data = &tz_cp_config_sm8550,
> .core_arch = VIDEO_ARCH_LX,
> .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
> - .ubwc_config = &ubwc_config_sm8550,
> .num_vpp_pipe = 4,
> .max_session_count = 16,
> .max_core_mbpf = NUM_MBS_8K * 2,
> @@ -852,7 +848,6 @@ const struct iris_platform_data sm8650_data = {
> .tz_cp_config_data = &tz_cp_config_sm8550,
> .core_arch = VIDEO_ARCH_LX,
> .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
> - .ubwc_config = &ubwc_config_sm8550,
> .num_vpp_pipe = 4,
> .max_session_count = 16,
> .max_core_mbpf = NUM_MBS_8K * 2,
> @@ -934,7 +929,6 @@ const struct iris_platform_data sm8750_data = {
> .tz_cp_config_data = &tz_cp_config_sm8550,
> .core_arch = VIDEO_ARCH_LX,
> .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
> - .ubwc_config = &ubwc_config_sm8550,
> .num_vpp_pipe = 4,
> .max_session_count = 16,
> .max_core_mbpf = NUM_MBS_8K * 2,
> @@ -1020,7 +1014,6 @@ const struct iris_platform_data qcs8300_data = {
> .tz_cp_config_data = &tz_cp_config_sm8550,
> .core_arch = VIDEO_ARCH_LX,
> .hw_response_timeout = HW_RESPONSE_TIMEOUT_VALUE,
> - .ubwc_config = &ubwc_config_sm8550,
> .num_vpp_pipe = 2,
> .max_session_count = 16,
> .max_core_mbpf = ((4096 * 2176) / 256) * 4,
>
> --
> 2.47.3
>
>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-11 21:05 ` Bryan O'Donoghue
@ 2026-01-11 22:39 ` Dmitry Baryshkov
0 siblings, 0 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-11 22:39 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Mauro Carvalho Chehab, Konrad Dybcio,
linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On Sun, Jan 11, 2026 at 09:05:35PM +0000, Bryan O'Donoghue wrote:
> On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> > MDSS and GPU drivers use different approaches to get min_acc length.
> > Add helper function that can be used by all the drivers.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > include/linux/soc/qcom/ubwc.h | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> > index f052e241736c..50d891493ac8 100644
> > --- a/include/linux/soc/qcom/ubwc.h
> > +++ b/include/linux/soc/qcom/ubwc.h
> > @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> > return ret;
> > }
> >
> > +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> > +{
> > + return cfg->ubwc_enc_version == UBWC_1_0 &&
> > + (cfg->ubwc_dec_version == UBWC_2_0 ||
> > + cfg->ubwc_dec_version == UBWC_3_0);
> > +}
> > +
> > #endif /* __QCOM_UBWC_H__ */
> >
> > --
> > 2.47.3
> >
> >
>
> Why not have this function return either 64 if the above is true or 32 if
> not, then rename to qcom_ubwc_min_acc_length() ?
See, how it's used. We have several callsites which pass 0 / 1 depending
on MAL being 32 or 64.
>
> You could imagine some function SoC having a 128b length for argument's
> sake, it would make more sense just to modify this function then instead of
> all of the callsites.
It would require changes to the drivers code anyway as they would now
have to cope with updated register maps / values.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 04/11] media: iris: don't specify min_acc_length in the source code
2026-01-11 21:06 ` Bryan O'Donoghue
@ 2026-01-11 22:43 ` Dmitry Baryshkov
0 siblings, 0 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-11 22:43 UTC (permalink / raw)
To: Bryan O'Donoghue
Cc: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Mauro Carvalho Chehab, Konrad Dybcio,
linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On Sun, Jan 11, 2026 at 09:06:52PM +0000, Bryan O'Donoghue wrote:
> On 10/01/2026 19:37, Dmitry Baryshkov wrote:
> > 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.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > drivers/media/platform/qcom/iris/iris_hfi_gen2_packet.c | 5 ++++-
> > drivers/media/platform/qcom/iris/iris_platform_common.h | 1 -
> > drivers/media/platform/qcom/iris/iris_platform_gen2.c | 1 -
> > 3 files changed, 4 insertions(+), 3 deletions(-)
> >
> > @@ -146,7 +149,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,
>
> This code is fine but, I still suggest changing the 64b postfix in
> qcom_ubwc_min_acc_length_64b and just having the function return the size
> for the platform as _that_ is the more sustainable way.
See how MAL is handled in the DRM patches. If the UBWC spec is extended
to allow 16 or 128 bytes, the drm/msm driver will need to be changed
anyway to cope with that: driver uses flags to pass the value instead of
passing the value as is.
>
> Up to you.
>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>
> ---
> bod
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 05/11] media: iris: don't specify highest_bank_bit in the source code
2026-01-10 19:37 ` [PATCH 05/11] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
2026-01-11 21:07 ` Bryan O'Donoghue
@ 2026-01-12 11:02 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:02 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> The highest_bank_bit param 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 06/11] media: iris: don't specify ubwc_swizzle in the source code
2026-01-10 19:37 ` [PATCH 06/11] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
2026-01-11 21:08 ` Bryan O'Donoghue
@ 2026-01-12 11:03 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:03 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 07/11] media: iris: don't specify bank_spreading in the source code
2026-01-10 19:37 ` [PATCH 07/11] media: iris: don't specify bank_spreading " Dmitry Baryshkov
2026-01-11 21:09 ` Bryan O'Donoghue
@ 2026-01-12 11:03 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:03 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> The UBWC bank spreading 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.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 08/11] media: iris: don't specify max_channels in the source code
2026-01-10 19:38 ` [PATCH 08/11] media: iris: don't specify max_channels " Dmitry Baryshkov
2026-01-11 21:09 ` Bryan O'Donoghue
@ 2026-01-12 11:05 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:05 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
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@oss.qualcomm.com>
> ---
> 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@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 09/11] media: iris: drop remnants of UBWC configuration
2026-01-10 19:38 ` [PATCH 09/11] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
2026-01-11 21:10 ` Bryan O'Donoghue
@ 2026-01-12 11:06 ` Konrad Dybcio
1 sibling, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:06 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:38 PM, Dmitry Baryshkov wrote:
> Now as all UBWC configuration bits were migrated to be used or derived
> from the global UBWC platform-specific data, drop the unused struct and
> field definitions.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 11/11] drm/msm/a6xx: use new helper to set min_acc length
2026-01-10 19:38 ` [PATCH 11/11] drm/msm/a6xx: " Dmitry Baryshkov
@ 2026-01-12 11:07 ` Konrad Dybcio
0 siblings, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:07 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:38 PM, Dmitry Baryshkov wrote:
> Use freshly defined helper instead of hardcoding the checks in the
> driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 10/11] drm/msm/mdss: use new helper to set min_acc length
2026-01-10 19:38 ` [PATCH 10/11] drm/msm/mdss: use new helper to set min_acc length Dmitry Baryshkov
@ 2026-01-12 11:08 ` Konrad Dybcio
0 siblings, 0 replies; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:08 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:38 PM, Dmitry Baryshkov wrote:
> Use freshly defined helper instead of hardcoding the checks in the
> driver.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
2026-01-11 21:03 ` Bryan O'Donoghue
2026-01-11 21:05 ` Bryan O'Donoghue
@ 2026-01-12 11:08 ` Konrad Dybcio
2026-01-13 0:24 ` Dmitry Baryshkov
2026-01-14 22:22 ` Bjorn Andersson
3 siblings, 1 reply; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-12 11:08 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, David Airlie, Simona Vetter, Akhil P Oommen,
Vikash Garodia, Dikshita Agarwal, Bryan O'Donoghue,
Mauro Carvalho Chehab
Cc: linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> MDSS and GPU drivers use different approaches to get min_acc length.
> Add helper function that can be used by all the drivers.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> include/linux/soc/qcom/ubwc.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index f052e241736c..50d891493ac8 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> return ret;
> }
>
> +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> +{
> + return cfg->ubwc_enc_version == UBWC_1_0 &&
> + (cfg->ubwc_dec_version == UBWC_2_0 ||
> + cfg->ubwc_dec_version == UBWC_3_0);
Are you sure this is a correct heuristic?
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-12 11:08 ` Konrad Dybcio
@ 2026-01-13 0:24 ` Dmitry Baryshkov
2026-01-13 15:26 ` Konrad Dybcio
0 siblings, 1 reply; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-13 0:24 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab,
linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On Mon, Jan 12, 2026 at 12:08:13PM +0100, Konrad Dybcio wrote:
> On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> > MDSS and GPU drivers use different approaches to get min_acc length.
> > Add helper function that can be used by all the drivers.
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > include/linux/soc/qcom/ubwc.h | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> > index f052e241736c..50d891493ac8 100644
> > --- a/include/linux/soc/qcom/ubwc.h
> > +++ b/include/linux/soc/qcom/ubwc.h
> > @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> > return ret;
> > }
> >
> > +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> > +{
> > + return cfg->ubwc_enc_version == UBWC_1_0 &&
> > + (cfg->ubwc_dec_version == UBWC_2_0 ||
> > + cfg->ubwc_dec_version == UBWC_3_0);
>
> Are you sure this is a correct heuristic?
No, but it matches what we had in MDSS driver (and I think it matches
the chipsets that were selected by the GPU driver).
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-13 0:24 ` Dmitry Baryshkov
@ 2026-01-13 15:26 ` Konrad Dybcio
2026-01-13 16:48 ` Dmitry Baryshkov
0 siblings, 1 reply; 37+ messages in thread
From: Konrad Dybcio @ 2026-01-13 15:26 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab,
linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On 1/13/26 1:24 AM, Dmitry Baryshkov wrote:
> On Mon, Jan 12, 2026 at 12:08:13PM +0100, Konrad Dybcio wrote:
>> On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
>>> MDSS and GPU drivers use different approaches to get min_acc length.
>>> Add helper function that can be used by all the drivers.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>> ---
>>> include/linux/soc/qcom/ubwc.h | 7 +++++++
>>> 1 file changed, 7 insertions(+)
>>>
>>> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
>>> index f052e241736c..50d891493ac8 100644
>>> --- a/include/linux/soc/qcom/ubwc.h
>>> +++ b/include/linux/soc/qcom/ubwc.h
>>> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
>>> return ret;
>>> }
>>>
>>> +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
>>> +{
>>> + return cfg->ubwc_enc_version == UBWC_1_0 &&
>>> + (cfg->ubwc_dec_version == UBWC_2_0 ||
>>> + cfg->ubwc_dec_version == UBWC_3_0);
>>
>> Are you sure this is a correct heuristic?
>
> No, but it matches what we had in MDSS driver (and I think it matches
> the chipsets that were selected by the GPU driver).
Should we keep a comment that this is a best guess that worked out so
far?
Konrad
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-13 15:26 ` Konrad Dybcio
@ 2026-01-13 16:48 ` Dmitry Baryshkov
0 siblings, 0 replies; 37+ messages in thread
From: Dmitry Baryshkov @ 2026-01-13 16:48 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Bjorn Andersson, Konrad Dybcio, Rob Clark, Dmitry Baryshkov,
Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
David Airlie, Simona Vetter, Akhil P Oommen, Vikash Garodia,
Dikshita Agarwal, Bryan O'Donoghue, Mauro Carvalho Chehab,
linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On Tue, Jan 13, 2026 at 04:26:50PM +0100, Konrad Dybcio wrote:
> On 1/13/26 1:24 AM, Dmitry Baryshkov wrote:
> > On Mon, Jan 12, 2026 at 12:08:13PM +0100, Konrad Dybcio wrote:
> >> On 1/10/26 8:37 PM, Dmitry Baryshkov wrote:
> >>> MDSS and GPU drivers use different approaches to get min_acc length.
> >>> Add helper function that can be used by all the drivers.
> >>>
> >>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> >>> ---
> >>> include/linux/soc/qcom/ubwc.h | 7 +++++++
> >>> 1 file changed, 7 insertions(+)
> >>>
> >>> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> >>> index f052e241736c..50d891493ac8 100644
> >>> --- a/include/linux/soc/qcom/ubwc.h
> >>> +++ b/include/linux/soc/qcom/ubwc.h
> >>> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> >>> return ret;
> >>> }
> >>>
> >>> +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> >>> +{
> >>> + return cfg->ubwc_enc_version == UBWC_1_0 &&
> >>> + (cfg->ubwc_dec_version == UBWC_2_0 ||
> >>> + cfg->ubwc_dec_version == UBWC_3_0);
> >>
> >> Are you sure this is a correct heuristic?
> >
> > No, but it matches what we had in MDSS driver (and I think it matches
> > the chipsets that were selected by the GPU driver).
>
> Should we keep a comment that this is a best guess that worked out so
> far?
Sure.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
` (2 preceding siblings ...)
2026-01-12 11:08 ` Konrad Dybcio
@ 2026-01-14 22:22 ` Bjorn Andersson
3 siblings, 0 replies; 37+ messages in thread
From: Bjorn Andersson @ 2026-01-14 22:22 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Konrad Dybcio, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Akhil P Oommen, Vikash Garodia, Dikshita Agarwal,
Bryan O'Donoghue, Mauro Carvalho Chehab, Konrad Dybcio,
linux-arm-msm, linux-kernel, dri-devel, freedreno, linux-media
On Sat, Jan 10, 2026 at 09:37:54PM +0200, Dmitry Baryshkov wrote:
> MDSS and GPU drivers use different approaches to get min_acc length.
> Add helper function that can be used by all the drivers.
>
Acked-by: Bjorn Andersson <andersson@kernel.org>
Regards,
Bjorn
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> include/linux/soc/qcom/ubwc.h | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/include/linux/soc/qcom/ubwc.h b/include/linux/soc/qcom/ubwc.h
> index f052e241736c..50d891493ac8 100644
> --- a/include/linux/soc/qcom/ubwc.h
> +++ b/include/linux/soc/qcom/ubwc.h
> @@ -74,4 +74,11 @@ static inline bool qcom_ubwc_get_ubwc_mode(const struct qcom_ubwc_cfg_data *cfg)
> return ret;
> }
>
> +static inline bool qcom_ubwc_min_acc_length_64b(const struct qcom_ubwc_cfg_data *cfg)
> +{
> + return cfg->ubwc_enc_version == UBWC_1_0 &&
> + (cfg->ubwc_dec_version == UBWC_2_0 ||
> + cfg->ubwc_dec_version == UBWC_3_0);
> +}
> +
> #endif /* __QCOM_UBWC_H__ */
>
> --
> 2.47.3
>
^ permalink raw reply [flat|nested] 37+ messages in thread
* Re: (subset) [PATCH 00/11] media: iris: migrate to using global UBWC config
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
` (10 preceding siblings ...)
2026-01-10 19:38 ` [PATCH 11/11] drm/msm/a6xx: " Dmitry Baryshkov
@ 2026-01-15 3:00 ` Bjorn Andersson
11 siblings, 0 replies; 37+ messages in thread
From: Bjorn Andersson @ 2026-01-15 3:00 UTC (permalink / raw)
To: Konrad Dybcio, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Akhil P Oommen, Vikash Garodia, Dikshita Agarwal,
Bryan O'Donoghue, Mauro Carvalho Chehab, Dmitry Baryshkov
Cc: Konrad Dybcio, linux-arm-msm, linux-kernel, dri-devel, freedreno,
linux-media
On Sat, 10 Jan 2026 21:37:52 +0200, Dmitry Baryshkov wrote:
> Having UBWC configuration in the driver is error prone. For example, the
> driver specifies fixed values for HBB, while the actual value might
> depend on the DDR type. Stop defining UBWC data in the iris driver and
> use the global UBWC configuration registry.
>
> Merge strategy: either merge SoC bits directly through the media tree
> (with Bjorn's ack) or merge to the media tree through the immutable tag.
> The drm patches will follow depending on the way the SoC patches are
> merged.
>
> [...]
Applied, thanks!
[01/11] soc: qcom: ubwc: add missing include
commit: ccef4b2703ff5b0de0b1bda30a0de3026d52eb19
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 37+ messages in thread
end of thread, other threads:[~2026-01-15 3:00 UTC | newest]
Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-10 19:37 [PATCH 00/11] media: iris: migrate to using global UBWC config Dmitry Baryshkov
2026-01-10 19:37 ` [PATCH 01/11] soc: qcom: ubwc: add missing include Dmitry Baryshkov
2026-01-11 20:58 ` Bryan O'Donoghue
2026-01-10 19:37 ` [PATCH 02/11] soc: qcom: ubwc: add helper to get min_acc length Dmitry Baryshkov
2026-01-11 21:03 ` Bryan O'Donoghue
2026-01-11 21:05 ` Bryan O'Donoghue
2026-01-11 22:39 ` Dmitry Baryshkov
2026-01-12 11:08 ` Konrad Dybcio
2026-01-13 0:24 ` Dmitry Baryshkov
2026-01-13 15:26 ` Konrad Dybcio
2026-01-13 16:48 ` Dmitry Baryshkov
2026-01-14 22:22 ` Bjorn Andersson
2026-01-10 19:37 ` [PATCH 03/11] media: iris: retrieve UBWC platform configuration Dmitry Baryshkov
2026-01-11 21:01 ` Bryan O'Donoghue
2026-01-10 19:37 ` [PATCH 04/11] media: iris: don't specify min_acc_length in the source code Dmitry Baryshkov
2026-01-11 21:06 ` Bryan O'Donoghue
2026-01-11 22:43 ` Dmitry Baryshkov
2026-01-10 19:37 ` [PATCH 05/11] media: iris: don't specify highest_bank_bit " Dmitry Baryshkov
2026-01-11 21:07 ` Bryan O'Donoghue
2026-01-12 11:02 ` Konrad Dybcio
2026-01-10 19:37 ` [PATCH 06/11] media: iris: don't specify ubwc_swizzle " Dmitry Baryshkov
2026-01-11 21:08 ` Bryan O'Donoghue
2026-01-12 11:03 ` Konrad Dybcio
2026-01-10 19:37 ` [PATCH 07/11] media: iris: don't specify bank_spreading " Dmitry Baryshkov
2026-01-11 21:09 ` Bryan O'Donoghue
2026-01-12 11:03 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 08/11] media: iris: don't specify max_channels " Dmitry Baryshkov
2026-01-11 21:09 ` Bryan O'Donoghue
2026-01-12 11:05 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 09/11] media: iris: drop remnants of UBWC configuration Dmitry Baryshkov
2026-01-11 21:10 ` Bryan O'Donoghue
2026-01-12 11:06 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 10/11] drm/msm/mdss: use new helper to set min_acc length Dmitry Baryshkov
2026-01-12 11:08 ` Konrad Dybcio
2026-01-10 19:38 ` [PATCH 11/11] drm/msm/a6xx: " Dmitry Baryshkov
2026-01-12 11:07 ` Konrad Dybcio
2026-01-15 3:00 ` (subset) [PATCH 00/11] media: iris: migrate to using global UBWC config Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox