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:
@@ -84,6 +84,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
|
|||||||
ctrl->ops.configure_cmddma_window = NULL;
|
ctrl->ops.configure_cmddma_window = NULL;
|
||||||
ctrl->ops.reset_trig_ctrl = NULL;
|
ctrl->ops.reset_trig_ctrl = NULL;
|
||||||
ctrl->ops.log_line_count = NULL;
|
ctrl->ops.log_line_count = NULL;
|
||||||
|
ctrl->ops.splitlink_cmd_setup = NULL;
|
||||||
break;
|
break;
|
||||||
case DSI_CTRL_VERSION_2_0:
|
case DSI_CTRL_VERSION_2_0:
|
||||||
ctrl->ops.setup_lane_map = dsi_ctrl_hw_20_setup_lane_map;
|
ctrl->ops.setup_lane_map = dsi_ctrl_hw_20_setup_lane_map;
|
||||||
@@ -102,6 +103,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
|
|||||||
ctrl->ops.configure_cmddma_window = NULL;
|
ctrl->ops.configure_cmddma_window = NULL;
|
||||||
ctrl->ops.reset_trig_ctrl = NULL;
|
ctrl->ops.reset_trig_ctrl = NULL;
|
||||||
ctrl->ops.log_line_count = NULL;
|
ctrl->ops.log_line_count = NULL;
|
||||||
|
ctrl->ops.splitlink_cmd_setup = NULL;
|
||||||
break;
|
break;
|
||||||
case DSI_CTRL_VERSION_2_2:
|
case DSI_CTRL_VERSION_2_2:
|
||||||
case DSI_CTRL_VERSION_2_3:
|
case DSI_CTRL_VERSION_2_3:
|
||||||
@@ -129,6 +131,7 @@ static void dsi_catalog_cmn_init(struct dsi_ctrl_hw *ctrl,
|
|||||||
ctrl->ops.reset_trig_ctrl =
|
ctrl->ops.reset_trig_ctrl =
|
||||||
dsi_ctrl_hw_22_reset_trigger_controls;
|
dsi_ctrl_hw_22_reset_trigger_controls;
|
||||||
ctrl->ops.log_line_count = dsi_ctrl_hw_22_log_line_count;
|
ctrl->ops.log_line_count = dsi_ctrl_hw_22_log_line_count;
|
||||||
|
ctrl->ops.splitlink_cmd_setup = dsi_ctrl_hw_22_configure_splitlink;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@@ -290,4 +290,6 @@ int dsi_catalog_phy_pll_setup(struct dsi_phy_hw *phy, u32 pll_ver);
|
|||||||
int dsi_pll_5nm_configure(void *pll, bool commit);
|
int dsi_pll_5nm_configure(void *pll, bool commit);
|
||||||
int dsi_pll_5nm_toggle(void *pll, bool prepare);
|
int dsi_pll_5nm_toggle(void *pll, bool prepare);
|
||||||
|
|
||||||
|
void dsi_ctrl_hw_22_configure_splitlink(struct dsi_ctrl_hw *ctrl,
|
||||||
|
struct dsi_host_common_cfg *common_cfg, u32 sublink);
|
||||||
#endif /* _DSI_CATALOG_H_ */
|
#endif /* _DSI_CATALOG_H_ */
|
||||||
|
@@ -1360,6 +1360,9 @@ static void dsi_kickoff_msg_tx(struct dsi_ctrl *dsi_ctrl,
|
|||||||
{
|
{
|
||||||
u32 hw_flags = 0;
|
u32 hw_flags = 0;
|
||||||
struct dsi_ctrl_hw_ops dsi_hw_ops = dsi_ctrl->hw.ops;
|
struct dsi_ctrl_hw_ops dsi_hw_ops = dsi_ctrl->hw.ops;
|
||||||
|
struct dsi_split_link_config *split_link;
|
||||||
|
|
||||||
|
split_link = &(dsi_ctrl->host_config.common_config.split_link);
|
||||||
|
|
||||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, flags,
|
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, flags,
|
||||||
msg->flags);
|
msg->flags);
|
||||||
|
@@ -33,6 +33,8 @@
|
|||||||
* display panel dtsi file instead of default.
|
* display panel dtsi file instead of default.
|
||||||
* @DSI_CTRL_CMD_ASYNC_WAIT: Command flag to indicate that the wait for done
|
* @DSI_CTRL_CMD_ASYNC_WAIT: Command flag to indicate that the wait for done
|
||||||
* for this command is asynchronous and must be queued.
|
* for this command is asynchronous and must be queued.
|
||||||
|
* @DSI_CTRL_CMD_SUBLINK0: Send the command in splitlink sublink0 only.
|
||||||
|
* @DSI_CTRL_CMD_SUBLINK1: Send the command in splitlink sublink1 only.
|
||||||
*/
|
*/
|
||||||
#define DSI_CTRL_CMD_READ 0x1
|
#define DSI_CTRL_CMD_READ 0x1
|
||||||
#define DSI_CTRL_CMD_BROADCAST 0x2
|
#define DSI_CTRL_CMD_BROADCAST 0x2
|
||||||
@@ -44,6 +46,8 @@
|
|||||||
#define DSI_CTRL_CMD_NON_EMBEDDED_MODE 0x80
|
#define DSI_CTRL_CMD_NON_EMBEDDED_MODE 0x80
|
||||||
#define DSI_CTRL_CMD_CUSTOM_DMA_SCHED 0x100
|
#define DSI_CTRL_CMD_CUSTOM_DMA_SCHED 0x100
|
||||||
#define DSI_CTRL_CMD_ASYNC_WAIT 0x200
|
#define DSI_CTRL_CMD_ASYNC_WAIT 0x200
|
||||||
|
#define DSI_CTRL_CMD_SUBLINK0 0x400
|
||||||
|
#define DSI_CTRL_CMD_SUBLINK1 0x800
|
||||||
|
|
||||||
/* DSI embedded mode fifo size
|
/* DSI embedded mode fifo size
|
||||||
* If the command is greater than 256 bytes it is sent in non-embedded mode.
|
* If the command is greater than 256 bytes it is sent in non-embedded mode.
|
||||||
|
@@ -869,6 +869,15 @@ struct dsi_ctrl_hw_ops {
|
|||||||
* @cmd_mode: Boolean to indicate command mode operation.
|
* @cmd_mode: Boolean to indicate command mode operation.
|
||||||
*/
|
*/
|
||||||
u32 (*log_line_count)(struct dsi_ctrl_hw *ctrl, bool cmd_mode);
|
u32 (*log_line_count)(struct dsi_ctrl_hw *ctrl, bool cmd_mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hw.ops.splitlink_cmd_setup() - configure the sublink to transfer
|
||||||
|
* @ctrl: Pointer to the controller host hardware.
|
||||||
|
* @common_cfg: Common configuration parameters.
|
||||||
|
* @sublink: Which sublink to transfer the command.
|
||||||
|
*/
|
||||||
|
void (*splitlink_cmd_setup)(struct dsi_ctrl_hw *ctrl,
|
||||||
|
struct dsi_host_common_cfg *common_cfg, u32 sublink);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -1,11 +1,12 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// 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 <linux/iopoll.h>
|
||||||
#include "dsi_ctrl_hw.h"
|
#include "dsi_ctrl_hw.h"
|
||||||
#include "dsi_ctrl_reg.h"
|
#include "dsi_ctrl_reg.h"
|
||||||
#include "dsi_hw.h"
|
#include "dsi_hw.h"
|
||||||
|
#include "dsi_ctrl.h"
|
||||||
#include "dsi_catalog.h"
|
#include "dsi_catalog.h"
|
||||||
|
|
||||||
#define DISP_CC_MISC_CMD_REG_OFF 0x00
|
#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);
|
+ MDP_INTF_LINE_COUNT_OFFSET);
|
||||||
return reg;
|
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();
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user