From c2392efab33150f7982e6990ed2df0afdb4068fb Mon Sep 17 00:00:00 2001 From: Shashank Babu Chinta Venkata Date: Tue, 19 Nov 2019 14:02:09 -0800 Subject: [PATCH] ANDROID: drivers: gpu: drm: add support to batch commands MSM DSI framework has capability to batch commands and do kickoff once MIPI_DSI_MSG_LASTCOMMAND flag is set. This enables related commands to be grouped and sent in one dma kickoff. Signed-off-by: Shashank Babu Chinta Venkata Bug: 139653858 Change-Id: I2742c62a90e9a194848a612eef40a22103bb6596 --- drivers/gpu/drm/drm_mipi_dsi.c | 1 + include/drm/drm_mipi_dsi.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 80b75501f5c6..81685a804250 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -360,6 +360,7 @@ static ssize_t mipi_dsi_device_transfer(struct mipi_dsi_device *dsi, if (dsi->mode_flags & MIPI_DSI_MODE_LPM) msg->flags |= MIPI_DSI_MSG_USE_LPM; + msg->flags |= MIPI_DSI_MSG_LASTCOMMAND; return ops->transfer(dsi->host, msg); } diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 99284d322e88..328f232f33ee 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -23,6 +23,8 @@ struct mipi_dsi_device; #define MIPI_DSI_MSG_USE_LPM BIT(1) /* read mipi_dsi_msg.ctrl and unicast to only that ctrls */ #define MIPI_DSI_MSG_UNICAST BIT(2) +/* Stack all commands until lastcommand bit and trigger all in one go */ +#define MIPI_DSI_MSG_LASTCOMMAND BIT(3) /** * struct mipi_dsi_msg - read/write DSI buffer