disp: msm: dsi: add support to send commands to each sublink

Change adds support for transferring commands to each sublink.

Change-Id: Iefc0dca7343325cdfe0cf48d41d50e6e2a13bc05
Signed-off-by: Vara Reddy <varar@codeaurora.org>
This commit is contained in:
Vara Reddy
2021-02-09 18:23:43 -08:00
rodzic 13b88147a1
commit 142bb24d7c
6 zmienionych plików z 47 dodań i 1 usunięć

Wyświetl plik

@@ -1,11 +1,12 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
*/
#include <linux/iopoll.h>
#include "dsi_ctrl_hw.h"
#include "dsi_ctrl_reg.h"
#include "dsi_hw.h"
#include "dsi_ctrl.h"
#include "dsi_catalog.h"
#define DISP_CC_MISC_CMD_REG_OFF 0x00
@@ -280,3 +281,27 @@ u32 dsi_ctrl_hw_22_log_line_count(struct dsi_ctrl_hw *ctrl, bool cmd_mode)
+ MDP_INTF_LINE_COUNT_OFFSET);
return reg;
}
void dsi_ctrl_hw_22_configure_splitlink(struct dsi_ctrl_hw *ctrl,
struct dsi_host_common_cfg *common_cfg, u32 flags)
{
u32 reg = 0;
reg = DSI_R32(ctrl, DSI_SPLIT_LINK);
/* DMA_LINK_SEL */
reg &= ~(0x7 << 12);
/* Send command to both sublinks unless specified */
if (flags & DSI_CTRL_CMD_SUBLINK0)
reg |= BIT(12);
else if (flags & DSI_CTRL_CMD_SUBLINK1)
reg |= BIT(13);
else
reg |= (BIT(12) | BIT(13));
DSI_W32(ctrl, DSI_SPLIT_LINK, reg);
/* Make sure the split link config is updated */
wmb();
}