From 401ab0dbb9f53634f877ed9a7c6b0dfdd98a2bff Mon Sep 17 00:00:00 2001 From: Satya Rama Aditya Pinapala Date: Mon, 8 Mar 2021 15:13:02 -0800 Subject: [PATCH] disp: msm: dsi: allocate DSI command buffer during bind The DMA buffer allocation for DSI happens during the first command transfer. This change moves this allocation to happen during bind. Change-Id: I7969a019a8b84282e8a153f5393c9a3de5a28043 Signed-off-by: Satya Rama Aditya Pinapala --- msm/dsi/dsi_display.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/msm/dsi/dsi_display.c b/msm/dsi/dsi_display.c index 74c556be67e6..2330d73f5c0f 100644 --- a/msm/dsi/dsi_display.c +++ b/msm/dsi/dsi_display.c @@ -6111,6 +6111,12 @@ int dsi_display_drm_bridge_init(struct dsi_display *display, display->bridge = bridge; priv->bridges[priv->num_bridges++] = &bridge->base; + if (display->tx_cmd_buf == NULL) { + rc = dsi_host_alloc_cmd_tx_buffer(display); + if (rc) + DSI_ERR("failed to allocate cmd tx buffer memory\n"); + } + error: mutex_unlock(&display->display_lock); return rc;