disp: msm: dsi: add support for dual display with shared dsi
In dual display configuration, where only one display is active at a time, dsi0 and dsi1 can be used to drive primary large display and, one of the dsi (dsi0 or dsi1) can be used to drive secondary display. This helps to time division multiplex shared DSI for primary and secondary panel which solves the bandwidth limitation problem. This change adds support to allow sharing of dsi ctrl and phy between dual displays. Change-Id: Ib4ed1bf51f587b544ec24b1b558ff83225b36e4b Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
This commit is contained in:
@@ -2080,6 +2080,8 @@ static int dsi_ctrl_dts_parse(struct dsi_ctrl *dsi_ctrl,
|
||||
|
||||
dsi_ctrl->frame_threshold_time_us = frame_threshold_time_us;
|
||||
|
||||
dsi_ctrl->dsi_ctrl_shared = of_property_read_bool(of_node, "qcom,dsi-ctrl-shared");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2316,7 +2318,8 @@ struct dsi_ctrl *dsi_ctrl_get(struct device_node *of_node)
|
||||
}
|
||||
|
||||
mutex_lock(&ctrl->ctrl_lock);
|
||||
if (ctrl->refcount == 1) {
|
||||
if ((ctrl->dsi_ctrl_shared && ctrl->refcount == 2) ||
|
||||
(!ctrl->dsi_ctrl_shared && ctrl->refcount == 1)) {
|
||||
DSI_CTRL_ERR(ctrl, "Device in use\n");
|
||||
mutex_unlock(&ctrl->ctrl_lock);
|
||||
ctrl = ERR_PTR(-EBUSY);
|
||||
|
Reference in New Issue
Block a user