Lines Matching refs:id

35 #define IS_MASTER_DSI_LINK(id)	(msm_dsim_glb.master_dsi_link_id == id)
37 static inline struct msm_dsi *dsi_mgr_get_dsi(int id)
39 return msm_dsim_glb.dsi[id];
42 static inline struct msm_dsi *dsi_mgr_get_other_dsi(int id)
44 return msm_dsim_glb.dsi[(id + 1) % DSI_MAX];
47 static int dsi_mgr_parse_of(struct device_node *np, int id)
59 msm_dsim->master_dsi_link_id = id;
68 static int dsi_mgr_setup_components(int id)
70 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
71 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id);
84 struct msm_dsi *master_link_dsi = IS_MASTER_DSI_LINK(id) ?
86 struct msm_dsi *slave_link_dsi = IS_MASTER_DSI_LINK(id) ?
126 dsi_mgr_phy_enable(int id,
129 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
157 ret = enable_phy(msm_dsi, &shared_timings[id]);
167 static void dsi_mgr_phy_disable(int id)
169 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
190 int id;
198 return dsi_bridge->id;
203 int id = dsi_mgr_bridge_get_id(bridge);
204 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
211 DBG("id=%d", id);
213 ret = dsi_mgr_phy_enable(id, phy_shared_timings);
217 ret = msm_dsi_host_power_on(host, &phy_shared_timings[id], is_bonded_dsi, msm_dsi->phy);
219 pr_err("%s: power on host %d failed, %d\n", __func__, id, ret);
246 dsi_mgr_phy_disable(id);
253 int id = dsi_mgr_bridge_get_id(bridge);
254 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
265 dsi_mgr_phy_disable(id);
270 int id = dsi_mgr_bridge_get_id(bridge);
271 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
277 DBG("id=%d", id);
280 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
291 pr_err("%s: enable host %d failed, %d\n", __func__, id, ret);
326 int id = dsi_mgr_bridge_get_id(bridge);
327 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
333 DBG("id=%d", id);
340 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
345 pr_err("%s: host %d disable failed, %d\n", __func__, id, ret);
362 pr_err("%s: host %d power off failed,%d\n", __func__, id, ret);
372 dsi_mgr_phy_disable(id);
379 int id = dsi_mgr_bridge_get_id(bridge);
380 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
381 struct msm_dsi *other_dsi = dsi_mgr_get_other_dsi(id);
387 if (is_bonded_dsi && !IS_MASTER_DSI_LINK(id))
399 int id = dsi_mgr_bridge_get_id(bridge);
400 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
446 dsi_bridge->id = msm_dsi->id;
462 int msm_dsi_manager_ext_bridge_init(u8 id, struct drm_bridge *int_bridge)
464 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
510 int msm_dsi_manager_cmd_xfer(int id, const struct mipi_dsi_msg *msg)
512 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
527 if (need_sync && (id == DSI_0))
556 bool msm_dsi_manager_cmd_xfer_trigger(int id, u32 dma_base, u32 len)
558 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
562 if (IS_SYNC_NEEDED() && (id == DSI_0))
576 int id = msm_dsi->id;
579 if (id >= DSI_MAX) {
580 pr_err("%s: invalid id %d\n", __func__, id);
584 if (msm_dsim->dsi[id]) {
585 pr_err("%s: dsi%d already registered\n", __func__, id);
589 msm_dsim->dsi[id] = msm_dsi;
591 ret = dsi_mgr_parse_of(msm_dsi->pdev->dev.of_node, id);
597 ret = dsi_mgr_setup_components(id);
600 __func__, id, ret);
607 msm_dsim->dsi[id] = NULL;
618 if (msm_dsi->id >= 0)
619 msm_dsim->dsi[msm_dsi->id] = NULL;
629 return IS_MASTER_DSI_LINK(msm_dsi->id);