summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/bridge
diff options
context:
space:
mode:
authorPhilippe Cornu <philippe.cornu@st.com>2018-01-25 11:38:00 +0100
committerArchit Taneja <architt@codeaurora.org>2018-01-30 16:19:17 +0530
commit1a1c130cca78c77209cd795282d93297640fb63e (patch)
tree6aafa9a7c8933dcde96ad80d5d4d48a70ae95b9c /drivers/gpu/drm/bridge
parent4cda6e8e1ea0e7bc80028fa4fe196357a2799d05 (diff)
drm/bridge/synopsys: dsi: Fix dsi_host_transfer() return value
The dw_mipi_dsi_host_transfer() must return the number of bytes transmitted/received on success instead of 0. Note: As the read feature is not implemented, only the transmitted number of bytes is returned for the moment. Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180125103800.1999-3-philippe.cornu@st.com
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index 37d13ccad2e7..d098e2329868 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -412,7 +412,16 @@ static ssize_t dw_mipi_dsi_host_transfer(struct mipi_dsi_host *host,
dw_mipi_message_config(dsi, msg);
- return dw_mipi_dsi_write(dsi, &packet);
+ ret = dw_mipi_dsi_write(dsi, &packet);
+ if (ret)
+ return ret;
+
+ /*
+ * TODO Only transmitted size is returned as actual driver does
+ * not support dcs/generic reads. Please update return value when
+ * delivering the read feature.
+ */
+ return packet.size;
}
static const struct mipi_dsi_host_ops dw_mipi_dsi_host_ops = {