diff options
author | Philippe Cornu <philippe.cornu@st.com> | 2018-01-25 05:38:00 -0500 |
---|---|---|
committer | Archit Taneja <architt@codeaurora.org> | 2018-01-30 05:49:17 -0500 |
commit | 1a1c130cca78c77209cd795282d93297640fb63e (patch) | |
tree | 6aafa9a7c8933dcde96ad80d5d4d48a70ae95b9c | |
parent | 4cda6e8e1ea0e7bc80028fa4fe196357a2799d05 (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
-rw-r--r-- | drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 11 |
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, | |||
412 | 412 | ||
413 | dw_mipi_message_config(dsi, msg); | 413 | dw_mipi_message_config(dsi, msg); |
414 | 414 | ||
415 | return dw_mipi_dsi_write(dsi, &packet); | 415 | ret = dw_mipi_dsi_write(dsi, &packet); |
416 | if (ret) | ||
417 | return ret; | ||
418 | |||
419 | /* | ||
420 | * TODO Only transmitted size is returned as actual driver does | ||
421 | * not support dcs/generic reads. Please update return value when | ||
422 | * delivering the read feature. | ||
423 | */ | ||
424 | return packet.size; | ||
416 | } | 425 | } |
417 | 426 | ||
418 | static const struct mipi_dsi_host_ops dw_mipi_dsi_host_ops = { | 427 | static const struct mipi_dsi_host_ops dw_mipi_dsi_host_ops = { |