summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-08-05 11:30:14 +0200
committerThierry Reding <treding@nvidia.com>2014-08-07 17:00:23 +0200
commite16643956f84ffc351d303e3a8ceeeaf07c351de (patch)
treebec0b7b173f947a283ec0c08dd2e9374c1c1f39b
parent8e9a632dcac302d2a806d56a8f46018d493db68c (diff)
drm/dsi: Always use low-power mode for DCS commands
Many peripherals require DCS commands to be sent in low power mode and will fail to correctly process them in high speed mode. Section 5.2 of the MIPI DSI specification also mandates that on bidirectional lanes, data shall be transmitted in low power mode only. At worst this change will make transmission of DCS commands slower than optimal on some DSI peripherals, but it should enable DCS commands to be successfully transmitted to any DSI peripheral. If transmission in low power mode turns out to be too slow at some point in the future, one possible solution would be to explicitly mark devices that support high speed transmission of DCS commands. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/drm_mipi_dsi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c
index f3e8ad01137f..2fb1228acaa4 100644
--- a/drivers/gpu/drm/drm_mipi_dsi.c
+++ b/drivers/gpu/drm/drm_mipi_dsi.c
@@ -370,6 +370,7 @@ ssize_t mipi_dsi_dcs_write_buffer(struct mipi_dsi_device *dsi,
{
struct mipi_dsi_msg msg = {
.channel = dsi->channel,
+ .flags = MIPI_DSI_MSG_USE_LPM,
.tx_buf = data,
.tx_len = len
};
@@ -457,6 +458,7 @@ ssize_t mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, u8 cmd,
}
memset(&msg, 0, sizeof(msg));
+ msg.flags = MIPI_DSI_MSG_USE_LPM;
msg.channel = dsi->channel;
msg.tx_len = size;
msg.tx_buf = tx;
@@ -497,6 +499,7 @@ ssize_t mipi_dsi_dcs_read(struct mipi_dsi_device *dsi, u8 cmd, void *data,
struct mipi_dsi_msg msg = {
.channel = dsi->channel,
.type = MIPI_DSI_DCS_READ,
+ .flags = MIPI_DSI_MSG_USE_LPM,
.tx_buf = &cmd,
.tx_len = 1,
.rx_buf = data,