Commit 8677affc authored by Thierry Reding's avatar Thierry Reding

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: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent dbf30b69
...@@ -800,27 +800,15 @@ static void s6e8aa0_panel_init(struct s6e8aa0 *ctx) ...@@ -800,27 +800,15 @@ static void s6e8aa0_panel_init(struct s6e8aa0 *ctx)
} }
static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx, static void s6e8aa0_set_maximum_return_packet_size(struct s6e8aa0 *ctx,
int size) u16 size)
{ {
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
const struct mipi_dsi_host_ops *ops = dsi->host->ops;
u8 buf[] = {size, 0};
struct mipi_dsi_msg msg = {
.channel = dsi->channel,
.type = MIPI_DSI_SET_MAXIMUM_RETURN_PACKET_SIZE,
.tx_len = sizeof(buf),
.tx_buf = buf
};
int ret; int ret;
if (ctx->error < 0) if (ctx->error < 0)
return; return;
if (!ops || !ops->transfer) ret = mipi_dsi_set_maximum_return_packet_size(dsi, size);
ret = -EIO;
else
ret = ops->transfer(dsi->host, &msg);
if (ret < 0) { if (ret < 0) {
dev_err(ctx->dev, dev_err(ctx->dev,
"error %d setting maximum return packet size to %d\n", "error %d setting maximum return packet size to %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment