1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
From 70e202e0dced591426cdaeeaf2b8ea0cb0010842 Mon Sep 17 00:00:00 2001
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Date: Sun, 4 Jun 2023 21:44:33 +0300
Subject: [PATCH 02/16] drm/msm/dsi: change sync mode to sync on DSI0 rather
than DSI1
Change MSM DSI's sync-dual-dsi mode to resync on DSI0 rather than DSI1.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index a210b7c9e..0d7433005 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -485,7 +485,7 @@ int msm_dsi_manager_connector_init(struct msm_dsi *msm_dsi,
int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
{
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0);
+ struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
bool is_read = (msg->rx_buf && msg->rx_len);
bool need_sync = (IS_SYNC_NEEDED() && !is_read);
@@ -496,14 +496,14 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
/* In bonded master case, panel requires the same commands sent to
* both DSI links. Host issues the command trigger to both links
- * when DSI_1 calls the cmd transfer function, no matter it happens
- * before or after DSI_0 cmd transfer.
+ * when DSI_0 calls the cmd transfer function, no matter it happens
+ * before or after DSI_1 cmd transfer.
*/
- if (need_sync && (id == DSI_0))
+ if (need_sync && (id == DSI_1))
return is_read ? msg->rx_len : msg->tx_len;
- if (need_sync && msm_dsi0) {
- ret = msm_dsi_host_xfer_prepare(msm_dsi0->host, msg);
+ if (need_sync && msm_dsi1) {
+ ret = msm_dsi_host_xfer_prepare(msm_dsi1->host, msg);
if (ret) {
pr_err("%s: failed to prepare non-trigger host, %d\n",
__func__, ret);
@@ -522,8 +522,8 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
msm_dsi_host_xfer_restore(host, msg);
restore_host0:
- if (need_sync && msm_dsi0)
- msm_dsi_host_xfer_restore(msm_dsi0->host, msg);
+ if (need_sync && msm_dsi1)
+ msm_dsi_host_xfer_restore(msm_dsi1->host, msg);
return ret;
}
@@ -531,14 +531,14 @@ int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len)
{
struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
- struct msm_dsi *msm_dsi0 = dsi_mgr_get_dsi(DSI_0);
+ struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
struct mipi_dsi_host *host = msm_dsi->host;
- if (IS_SYNC_NEEDED() && (id == DSI_0))
+ if (IS_SYNC_NEEDED() && (id == DSI_1))
return false;
- if (IS_SYNC_NEEDED() && msm_dsi0)
- msm_dsi_host_cmd_xfer_commit(msm_dsi0->host, dma_base, len);
+ if (IS_SYNC_NEEDED() && msm_dsi1)
+ msm_dsi_host_cmd_xfer_commit(msm_dsi1->host, dma_base, len);
msm_dsi_host_cmd_xfer_commit(host, dma_base, len);
--
2.47.1
|