diff options
author | Thierry Reding <treding@nvidia.com> | 2014-08-06 03:07:49 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-13 07:55:49 -0500 |
commit | 8677affc6cc24ebc0c5728c8f11140f0c509152f (patch) | |
tree | 10c3fd892ba1a1c155019a48a3e899c00c61d92d | |
parent | dbf30b695809b88fd650dab4028156fb85c5f2d9 (diff) |
drm/panel: s6e8aa0: Use standard MIPI DSI function
Use the newly introduced mipi_dsi_set_maximum_return_packet_size()
function to replace an open-coded version.
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | drivers/gpu/drm/panel/panel-s6e8aa0.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c index 17bc7991344d..373bcbdaeb61 100644 --- a/drivers/gpu/drm/panel/panel-s6e8aa0.c +++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c | |||
@@ -800,27 +800,15 @@ static void s6e8aa0_panel_init(struct s6e8aa0 *ctx) | |||
800 | } | 800 | } |
801 | 801 | ||
802 | static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx, | 802 | static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx, |
803 | int size) | 803 | u16 size) |
804 | { | 804 | { |
805 | struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); | 805 | struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); |
806 | const struct mipi_dsi_host_ops *ops = dsi->host->ops; | ||
807 | u8 buf[] = {size, 0}; | ||
808 | struct mipi_dsi_msg msg = { | ||
809 | .channel = dsi->channel, | ||
810 | .type = MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE, | ||
811 | .tx_len = sizeof(buf), | ||
812 | .tx_buf = buf | ||
813 | }; | ||
814 | int ret; | 806 | int ret; |
815 | 807 | ||
816 | if (ctx->error < 0) | 808 | if (ctx->error < 0) |
817 | return; | 809 | return; |
818 | 810 | ||
819 | if (!ops || !ops->transfer) | 811 | ret = mipi_dsi_set_maximum_return_packet_size(dsi, size); |
820 | ret = -EIO; | ||
821 | else | ||
822 | ret = ops->transfer(dsi->host, &msg); | ||
823 | |||
824 | if (ret < 0) { | 812 | if (ret < 0) { |
825 | dev_err(ctx->dev, | 813 | dev_err(ctx->dev, |
826 | "error %d setting maximum return packet size to %d\n", | 814 | "error %d setting maximum return packet size to %d\n", |