Skip to content

Commit b5243af

Browse files
bivvyZhengShunQian
authored andcommitted
drm/rockchip: dsi: support EoTp feature
In order to enhance the overall robustness of the system, DSI defines a dedicated EoT packet (EoTp) at the protocol layer for signaling the end of HS transmission. For backwards compatibility with earlier DSI systems, the capability of generating and interpreting this EoTp can be enabled or disabled. Change-Id: Iddc7e82a7e3e47dea94846fbb771da8fddc0fda3 Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
1 parent c6a26a0 commit b5243af

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

drivers/gpu/drm/rockchip/dw-mipi-dsi.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@
7474
#define DSI_DBI_CMDSIZE 0x28
7575

7676
#define DSI_PCKHDL_CFG 0x2c
77-
#define EN_CRC_RX BIT(4)
78-
#define EN_ECC_RX BIT(3)
79-
#define EN_BTA BIT(2)
80-
#define EN_EOTP_RX BIT(1)
81-
#define EN_EOTP_TX BIT(0)
77+
#define CRC_RX_EN BIT(4)
78+
#define ECC_RX_EN BIT(3)
79+
#define BTA_EN BIT(2)
80+
#define EOTP_RX_EN BIT(1)
81+
#define EOTP_TX_EN BIT(0)
8282

8383
#define DSI_MODE_CFG 0x34
8484
#define ENABLE_VIDEO_MODE 0
@@ -1082,8 +1082,12 @@ static void dw_mipi_dsi_dpi_config(struct dw_mipi_dsi *dsi,
10821082

10831083
static void dw_mipi_dsi_packet_handler_config(struct dw_mipi_dsi *dsi)
10841084
{
1085-
regmap_write(dsi->regmap, DSI_PCKHDL_CFG,
1086-
EN_CRC_RX | EN_ECC_RX | EN_BTA);
1085+
u32 val = CRC_RX_EN | ECC_RX_EN | BTA_EN | EOTP_TX_EN;
1086+
1087+
if (dsi->mode_flags & MIPI_DSI_MODE_EOT_PACKET)
1088+
val &= ~EOTP_TX_EN;
1089+
1090+
regmap_write(dsi->regmap, DSI_PCKHDL_CFG, val);
10871091
}
10881092

10891093
static void dw_mipi_dsi_video_packet_config(struct dw_mipi_dsi *dsi,

0 commit comments

Comments
 (0)