summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/dsi/dsi_cfg.h
diff options
context:
space:
mode:
authorKonrad Dybcio <konrad.dybcio@linaro.org>2023-03-18 14:42:49 +0100
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>2023-04-06 20:29:44 +0300
commitff83e76b0fcbe033b949cc047debad7fa1a33890 (patch)
treeb5ecd07f4333c086bb54e5a22a4236a519817127 /drivers/gpu/drm/msm/dsi/dsi_cfg.h
parent3c606134342ec0f1a394f7ade73ea1329e392d24 (diff)
downloadlinux-next-ff83e76b0fcbe033b949cc047debad7fa1a33890.tar.gz
drm/msm/dsi: Fix DSI index detection when version clash occurs
Currently, we allow for MAX_DSI entries in io_start to facilitate for MAX_DSI number of DSI hosts at different addresses. The configuration is matched against the DSI CTRL hardware revision read back from the component. We need a way to resolve situations where multiple SoCs with different register maps may use the same version of DSI CTRL. In preparation to do so, make msm_dsi_config a 2d array where each entry represents a set of configurations adequate for a given SoC. This is totally fine to do, as the only differentiating factors between same-version-different-SoCs configurations are the number of DSI hosts (1 or 2, at least as of today) and the set of base registers. The regulator setup is the same, because the DSI hardware is the same, regardless of the SoC it was implemented in. In addition to that, update the matching logic such that it will loop over VARIANTS_MAX variants, making sure they are all taken into account. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/527652/ Link: https://lore.kernel.org/r/20230307-topic-dsi_qcm-v6-3-70e13b1214fa@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_cfg.h')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_cfg.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_cfg.h b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
index 6b6b16c5fd25..8772a3631ac1 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_cfg.h
+++ b/drivers/gpu/drm/msm/dsi/dsi_cfg.h
@@ -32,13 +32,16 @@
#define DSI_6G_REG_SHIFT 4
+/* Maximum number of configurations matched against the same hw revision */
+#define VARIANTS_MAX 2
+
struct msm_dsi_config {
u32 io_offset;
const struct regulator_bulk_data *regulator_data;
int num_regulators;
const char * const *bus_clk_names;
const int num_bus_clks;
- const resource_size_t io_start[DSI_MAX];
+ const resource_size_t io_start[VARIANTS_MAX][DSI_MAX];
};
struct msm_dsi_host_cfg_ops {